diff --git a/packages/sdk/src/generates/internal/SdkHttpNamespaceProgrammer.ts b/packages/sdk/src/generates/internal/SdkHttpNamespaceProgrammer.ts index a3c7cdd0e..0d8adfe00 100644 --- a/packages/sdk/src/generates/internal/SdkHttpNamespaceProgrammer.ts +++ b/packages/sdk/src/generates/internal/SdkHttpNamespaceProgrammer.ts @@ -246,8 +246,17 @@ export namespace SdkHttpNamespaceProgrammer { undefined, [ ts.factory.createBinaryExpression( - ts.factory.createIdentifier( - g.path.find((p) => p.field === name)!.name, + ts.factory.createCallChain( + ts.factory.createPropertyAccessChain( + ts.factory.createIdentifier( + g.path.find((p) => p.field === name)!.name, + ), + ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), + "toString", + ), + undefined, + undefined, + [], ), ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken), ts.factory.createStringLiteral("null"), diff --git a/packages/sdk/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts b/packages/sdk/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts index e9b33fb28..e79d3576b 100644 --- a/packages/sdk/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts +++ b/packages/sdk/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts @@ -151,8 +151,17 @@ export namespace SdkWebSocketNamespaceProgrammer { undefined, [ ts.factory.createBinaryExpression( - ts.factory.createIdentifier( - pathParams.find((p) => p.field === name)!.name, + ts.factory.createCallChain( + ts.factory.createPropertyAccessChain( + ts.factory.createIdentifier( + pathParams.find((p) => p.field === name)!.name, + ), + ts.factory.createToken(ts.SyntaxKind.QuestionDotToken), + "toString", + ), + undefined, + undefined, + [], ), ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken), ts.factory.createStringLiteral("null"), diff --git a/test/features/headers/src/api/functional/headers/index.ts b/test/features/headers/src/api/functional/headers/index.ts index a401397b0..6fc126aff 100644 --- a/test/features/headers/src/api/functional/headers/index.ts +++ b/test/features/headers/src/api/functional/headers/index.ts @@ -41,24 +41,25 @@ export async function emplace( } export namespace emplace { export type Headers = Resolved; - export type Output = Primitive; + export type Output = Resolved; export const METADATA = { method: "PATCH", path: "/headers/:section", request: null, response: { - type: "application/json", + type: "application/x-www-form-urlencoded", encrypted: false, }, status: 200, + parseQuery: typia.http.createAssertQuery(), } as const; export const path = (section: string) => - `/headers/${encodeURIComponent(section ?? "null")}`; + `/headers/${encodeURIComponent(section?.toString() ?? "null")}`; export const random = ( g?: Partial, - ): Resolved> => typia.random>(g); + ): Resolved> => typia.random>(g); export const simulate = ( connection: IConnection, section: string, @@ -67,7 +68,7 @@ export namespace emplace { method: METADATA.method, host: connection.host, path: path(section), - contentType: "application/json", + contentType: "application/x-www-form-urlencoded", }); assert.param("section")(() => typia.assert(section)); return random( @@ -132,7 +133,7 @@ export namespace store { } as const; export const path = (section: string) => - `/headers/${encodeURIComponent(section ?? "null")}`; + `/headers/${encodeURIComponent(section?.toString() ?? "null")}`; export const random = ( g?: Partial, ): Resolved> => @@ -212,7 +213,7 @@ export namespace update { } as const; export const path = (section: string, id: string & Format<"uuid">) => - `/headers/${encodeURIComponent(section ?? "null")}/${encodeURIComponent(id ?? "null")}`; + `/headers/${encodeURIComponent(section?.toString() ?? "null")}/${encodeURIComponent(id?.toString() ?? "null")}`; export const random = (g?: Partial): Resolved => typia.random(g); export const simulate = ( diff --git a/test/features/headers/src/api/structures/IHeaders.ts b/test/features/headers/src/api/structures/IHeaders.ts index 4a08b0eb3..b0aa15e96 100644 --- a/test/features/headers/src/api/structures/IHeaders.ts +++ b/test/features/headers/src/api/structures/IHeaders.ts @@ -1,6 +1,7 @@ export interface IHeaders { "x-category": "x" | "y" | "z"; "x-memo"?: string; + "x-bigint": bigint; /** * @default Samchon diff --git a/test/features/headers/src/controllers/HeadersController.ts b/test/features/headers/src/controllers/HeadersController.ts index 0e02b6968..2f22ce207 100644 --- a/test/features/headers/src/controllers/HeadersController.ts +++ b/test/features/headers/src/controllers/HeadersController.ts @@ -7,7 +7,7 @@ import { IHeaders } from "@api/lib/structures/IHeaders"; @Controller("headers/:section") export class HeadersController { - @core.TypedRoute.Patch() + @core.TypedQuery.Patch() public emplace( @core.TypedHeaders() headers: IHeaders, @Param("section") section: string, diff --git a/test/features/headers/src/test/features/api/automated/test_api_headers_emplace.ts b/test/features/headers/src/test/features/api/automated/test_api_headers_emplace.ts index f13507027..826685c11 100644 --- a/test/features/headers/src/test/features/api/automated/test_api_headers_emplace.ts +++ b/test/features/headers/src/test/features/api/automated/test_api_headers_emplace.ts @@ -1,11 +1,11 @@ -import type { Primitive } from "@nestia/fetcher"; +import type { Resolved } from "@nestia/fetcher"; import typia from "typia"; import api from "../../../../api"; import type { IHeaders } from "../../../../api/structures/IHeaders"; export const test_api_headers_emplace = async (connection: api.IConnection) => { - const output: Primitive = await api.functional.headers.emplace( + const output: Resolved = await api.functional.headers.emplace( { ...connection, headers: { diff --git a/test/features/headers/swagger.json b/test/features/headers/swagger.json index b8b47204d..df9d897b9 100644 --- a/test/features/headers/swagger.json +++ b/test/features/headers/swagger.json @@ -39,7 +39,7 @@ "responses": { "200": { "content": { - "application/json": { + "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/IHeaders" } @@ -203,6 +203,9 @@ "x-memo": { "type": "string" }, + "x-bigint": { + "type": "integer" + }, "x-nAme": { "type": "string" }, @@ -221,6 +224,7 @@ }, "required": [ "x-category", + "x-bigint", "x-values", "x-fLags" ] diff --git a/test/features/param/src/api/functional/calculate/index.ts b/test/features/param/src/api/functional/calculate/index.ts index 2404432da..98352bca5 100644 --- a/test/features/param/src/api/functional/calculate/index.ts +++ b/test/features/param/src/api/functional/calculate/index.ts @@ -47,5 +47,5 @@ export namespace connect { export type Listener = ICalculator; export const path = (id: string & Format<"uuid">) => - `/calculate/${encodeURIComponent(id ?? "null")}`; + `/calculate/${encodeURIComponent(id?.toString() ?? "null")}`; } diff --git a/test/features/param/src/api/functional/param/index.ts b/test/features/param/src/api/functional/param/index.ts index af8624deb..90bc3371a 100644 --- a/test/features/param/src/api/functional/param/index.ts +++ b/test/features/param/src/api/functional/param/index.ts @@ -56,7 +56,7 @@ export namespace composite { } as const; export const path = (value: string, value2: string) => - `/param/${encodeURIComponent(value ?? "null")}/composite/${encodeURIComponent(value2 ?? "null")}`; + `/param/${encodeURIComponent(value?.toString() ?? "null")}/composite/${encodeURIComponent(value2?.toString() ?? "null")}`; } /** @@ -104,7 +104,7 @@ export namespace boolean { } as const; export const path = (value: false | true) => - `/param/${encodeURIComponent(value ?? "null")}/boolean`; + `/param/${encodeURIComponent(value?.toString() ?? "null")}/boolean`; } /** @@ -147,7 +147,50 @@ export namespace number { } as const; export const path = (value: number) => - `/param/${encodeURIComponent(value ?? "null")}/number`; + `/param/${encodeURIComponent(value?.toString() ?? "null")}/number`; +} + +/** + * The bigint. + * @controller TypedParamController.bigint + * @path GET /param/:value/bigint + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function bigint( + connection: IConnection, + value: bigint, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...bigint.METADATA, + template: bigint.METADATA.path, + path: bigint.path(value), + }, + ); +} +export namespace bigint { + export type Output = Primitive; + + export const METADATA = { + method: "GET", + path: "/param/:value/bigint", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: 200, + } as const; + + export const path = (value: bigint) => + `/param/${encodeURIComponent(value?.toString() ?? "null")}/bigint`; } /** @@ -190,7 +233,7 @@ export namespace string { } as const; export const path = (value: string) => - `/param/${encodeURIComponent(value ?? "null")}/string`; + `/param/${encodeURIComponent(value?.toString() ?? "null")}/string`; } /** @@ -232,7 +275,7 @@ export namespace nullable { } as const; export const path = (value: null | string) => - `/param/${encodeURIComponent(value ?? "null")}/nullable`; + `/param/${encodeURIComponent(value?.toString() ?? "null")}/nullable`; } /** @@ -274,7 +317,7 @@ export namespace literal { } as const; export const path = (value: "A" | "B" | "C") => - `/param/${encodeURIComponent(value ?? "null")}/literal`; + `/param/${encodeURIComponent(value?.toString() ?? "null")}/literal`; } /** @@ -316,7 +359,7 @@ export namespace uuid { } as const; export const path = (value: string & Format<"uuid">) => - `/param/${encodeURIComponent(value ?? "null")}/uuid`; + `/param/${encodeURIComponent(value?.toString() ?? "null")}/uuid`; } /** @@ -358,7 +401,7 @@ export namespace date { } as const; export const path = (value: string & Format<"date">) => - `/param/${encodeURIComponent(value ?? "null")}/date`; + `/param/${encodeURIComponent(value?.toString() ?? "null")}/date`; } /** @@ -400,7 +443,7 @@ export namespace uuid_nullable { } as const; export const path = (value: null | (string & Format<"uuid">)) => - `/param/${encodeURIComponent(value ?? "null")}/uuid_nullable`; + `/param/${encodeURIComponent(value?.toString() ?? "null")}/uuid_nullable`; } /** @@ -442,5 +485,5 @@ export namespace date_nullable { } as const; export const path = (value: null | (string & Format<"date">)) => - `/param/${encodeURIComponent(value ?? "null")}/date_nullable`; + `/param/${encodeURIComponent(value?.toString() ?? "null")}/date_nullable`; } diff --git a/test/features/param/src/controllers/CalculateController.ts b/test/features/param/src/controllers/CalculateController.ts index 2bfb89c23..86fdb3329 100644 --- a/test/features/param/src/controllers/CalculateController.ts +++ b/test/features/param/src/controllers/CalculateController.ts @@ -17,9 +17,6 @@ export class CalculateController { @core.WebSocketRoute.Driver() driver: Driver, ): Promise { - console.log({ - id, - }); await adaptor.accept({ getId: () => id, plus: (x, y) => { diff --git a/test/features/param/src/controllers/TypedParamController.ts b/test/features/param/src/controllers/TypedParamController.ts index 8b3759a0f..82dc1aaf0 100644 --- a/test/features/param/src/controllers/TypedParamController.ts +++ b/test/features/param/src/controllers/TypedParamController.ts @@ -6,7 +6,7 @@ import { tags } from "typia"; export class TypedParamController { /** * Composite path parameters. - * + * * @param value The first value. * The first string value. * @param value2 The second value. @@ -39,14 +39,28 @@ export class TypedParamController { @core.TypedRoute.Get(":value/number") public number( /** - * Description in the parameter. - */ - @core.TypedParam("value") - value: number + * Description in the parameter. + */ + @core.TypedParam("value") + value: number, ): number { return value; } + /** + * The bigint. + */ + @core.TypedRoute.Get(":value/bigint") + public bigint( + /** + * Description in the parameter. + */ + @core.TypedParam("value") + value: bigint, + ): number { + return Number(value); + } + /** * The string. */ @@ -56,7 +70,7 @@ export class TypedParamController { * @title Yaho * @description Yoohoo */ - @core.TypedParam("value") value: string + @core.TypedParam("value") value: string, ): string { return value; } diff --git a/test/features/param/src/test/features/api/automated/test_api_param_bigint.ts b/test/features/param/src/test/features/api/automated/test_api_param_bigint.ts new file mode 100644 index 000000000..28d628281 --- /dev/null +++ b/test/features/param/src/test/features/api/automated/test_api_param_bigint.ts @@ -0,0 +1,12 @@ +import type { Primitive } from "@nestia/fetcher"; +import typia from "typia"; + +import api from "../../../../api"; + +export const test_api_param_bigint = async (connection: api.IConnection) => { + const output: Primitive = await api.functional.param.bigint( + connection, + typia.random(), + ); + typia.assert(output); +}; diff --git a/test/features/param/src/test/features/api/test_api_param_bigint.ts b/test/features/param/src/test/features/api/test_api_param_bigint.ts new file mode 100644 index 000000000..27b0274a9 --- /dev/null +++ b/test/features/param/src/test/features/api/test_api_param_bigint.ts @@ -0,0 +1,21 @@ +import { TestValidator } from "@nestia/e2e"; +import typia from "typia"; + +import api from "@api"; + +export const test_api_param_number = async ( + connection: api.IConnection, +): Promise => { + const value: number = await api.functional.param.bigint( + connection, + BigInt(1), + ); + typia.assert(value); + + await TestValidator.httpError("boolean")(400)(() => + api.functional.param.bigint(connection, true as any), + ); + await TestValidator.httpError("string")(400)(() => + api.functional.param.bigint(connection, "string" as any), + ); +}; diff --git a/test/features/param/swagger.json b/test/features/param/swagger.json index fd26083a1..111dde6f0 100644 --- a/test/features/param/swagger.json +++ b/test/features/param/swagger.json @@ -145,6 +145,34 @@ } } }, + "/param/{value}/bigint": { + "get": { + "summary": "The bigint", + "description": "The bigint.", + "tags": [], + "parameters": [ + { + "name": "value", + "in": "path", + "schema": { + "type": "integer" + }, + "required": true + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "number" + } + } + } + } + } + } + }, "/param/{value}/string": { "get": { "summary": "The string", diff --git a/test/features/query/nestia.config.ts b/test/features/query/nestia.config.ts index ca670ea91..47ca3e019 100644 --- a/test/features/query/nestia.config.ts +++ b/test/features/query/nestia.config.ts @@ -5,6 +5,7 @@ export const NESTIA_CONFIG: INestiaConfig = { output: "src/api", swagger: { output: "swagger.json", + beautify: true, security: { bearer: { type: "apiKey", diff --git a/test/features/query/src/api/functional/calculate/index.ts b/test/features/query/src/api/functional/calculate/index.ts index c8f3fce50..13ddb8dd8 100644 --- a/test/features/query/src/api/functional/calculate/index.ts +++ b/test/features/query/src/api/functional/calculate/index.ts @@ -56,7 +56,7 @@ export namespace connect { else if (Array.isArray(value)) value.forEach((elem: any) => variables.append(key, String(elem))); else variables.set(key, String(value)); - const location: string = `/calculate/${encodeURIComponent(id ?? "null")}`; + const location: string = `/calculate/${encodeURIComponent(id?.toString() ?? "null")}`; return 0 === variables.size ? location : `${location}?${variables.toString()}`; diff --git a/test/features/query/src/api/functional/query/index.ts b/test/features/query/src/api/functional/query/index.ts index 2b499e297..ac9d4886d 100644 --- a/test/features/query/src/api/functional/query/index.ts +++ b/test/features/query/src/api/functional/query/index.ts @@ -8,6 +8,7 @@ import type { IConnection, Resolved, Primitive } from "@nestia/fetcher"; import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; import typia from "typia"; +import type { IBigQuery } from "../../structures/IBigQuery"; import type { INestQuery } from "../../structures/INestQuery"; import type { IOptionalQuery } from "../../structures/IOptionalQuery"; import type { IQuery } from "../../structures/IQuery"; @@ -328,3 +329,50 @@ export namespace body { export const path = () => "/query/body"; } + +/** + * @controller QueryController.big + * @path POST /query/big + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function big( + connection: IConnection, + input: big.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/x-www-form-urlencoded", + }, + }, + { + ...big.METADATA, + template: big.METADATA.path, + path: big.path(), + }, + input, + ); +} +export namespace big { + export type Input = Resolved; + export type Output = Resolved; + + export const METADATA = { + method: "POST", + path: "/query/big", + request: { + type: "application/x-www-form-urlencoded", + encrypted: false, + }, + response: { + type: "application/x-www-form-urlencoded", + encrypted: false, + }, + status: 201, + parseQuery: typia.http.createAssertQuery(), + } as const; + + export const path = () => "/query/big"; +} diff --git a/test/features/query/src/api/structures/IBigQuery.ts b/test/features/query/src/api/structures/IBigQuery.ts new file mode 100644 index 000000000..b0cff8b5a --- /dev/null +++ b/test/features/query/src/api/structures/IBigQuery.ts @@ -0,0 +1,4 @@ +export interface IBigQuery { + value: bigint; + nullable: bigint | null; +} diff --git a/test/features/query/src/controllers/QueryController.ts b/test/features/query/src/controllers/QueryController.ts index a0e8d5427..d5ab04ca2 100644 --- a/test/features/query/src/controllers/QueryController.ts +++ b/test/features/query/src/controllers/QueryController.ts @@ -1,6 +1,7 @@ import { TypedQuery, TypedRoute } from "@nestia/core"; import { Controller, Query } from "@nestjs/common"; +import { IBigQuery } from "@api/lib/structures/IBigQuery"; import { INestQuery } from "@api/lib/structures/INestQuery"; import { IOptionalQuery } from "@api/lib/structures/IOptionalQuery"; import { IQuery } from "@api/lib/structures/IQuery"; @@ -49,4 +50,9 @@ export class QueryController { public async body(@TypedQuery.Body() query: IQuery): Promise { return query; } + + @TypedQuery.Post("big") + public async big(@TypedQuery.Body() input: IBigQuery): Promise { + return input; + } } diff --git a/test/features/query/src/test/features/api/test_api_query_big.ts b/test/features/query/src/test/features/api/test_api_query_big.ts new file mode 100644 index 000000000..24702d9d4 --- /dev/null +++ b/test/features/query/src/test/features/api/test_api_query_big.ts @@ -0,0 +1,17 @@ +import { TestValidator } from "@nestia/e2e"; +import typia from "typia"; + +import api from "@api"; +import { IBigQuery } from "@api/lib/structures/IBigQuery"; + +export const test_api_query_big = async ( + connection: api.IConnection, +): Promise => { + const input: IBigQuery = { + value: BigInt(100), + nullable: null, + }; + const result: IBigQuery = await api.functional.query.big(connection, input); + typia.assertEquals(result); + TestValidator.equals("null")(input)(result); +}; diff --git a/test/features/query/swagger.json b/test/features/query/swagger.json index 39b24f6d8..18de1a41f 100644 --- a/test/features/query/swagger.json +++ b/test/features/query/swagger.json @@ -1 +1,447 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.11.0-dev.20240814","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery.o1"}}}}}}},"/query/optional":{"get":{"tags":[],"parameters":[{"name":"a","in":"query","schema":{"type":"string"},"required":false},{"name":"b","in":"query","schema":{"type":"number"},"required":false},{"name":"c","in":"query","schema":{"type":"boolean"},"required":false}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOptionalQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery.o1"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery.o1"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery.o1"}}},"required":true},"responses":{"201":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery.o1"}}}}}}}},"components":{"schemas":{"IQuery.o1":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","atomic"]},"IOptionalQuery":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"number"},"c":{"type":"boolean"}}},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"values":{"type":"array","items":{"type":"string"}},"limit":{"type":"number"},"enforce":{"type":"boolean"}},"required":["enforce"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{ + "openapi": "3.1.0", + "servers": [ + { + "url": "https://github.com/samchon/nestia", + "description": "insert your server url" + } + ], + "info": { + "version": "3.11.0-dev.20240814", + "title": "@samchon/nestia-test", + "description": "Test program of Nestia", + "license": { + "name": "MIT" + } + }, + "paths": { + "/query/typed": { + "get": { + "tags": [], + "parameters": [ + { + "name": "limit", + "in": "query", + "schema": { + "type": "number" + }, + "required": false + }, + { + "name": "enforce", + "in": "query", + "schema": { + "type": "boolean" + }, + "required": true + }, + { + "name": "values", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "required": false + }, + { + "name": "atomic", + "in": "query", + "schema": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "required": true + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IQuery.o1" + } + } + } + } + } + } + }, + "/query/optional": { + "get": { + "tags": [], + "parameters": [ + { + "name": "a", + "in": "query", + "schema": { + "type": "string" + }, + "required": false + }, + { + "name": "b", + "in": "query", + "schema": { + "type": "number" + }, + "required": false + }, + { + "name": "c", + "in": "query", + "schema": { + "type": "boolean" + }, + "required": false + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IOptionalQuery" + } + } + } + } + } + } + }, + "/query/nest": { + "get": { + "tags": [], + "parameters": [ + { + "name": "limit", + "in": "query", + "schema": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "required": false + }, + { + "name": "enforce", + "in": "query", + "schema": { + "oneOf": [ + { + "const": "false" + }, + { + "const": "true" + } + ] + }, + "required": true + }, + { + "name": "atomic", + "in": "query", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "values", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "required": true + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IQuery.o1" + } + } + } + } + } + } + }, + "/query/individual": { + "get": { + "tags": [], + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "required": true + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/query/composite": { + "get": { + "tags": [], + "parameters": [ + { + "name": "atomic", + "in": "query", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "values", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "required": false + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "number" + }, + "required": false + }, + { + "name": "enforce", + "in": "query", + "schema": { + "type": "boolean" + }, + "required": true + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IQuery.o1" + } + } + } + } + } + } + }, + "/query/body": { + "post": { + "tags": [], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/IQuery.o1" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/IQuery.o1" + } + } + } + } + } + } + }, + "/query/big": { + "post": { + "tags": [], + "parameters": [], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/IBigQuery" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/IBigQuery" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "IQuery.o1": { + "type": "object", + "properties": { + "limit": { + "type": "number" + }, + "enforce": { + "type": "boolean" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + }, + "atomic": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + } + }, + "required": [ + "enforce", + "atomic" + ] + }, + "IOptionalQuery": { + "type": "object", + "properties": { + "a": { + "type": "string" + }, + "b": { + "type": "number" + }, + "c": { + "type": "boolean" + } + } + }, + "INestQuery": { + "type": "object", + "properties": { + "limit": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "enforce": { + "oneOf": [ + { + "const": "false" + }, + { + "const": "true" + } + ] + }, + "atomic": { + "type": "string" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enforce", + "atomic", + "values" + ] + }, + "OmitIQueryatomic": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "string" + } + }, + "limit": { + "type": "number" + }, + "enforce": { + "type": "boolean" + } + }, + "required": [ + "enforce" + ], + "description": "Construct a type with the properties of T except for those in type K." + }, + "IBigQuery": { + "type": "object", + "properties": { + "value": { + "type": "integer" + }, + "nullable": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer" + } + ] + } + }, + "required": [ + "value", + "nullable" + ] + } + }, + "securitySchemes": { + "bearer": { + "type": "apiKey" + } + } + }, + "tags": [], + "x-samchon-emended": true +} \ No newline at end of file