@povio/openapi-codegen-cli 0.3.4 → 0.3.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/openapi-codegen-cli",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "main": "./dist/index.js",
5
5
  "bin": {
6
6
  "openapi-codegen": "./dist/sh.js"
@@ -8,9 +8,9 @@
8
8
  {{#if includeNamespace}}
9
9
  export namespace {{namespace}} {
10
10
  {{/if}}
11
- {{#each zodSchemas as | zodSchema |}}
11
+ {{#each zodSchemasData as | zodSchema |}}
12
12
  {{! Zod schema export }}
13
- export const {{@key}} = {{{zodSchema}}};
13
+ export const {{@key}}{{#if zodSchema.isCircular}}: z.ZodType<unknown>{{/if}} = {{{zodSchema.code}}};
14
14
  {{! Zod schema infered type export }}
15
15
  export type {{zodInferedType @key}} = z.infer<typeof {{@key}}>;
16
16
 
@@ -15,7 +15,7 @@
15
15
  {{#if endpointConfig.headers}}
16
16
  headers: {
17
17
  {{#each endpointConfig.headers as | header |}}
18
- '{{@key}}': '{{header}}',
18
+ '{{@key}}': {{{header}}},
19
19
  {{/each}}
20
20
  },
21
21
  {{/if}}
@@ -1,5 +1,8 @@
1
1
  export const keys = {
2
+ {{#each (allQueryKeys endpoints) as | queryKey |}}
3
+ {{queryKey.name}}: ["{{queryKey.path}}"] as const,
4
+ {{/each}}
2
5
  {{#each endpoints as | endpoint |}}
3
- {{endpointName endpoint}}: ({{{genEndpointParams endpoint}}}) => ["{{endpoint.path}}", {{{endpointArgs endpoint}}}] as const,
6
+ {{endpointName endpoint}}: ({{{genEndpointParams endpoint}}}) => [{{{commaSeparated (endpointPathQueryKeys endpoint ../endpoints)}}}, {{{endpointArgs endpoint}}}] as const,
4
7
  {{/each}}
5
8
  };