@nestia/sdk 1.4.13-dev.20230726-4 → 1.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,6 +66,7 @@ var NestiaSdkConfig;
66
66
  const __is = input => {
67
67
  const $is_url = typia_1.assert.is_url;
68
68
  const $join = typia_1.assert.join;
69
+ const $is_custom = typia_1.assert.is_custom;
69
70
  const $io0 = input => (undefined === input.swagger || "object" === typeof input.swagger && null !== input.swagger && $io1(input.swagger)) && (null !== input.input && undefined !== input.input && ("string" === typeof input.input || (Array.isArray(input.input) && input.input.every(elem => "string" === typeof elem) || "object" === typeof input.input && null !== input.input && $io15(input.input)))) && (undefined === input.output || "string" === typeof input.output) && (undefined === input.distribute || "string" === typeof input.distribute) && (undefined === input.e2e || "string" === typeof input.e2e) && (undefined === input.compilerOptions || "object" === typeof input.compilerOptions && null !== input.compilerOptions && false === Array.isArray(input.compilerOptions) && $io16(input.compilerOptions)) && (undefined === input.assert || "boolean" === typeof input.assert) && (undefined === input.json || "boolean" === typeof input.json) && (undefined === input.primitive || "boolean" === typeof input.primitive) && (undefined === input.simulate || "boolean" === typeof input.simulate);
70
71
  const $io1 = input => "string" === typeof input.output && (undefined === input.info || "object" === typeof input.info && null !== input.info && false === Array.isArray(input.info) && $io2(input.info)) && (undefined === input.servers || Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && $io3(elem))) && (undefined === input.security || "object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) && $io4(input.security)) && (undefined === input.decompose || "boolean" === typeof input.decompose);
71
72
  const $io2 = input => (undefined === input.version || "string" === typeof input.version) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description);
@@ -78,9 +79,9 @@ var NestiaSdkConfig;
78
79
  return "object" === typeof value && null !== value && $iu0(value);
79
80
  return true;
80
81
  });
81
- const $io5 = input => "http" === input.type && "basic" === input.schema;
82
+ const $io5 = input => "http" === input.type && "basic" === input.scheme;
82
83
  const $io6 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat);
83
- const $io7 = input => "apiKey" === input.type && (undefined === input["in"] || "header" === input["in"] || "query" === input["in"] || "cookie" === input["in"]) && (undefined === input.name || "string" === typeof input.name);
84
+ const $io7 = input => "apiKey" === input.type && (undefined === input["in"] || "header" === input["in"] || "query" === input["in"] || "cookie" === input["in"]) && (undefined === input.name || "string" === typeof input.name && $is_custom("default", "string", "Authorization", input.name));
84
85
  const $io8 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl;
85
86
  const $io9 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && $io10(input.flows)) && (undefined === input.description || "string" === typeof input.description);
86
87
  const $io10 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && $io11(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && $io13(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && $io14(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && $io14(input.clientCredentials));
@@ -113,9 +114,9 @@ var NestiaSdkConfig;
113
114
  return true;
114
115
  });
