From 5f421d90d69e9e6139bf1acc2c0f09d790f2dabb Mon Sep 17 00:00:00 2001 From: Martin Acosta Date: Thu, 25 Jul 2024 20:52:19 -0300 Subject: [PATCH] delete unused files --- test/petstore.txt | 156 ------------------------------------- test/schema.cjs.txt | 186 -------------------------------------------- test/schema.txt | 186 -------------------------------------------- 3 files changed, 528 deletions(-) delete mode 100644 test/petstore.txt delete mode 100644 test/schema.cjs.txt delete mode 100644 test/schema.txt diff --git a/test/petstore.txt b/test/petstore.txt deleted file mode 100644 index 3d26fbb..0000000 --- a/test/petstore.txt +++ /dev/null @@ -1,156 +0,0 @@ -/* eslint-disable */ -// This document was generated automatically by openapi-box - -/** - * @typedef {import('@sinclair/typebox').TSchema} TSchema - */ - -/** - * @template {TSchema} T - * @typedef {import('@sinclair/typebox').Static} Static - */ - -/** - * @typedef {{ - * [Path in keyof typeof schema]: { - * [Method in keyof typeof schema[Path]]: { - * [Prop in keyof typeof schema[Path][Method]]: typeof schema[Path][Method][Prop] extends TSchema ? - * Static : - * undefined - * } - * } - * }} SchemaType - */ - -/** - * @typedef {{ - * [ComponentType in keyof typeof _components]: { - * [ComponentName in keyof typeof _components[ComponentType]]: typeof _components[ComponentType][ComponentName] extends TSchema ? - * Static : - * undefined - * } - * }} ComponentType - */ - -/** @typedef {Json[]} JsonArray */ -/** @typedef {{ [key: string | number]: Json }} JsonRecord */ -/** @typedef {string} JsonString */ -/** @typedef {number} JsonNumber */ -/** @typedef {boolean} JsonBoolean */ -/** @typedef {null} JsonNull */ -/** @typedef {JsonArray | JsonRecord | JsonString | JsonNumber | JsonBoolean | JsonNull} Json */ - -import { Type as T } from '@sinclair/typebox' - -/** - * @param {JsonArray | JsonRecord} [options] - * @returns {ReturnType>} - */ -const Json = (options) => T.Unsafe(T.Any(options)) - -const cache = {} -cache['03e858838eb430edda802cc71646963b'] = T.Optional( - T.Integer({ format: 'int32', 'x-in': 'query' }) -) -cache['723300ad0470e6ce673b85751ba5bcc7'] = { - limit: cache['03e858838eb430edda802cc71646963b'] -} -cache['5bfbeb4f1040ffcb05449e459a2b6e29'] = { - id: T.Integer({ format: 'int64' }), - name: T.String(), - tag: T.Optional(T.String()) -} -cache['e7066718f2cec7911b7492b026db3603'] = T.Object( - cache['5bfbeb4f1040ffcb05449e459a2b6e29'] -) -cache['ac3205be0e87bb06e17139ad412c51f8'] = { - code: T.Integer({ format: 'int32' }), - message: T.String() -} -cache['a09d70c81606db20589569c60c981b9a'] = T.String({ 'x-in': 'path' }) -cache['5813dcb66e7e849794b7e10cf18cc4b4'] = { - petId: cache['a09d70c81606db20589569c60c981b9a'] -} -cache['07e889497aac2beab329a2eb5fc61dcc'] = T.Integer({ - format: 'int32', - 'x-in': 'query' -}) -cache['c79bf6c101e6f1ae8d144f277145f13b'] = T.Integer({ - format: 'int32', - 'x-in': 'query' -}) - -const schema = { - '/pets': { - GET: { - args: T.Optional( - T.Object({ - query: T.Optional(T.Object(cache['723300ad0470e6ce673b85751ba5bcc7'])) - }) - ), - data: T.Array(cache['e7066718f2cec7911b7492b026db3603'], { - 'x-status-code': '200', - 'x-content-type': 'application/json' - }), - error: T.Union([ - T.Object(cache['ac3205be0e87bb06e17139ad412c51f8'], { - 'x-status-code': 'default', - 'x-content-type': 'application/json' - }) - ]) - }, - POST: { - args: T.Void(), - data: T.Any({ 'x-status-code': '201' }), - error: T.Union([ - T.Object(cache['ac3205be0e87bb06e17139ad412c51f8'], { - 'x-status-code': 'default', - 'x-content-type': 'application/json' - }) - ]) - } - }, - '/pets/{petId}': { - GET: { - args: T.Object({ - params: T.Object(cache['5813dcb66e7e849794b7e10cf18cc4b4']) - }), - data: T.Object(cache['5bfbeb4f1040ffcb05449e459a2b6e29'], { - 'x-status-code': '200', - 'x-content-type': 'application/json' - }), - error: T.Union([ - T.Object(cache['ac3205be0e87bb06e17139ad412c51f8'], { - 'x-status-code': 'default', - 'x-content-type': 'application/json' - }) - ]) - } - } -} - -const _components = { - parameters: { - skipParam: cache['07e889497aac2beab329a2eb5fc61dcc'], - limitParam: cache['c79bf6c101e6f1ae8d144f277145f13b'] - }, - responses: { - NotFound: T.Any({}), - IllegalInput: T.Any({}), - GeneralError: T.Object(cache['ac3205be0e87bb06e17139ad412c51f8'], { - 'x-content-type': 'application/json' - }) - }, - requestBodies: { - Pet: T.Object(cache['5bfbeb4f1040ffcb05449e459a2b6e29'], { - 'x-content-type': 'application/json' - }) - }, - schemas: { - Error: T.Object(cache['ac3205be0e87bb06e17139ad412c51f8']), - Pet: T.Object(cache['5bfbeb4f1040ffcb05449e459a2b6e29']), - Pets: T.Array(cache['e7066718f2cec7911b7492b026db3603']) - } -} - -export { schema, _components as components } diff --git a/test/schema.cjs.txt b/test/schema.cjs.txt deleted file mode 100644 index b4a3c68..0000000 --- a/test/schema.cjs.txt +++ /dev/null @@ -1,186 +0,0 @@ -/* eslint-disable */ -// This document was generated automatically by openapi-box - -/** - * @typedef {import('@sinclair/typebox').TSchema} TSchema - */ - -/** - * @template {TSchema} T - * @typedef {import('@sinclair/typebox').Static} Static - */ - -/** - * @typedef {{ - * [Path in keyof typeof schema]: { - * [Method in keyof typeof schema[Path]]: { - * [Prop in keyof typeof schema[Path][Method]]: typeof schema[Path][Method][Prop] extends TSchema ? - * Static : - * undefined - * } - * } - * }} SchemaType - */ - -/** - * @typedef {{ - * [ComponentType in keyof typeof _components]: { - * [ComponentName in keyof typeof _components[ComponentType]]: typeof _components[ComponentType][ComponentName] extends TSchema ? - * Static : - * undefined - * } - * }} ComponentType - */ - -/** @typedef {Json[]} JsonArray */ -/** @typedef {{ [key: string | number]: Json }} JsonRecord */ -/** @typedef {string} JsonString */ -/** @typedef {number} JsonNumber */ -/** @typedef {boolean} JsonBoolean */ -/** @typedef {null} JsonNull */ -/** @typedef {JsonArray | JsonRecord | JsonString | JsonNumber | JsonBoolean | JsonNull} Json */ - -const { Type: T } = require('@sinclair/typebox') - -/** - * @param {JsonArray | JsonRecord} [options] - * @returns {ReturnType>} - */ -const Json = (options) => T.Unsafe(T.Any(options)) - -const cache = {} -cache['f40229273b744064836829fd7d98a527'] = { - hello: T.Boolean() -} -cache['758696ec9f72013302034e82c22e0efb'] = { - error: T.String() -} -cache['47d3d183ad8bb259a9f8325cf2ab2d5b'] = { - name: T.String() -} -cache['b635c194e59c78028705df528dea77d7'] = T.String({ 'x-in': 'header' }) -cache['255a61804302aa4bd8f117420add6257'] = { - auth: cache['b635c194e59c78028705df528dea77d7'] -} -cache['d51eef39907272763131bef48123fb66'] = T.String({ 'x-in': 'path' }) -cache['9e360b975edf5daeacb6640803b6a4c7'] = { - id: cache['d51eef39907272763131bef48123fb66'] -} -cache['864edea74ad38eac3fa406501729a056'] = T.String({ 'x-in': 'query' }) -cache['2809284b6e54d0d34017715ffe5636bd'] = T.String() -cache['06c090025e83070271cc497e44239ba7'] = T.Array( - cache['2809284b6e54d0d34017715ffe5636bd'], - { 'x-in': 'query' } -) -cache['c80c06529370bd2a6907120430728ec6'] = { - deepTitle: T.Optional(T.String()) -} -cache['d06bd94c06d00ee7cf3e2a89f0944180'] = T.Object( - cache['c80c06529370bd2a6907120430728ec6'], - { 'x-in': 'query' } -) -cache['8da1342213edf1231cfe5f33446d81ee'] = { - filter: cache['864edea74ad38eac3fa406501729a056'], - address: cache['06c090025e83070271cc497e44239ba7'], - deep: cache['d06bd94c06d00ee7cf3e2a89f0944180'] -} -cache['c772fb62a277e4ea942c9eefaefb4655'] = [T.Literal('batman')] -cache['a3fe358f59464810fefa67ab749159a7'] = [T.Literal('joker')] -cache['8a48859dc4294a0307f483f076bba742'] = [ - T.Union(cache['c772fb62a277e4ea942c9eefaefb4655']), - T.Union(cache['a3fe358f59464810fefa67ab749159a7']) -] -cache['f4b0f2ddbd1b2fbe02c10d8bd3dd3e37'] = { - name: T.String(), - age: T.Optional(T.Number()), - gender: T.Union(cache['8a48859dc4294a0307f483f076bba742']) -} -cache['5066358f248daf33be676e893f6ad939'] = { - title: T.String(), - address: T.String() -} -cache['a4d5c21a651696fabb83fc7ba1c00c6d'] = T.Object( - cache['5066358f248daf33be676e893f6ad939'] -) -cache['53cf15a7ce0ceec5b4f7b8ec0ff695a7'] = { - human: T.Object(cache['f4b0f2ddbd1b2fbe02c10d8bd3dd3e37']), - address: T.Array(cache['a4d5c21a651696fabb83fc7ba1c00c6d']), - recursive: Json() -} -cache['c31c87a08a18f5fd1f28efc42581b68a'] = { - id: T.Optional(T.String()) -} -cache['734381ed9db8585a070b030440190d32'] = { - deepTitle: T.String() -} -cache['3a5ec6fa1d653f40ca7005bcd5e1f154'] = { - filter: T.String(), - address: T.Array(cache['2809284b6e54d0d34017715ffe5636bd']), - deep: T.Object(cache['734381ed9db8585a070b030440190d32']) -} -cache['e318cf72abfc5abcd76c7507fd025022'] = { - params: T.Object(cache['c31c87a08a18f5fd1f28efc42581b68a']), - query: T.Object(cache['3a5ec6fa1d653f40ca7005bcd5e1f154']), - body: T.Object(cache['53cf15a7ce0ceec5b4f7b8ec0ff695a7']) -} - -const schema = { - '/hello': { - GET: { - args: T.Void(), - data: T.Any({ 'x-status-code': '200' }), - error: T.Union([T.Any({ 'x-status-code': 'default' })]) - } - }, - '/hello-typed': { - GET: { - args: T.Void(), - data: T.Object(cache['f40229273b744064836829fd7d98a527'], { - 'x-status-code': '200', - 'x-content-type': 'application/json' - }), - error: T.Union([ - T.Object(cache['758696ec9f72013302034e82c22e0efb'], { - 'x-status-code': '404', - 'x-content-type': 'application/json' - }) - ]) - } - }, - '/multiple-content': { - GET: { - args: T.Void(), - data: T.Object(cache['47d3d183ad8bb259a9f8325cf2ab2d5b'], { - 'x-status-code': '200', - 'x-content-type': 'application/json' - }), - error: T.Union([ - T.Object(cache['758696ec9f72013302034e82c22e0efb'], { - 'x-status-code': '404', - 'x-content-type': 'application/json' - }) - ]) - } - }, - '/some-route/{id}': { - POST: { - args: T.Object({ - headers: T.Object(cache['255a61804302aa4bd8f117420add6257']), - params: T.Object(cache['9e360b975edf5daeacb6640803b6a4c7']), - query: T.Object(cache['8da1342213edf1231cfe5f33446d81ee']), - body: T.Object(cache['53cf15a7ce0ceec5b4f7b8ec0ff695a7'], { - 'x-content-type': 'application/json' - }) - }), - data: T.Object(cache['e318cf72abfc5abcd76c7507fd025022'], { - 'x-status-code': '201', - 'x-content-type': 'application/json' - }), - error: T.Union([T.Any({ 'x-status-code': 'default' })]) - } - } -} - -const _components = {} - -module.exports = { schema, components: _components } diff --git a/test/schema.txt b/test/schema.txt deleted file mode 100644 index 0c766b0..0000000 --- a/test/schema.txt +++ /dev/null @@ -1,186 +0,0 @@ -/* eslint-disable */ -// This document was generated automatically by openapi-box - -/** - * @typedef {import('@sinclair/typebox').TSchema} TSchema - */ - -/** - * @template {TSchema} T - * @typedef {import('@sinclair/typebox').Static} Static - */ - -/** - * @typedef {{ - * [Path in keyof typeof schema]: { - * [Method in keyof typeof schema[Path]]: { - * [Prop in keyof typeof schema[Path][Method]]: typeof schema[Path][Method][Prop] extends TSchema ? - * Static : - * undefined - * } - * } - * }} SchemaType - */ - -/** - * @typedef {{ - * [ComponentType in keyof typeof _components]: { - * [ComponentName in keyof typeof _components[ComponentType]]: typeof _components[ComponentType][ComponentName] extends TSchema ? - * Static : - * undefined - * } - * }} ComponentType - */ - -/** @typedef {Json[]} JsonArray */ -/** @typedef {{ [key: string | number]: Json }} JsonRecord */ -/** @typedef {string} JsonString */ -/** @typedef {number} JsonNumber */ -/** @typedef {boolean} JsonBoolean */ -/** @typedef {null} JsonNull */ -/** @typedef {JsonArray | JsonRecord | JsonString | JsonNumber | JsonBoolean | JsonNull} Json */ - -import { Type as T } from '@sinclair/typebox' - -/** - * @param {JsonArray | JsonRecord} [options] - * @returns {ReturnType>} - */ -const Json = (options) => T.Unsafe(T.Any(options)) - -const cache = {} -cache['f40229273b744064836829fd7d98a527'] = { - hello: T.Boolean() -} -cache['758696ec9f72013302034e82c22e0efb'] = { - error: T.String() -} -cache['47d3d183ad8bb259a9f8325cf2ab2d5b'] = { - name: T.String() -} -cache['b635c194e59c78028705df528dea77d7'] = T.String({ 'x-in': 'header' }) -cache['255a61804302aa4bd8f117420add6257'] = { - auth: cache['b635c194e59c78028705df528dea77d7'] -} -cache['d51eef39907272763131bef48123fb66'] = T.String({ 'x-in': 'path' }) -cache['9e360b975edf5daeacb6640803b6a4c7'] = { - id: cache['d51eef39907272763131bef48123fb66'] -} -cache['864edea74ad38eac3fa406501729a056'] = T.String({ 'x-in': 'query' }) -cache['2809284b6e54d0d34017715ffe5636bd'] = T.String() -cache['06c090025e83070271cc497e44239ba7'] = T.Array( - cache['2809284b6e54d0d34017715ffe5636bd'], - { 'x-in': 'query' } -) -cache['c80c06529370bd2a6907120430728ec6'] = { - deepTitle: T.Optional(T.String()) -} -cache['d06bd94c06d00ee7cf3e2a89f0944180'] = T.Object( - cache['c80c06529370bd2a6907120430728ec6'], - { 'x-in': 'query' } -) -cache['8da1342213edf1231cfe5f33446d81ee'] = { - filter: cache['864edea74ad38eac3fa406501729a056'], - address: cache['06c090025e83070271cc497e44239ba7'], - deep: cache['d06bd94c06d00ee7cf3e2a89f0944180'] -} -cache['c772fb62a277e4ea942c9eefaefb4655'] = [T.Literal('batman')] -cache['a3fe358f59464810fefa67ab749159a7'] = [T.Literal('joker')] -cache['8a48859dc4294a0307f483f076bba742'] = [ - T.Union(cache['c772fb62a277e4ea942c9eefaefb4655']), - T.Union(cache['a3fe358f59464810fefa67ab749159a7']) -] -cache['f4b0f2ddbd1b2fbe02c10d8bd3dd3e37'] = { - name: T.String(), - age: T.Optional(T.Number()), - gender: T.Union(cache['8a48859dc4294a0307f483f076bba742']) -} -cache['5066358f248daf33be676e893f6ad939'] = { - title: T.String(), - address: T.String() -} -cache['a4d5c21a651696fabb83fc7ba1c00c6d'] = T.Object( - cache['5066358f248daf33be676e893f6ad939'] -) -cache['53cf15a7ce0ceec5b4f7b8ec0ff695a7'] = { - human: T.Object(cache['f4b0f2ddbd1b2fbe02c10d8bd3dd3e37']), - address: T.Array(cache['a4d5c21a651696fabb83fc7ba1c00c6d']), - recursive: Json() -} -cache['c31c87a08a18f5fd1f28efc42581b68a'] = { - id: T.Optional(T.String()) -} -cache['734381ed9db8585a070b030440190d32'] = { - deepTitle: T.String() -} -cache['3a5ec6fa1d653f40ca7005bcd5e1f154'] = { - filter: T.String(), - address: T.Array(cache['2809284b6e54d0d34017715ffe5636bd']), - deep: T.Object(cache['734381ed9db8585a070b030440190d32']) -} -cache['e318cf72abfc5abcd76c7507fd025022'] = { - params: T.Object(cache['c31c87a08a18f5fd1f28efc42581b68a']), - query: T.Object(cache['3a5ec6fa1d653f40ca7005bcd5e1f154']), - body: T.Object(cache['53cf15a7ce0ceec5b4f7b8ec0ff695a7']) -} - -const schema = { - '/hello': { - GET: { - args: T.Void(), - data: T.Any({ 'x-status-code': '200' }), - error: T.Union([T.Any({ 'x-status-code': 'default' })]) - } - }, - '/hello-typed': { - GET: { - args: T.Void(), - data: T.Object(cache['f40229273b744064836829fd7d98a527'], { - 'x-status-code': '200', - 'x-content-type': 'application/json' - }), - error: T.Union([ - T.Object(cache['758696ec9f72013302034e82c22e0efb'], { - 'x-status-code': '404', - 'x-content-type': 'application/json' - }) - ]) - } - }, - '/multiple-content': { - GET: { - args: T.Void(), - data: T.Object(cache['47d3d183ad8bb259a9f8325cf2ab2d5b'], { - 'x-status-code': '200', - 'x-content-type': 'application/json' - }), - error: T.Union([ - T.Object(cache['758696ec9f72013302034e82c22e0efb'], { - 'x-status-code': '404', - 'x-content-type': 'application/json' - }) - ]) - } - }, - '/some-route/{id}': { - POST: { - args: T.Object({ - headers: T.Object(cache['255a61804302aa4bd8f117420add6257']), - params: T.Object(cache['9e360b975edf5daeacb6640803b6a4c7']), - query: T.Object(cache['8da1342213edf1231cfe5f33446d81ee']), - body: T.Object(cache['53cf15a7ce0ceec5b4f7b8ec0ff695a7'], { - 'x-content-type': 'application/json' - }) - }), - data: T.Object(cache['e318cf72abfc5abcd76c7507fd025022'], { - 'x-status-code': '201', - 'x-content-type': 'application/json' - }), - error: T.Union([T.Any({ 'x-status-code': 'default' })]) - } - } -} - -const _components = {} - -export { schema, _components as components }