@pikku/openapi-parser 0.12.4 → 0.12.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @pikku/openapi-parser
2
2
 
3
+ ## 0.12.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 8552e18: Don't generate `output: z.void()` for operations without response schemas — omit the field instead
8
+
3
9
  ## 0.12.4
4
10
 
5
11
  ### Patch Changes
package/dist/codegen.js CHANGED
@@ -148,9 +148,6 @@ function generateFunctionFile(named, parsed, vars, ctx, spec, flags) {
148
148
  if (parsed.responseSchema) {
149
149
  funcConfig.push(` output: ${outputName},`);
150
150
  }
151
- else {
152
- funcConfig.push(' output: z.void(),');
153
- }
154
151
  if (errorClasses.length > 0) {
155
152
  funcConfig.push(` errors: [${errorClasses.join(', ')}],`);
156
153
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/openapi-parser",
3
- "version": "0.12.4",
3
+ "version": "0.12.5",
4
4
  "description": "OpenAPI spec parser and code generator for Pikku",
5
5
  "author": "yasser.fadl@gmail.com",
6
6
  "license": "MIT",
package/src/codegen.ts CHANGED
@@ -246,8 +246,6 @@ function generateFunctionFile(
246
246
  if (hasInput) funcConfig.push(` input: ${inputName},`)
247
247
  if (parsed.responseSchema) {
248
248
  funcConfig.push(` output: ${outputName},`)
249
- } else {
250
- funcConfig.push(' output: z.void(),')
251
249
  }
252
250
 
253
251
  if (errorClasses.length > 0) {