typed-openapi 0.1.4 → 0.1.5

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.
@@ -727,16 +727,21 @@ var mapOpenApiEndpoints = (doc) => {
727
727
  (acc, paramOrRef) => {
728
728
  const param = refs.unwrap(paramOrRef);
729
729
  const schema = openApiSchemaToTs({ schema: refs.unwrap(param.schema ?? {}), ctx });
730
- lists.query.push(param);
731
730
  if (param.required)
732
731
  endpoint.meta.areParametersRequired = true;
733
732
  endpoint.meta.hasParameters = true;
734
- if (param.in === "query")
733
+ if (param.in === "query") {
734
+ lists.query.push(param);
735
735
  acc.query[param.name] = schema;
736
- if (param.in === "path")
736
+ }
737
+ if (param.in === "path") {
738
+ lists.path.push(param);
737
739
  acc.path[param.name] = schema;
738
- if (param.in === "header")
740
+ }
741
+ if (param.in === "header") {
742
+ lists.header.push(param);
739
743
  acc.header[param.name] = schema;
744
+ }
740
745
  return acc;
741
746
  },
742
747
  { query: {}, path: {}, header: {} }
package/dist/cli.cjs CHANGED
@@ -31,7 +31,7 @@ var import_promises = require("fs/promises");
31
31
 
32
32
  // package.json
33
33
  var name = "typed-openapi";
34
- var version = "0.1.4";
34
+ var version = "0.1.5";
35
35
 
36
36
  // src/generator.ts
37
37
  var import_server2 = require("pastable/server");
@@ -764,16 +764,21 @@ var mapOpenApiEndpoints = (doc) => {
764
764
  (acc, paramOrRef) => {
765
765
  const param = refs.unwrap(paramOrRef);
766
766
  const schema = openApiSchemaToTs({ schema: refs.unwrap(param.schema ?? {}), ctx });
767
- lists.query.push(param);
768
767
  if (param.required)
769
768
  endpoint.meta.areParametersRequired = true;
770
769
  endpoint.meta.hasParameters = true;
771
- if (param.in === "query")
770
+ if (param.in === "query") {
771
+ lists.query.push(param);
772
772
  acc.query[param.name] = schema;
773
- if (param.in === "path")
773
+ }
774
+ if (param.in === "path") {
775
+ lists.path.push(param);
774
776
  acc.path[param.name] = schema;
775
- if (param.in === "header")
777
+ }
778
+ if (param.in === "header") {
779
+ lists.header.push(param);
776
780
  acc.header[param.name] = schema;
781
+ }
777
782
  return acc;
778
783
  },
779
784
  { query: {}, path: {}, header: {} }
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  allowedRuntimes,
3
3
  generateFile,
4
4
  mapOpenApiEndpoints
5
- } from "./chunk-TUNDL3P7.js";
5
+ } from "./chunk-RMN2CYTB.js";
6
6
 
7
7
  // src/cli.ts
8
8
  import SwaggerParser from "@apidevtools/swagger-parser";
@@ -13,7 +13,7 @@ import { writeFile } from "fs/promises";
13
13
 
14
14
  // package.json
15
15
  var name = "typed-openapi";
16
- var version = "0.1.4";
16
+ var version = "0.1.5";
17
17
 
18
18
  // src/cli.ts
19
19
  var cwd = process.cwd();
package/dist/index.cjs CHANGED
@@ -772,16 +772,21 @@ var mapOpenApiEndpoints = (doc) => {
772
772
  (acc, paramOrRef) => {
773
773
  const param = refs.unwrap(paramOrRef);
774
774
  const schema = openApiSchemaToTs({ schema: refs.unwrap(param.schema ?? {}), ctx });
775
- lists.query.push(param);
776
775
  if (param.required)
777
776
  endpoint.meta.areParametersRequired = true;
778
777
  endpoint.meta.hasParameters = true;
779
- if (param.in === "query")
778
+ if (param.in === "query") {
779
+ lists.query.push(param);
780
780
  acc.query[param.name] = schema;
781
- if (param.in === "path")
781
+ }
782
+ if (param.in === "path") {
783
+ lists.path.push(param);
782
784
  acc.path[param.name] = schema;
783
- if (param.in === "header")
785
+ }
786
+ if (param.in === "header") {
787
+ lists.header.push(param);
784
788
  acc.header[param.name] = schema;
789
+ }
785
790
  return acc;
786
791
  },
787
792
  { query: {}, path: {}, header: {} }
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  openApiSchemaToTs,
8
8
  tsFactory,
9
9
  unwrap
10
- } from "./chunk-TUNDL3P7.js";
10
+ } from "./chunk-RMN2CYTB.js";
11
11
  export {
12
12
  createBoxFactory,
13
13
  createFactory,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typed-openapi",
3
3
  "type": "module",
4
- "version": "0.1.4",
4
+ "version": "0.1.5",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
7
7
  "bin": {
@@ -39,14 +39,22 @@ export const mapOpenApiEndpoints = (doc: OpenAPIObject) => {
39
39
  (acc, paramOrRef) => {
40
40
  const param = refs.unwrap(paramOrRef);
41
41
  const schema = openApiSchemaToTs({ schema: refs.unwrap(param.schema ?? {}), ctx });
42
- lists.query.push(param);
43
42
 
44
43
  if (param.required) endpoint.meta.areParametersRequired = true;
45
44
  endpoint.meta.hasParameters = true;
46
45
 
47
- if (param.in === "query") acc.query[param.name] = schema;
48
- if (param.in === "path") acc.path[param.name] = schema;
49
- if (param.in === "header") acc.header[param.name] = schema;
46
+ if (param.in === "query") {
47
+ lists.query.push(param);
48
+ acc.query[param.name] = schema;
49
+ }
50
+ if (param.in === "path") {
51
+ lists.path.push(param);
52
+ acc.path[param.name] = schema;
53
+ }
54
+ if (param.in === "header") {
55
+ lists.header.push(param);
56
+ acc.header[param.name] = schema;
57
+ }
50
58
 
51
59
  return acc;
52
60
  },