115
116
  const $iu0 = input => (() => {
116
- if (undefined !== input.schema)
117
+ if ("basic" === input.scheme)
117
118
  return $io5(input);
118
- if (undefined !== input.scheme)
119
+ if ("bearer" === input.scheme)
119
120
  return $io6(input);
120
121
  if ("apiKey" === input.type)
121
122
  return $io7(input);
@@ -132,6 +133,7 @@ var NestiaSdkConfig;
132
133
  const $guard = typia_1.assert.guard;
133
134
  const $is_url = typia_1.assert.is_url;
134
135
  const $join = typia_1.assert.join;
136
+ const $is_custom = typia_1.assert.is_custom;
135
137
  const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.swagger || ("object" === typeof input.swagger && null !== input.swagger || $guard(_exceptionable, {
136
138
  path: _path + ".swagger",
137
139
  expected: "(INestiaConfig.ISwaggerConfig | undefined)",
@@ -284,10 +286,10 @@ var NestiaSdkConfig;
284
286
  path: _path + ".type",
285
287
  expected: "\"http\"",
286
288
  value: input.type
287
- })) && ("basic" === input.schema || $guard(_exceptionable, {
288
- path: _path + ".schema",
289
+ })) && ("basic" === input.scheme || $guard(_exceptionable, {
290
+ path: _path + ".scheme",
289
291
  expected: "\"basic\"",
290
- value: input.schema
292
+ value: input.scheme
291
293
  }));
292
294
  const $ao6 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
293
295
  path: _path + ".type",
@@ -310,7 +312,11 @@ var NestiaSdkConfig;
310
312
  path: _path + "[\"in\"]",
311
313
  expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
312
314
  value: input["in"]
313
- })) && (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
315
+ })) && (undefined === input.name || "string" === typeof input.name && ($is_custom("default", "string", "Authorization", input.name) || $guard(_exceptionable, {
316
+ path: _path + ".name",
317
+ expected: "string (@default Authorization)",
318
+ value: input.name
319
+ })) || $guard(_exceptionable, {
314
320
  path: _path + ".name",
315
321
  expected: "(string | undefined)",
316
322
  value: input.name
@@ -923,9 +929,9 @@ var NestiaSdkConfig;
923
929
  return true;
924
930
  });
925
931
  const $au0 = (input, _path, _exceptionable = true) => (() => {
926
- if (undefined !== input.schema)
932
+ if ("basic" === input.scheme)
927
933
  return $ao5(input, _path, true && _exceptionable);
928
- if (undefined !== input.scheme)
934
+ if ("bearer" === input.scheme)
929
935
  return $ao6(input, _path, true && _exceptionable);
930
936
  if ("apiKey" === input.type)
931
937
  return $ao7(input, _path, true && _exceptionable);
@@ -1 +1 @@
1
- {"version":3,"file":"NestiaSdkConfig.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaSdkConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,gDAAkC;AAClC,qDAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAC,MAAM,EAAE;IAC1B,CAAC,CAAA,CAAC,CAAC;AACP,CAAC,EA1BgB,eAAe,+BAAf,eAAe,QA0B/B"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Security schema of Swagger Documents.
2
+ * Security scheme of Swagger Documents.
3
3
  *
4
4
  * `ISwaggerSecurityScheme` is a data structure representing content of
5
5
  * `securitySchemes` in `swagger.json` file. It is composed with 5 types of security
@@ -12,7 +12,7 @@ export type ISwaggerSecurityScheme = ISwaggerSecurityScheme.IHttpBasic | ISwagge
12
12
  export declare namespace ISwaggerSecurityScheme {
13
13
  interface IHttpBasic {
14
14
  type: "http";
15
- schema: "basic";
15
+ scheme: "basic";
16
16
  }
17
17
  interface IHttpBearer {
18
18
  type: "http";
@@ -21,7 +21,13 @@ export declare namespace ISwaggerSecurityScheme {
21
21
  }
22
22
  interface IApiKey {
23
23
  type: "apiKey";
24
+ /**
25
+ * @default header
26
+ */
24
27
  in?: "header" | "query" | "cookie";
28
+ /**
29
+ * @default Authorization
30
+ */
25
31
  name?: string;
26
32
  }
27
33
  interface IOpenId {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestia/sdk",
3
- "version": "1.4.13-dev.20230726-4",
3
+ "version": "1.4.14",
4
4
  "description": "Nestia SDK and Swagger generator",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Security schema of Swagger Documents.
2
+ * Security scheme of Swagger Documents.
3
3
  *
4
4
  * `ISwaggerSecurityScheme` is a data structure representing content of
5
5
  * `securitySchemes` in `swagger.json` file. It is composed with 5 types of security
@@ -17,7 +17,7 @@ export type ISwaggerSecurityScheme =
17
17
  export namespace ISwaggerSecurityScheme {
18
18
  export interface IHttpBasic {
19
19
  type: "http";
20
- schema: "basic";
20
+ scheme: "basic";
21
21
  }
22
22
  export interface IHttpBearer {
23
23
  type: "http";
@@ -26,7 +26,15 @@ export namespace ISwaggerSecurityScheme {
26
26
  }
27
27
  export interface IApiKey {
28
28
  type: "apiKey";
29
+
30
+ /**
31
+ * @default header
32
+ */
29
33
  in?: "header" | "query" | "cookie";
34
+
35
+ /**
36
+ * @default Authorization
37
+ */
30
38
  name?: string;
31
39
  }
32
40