@sebspark/openapi-typegen 2.3.1 → 3.0.0
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/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -354,9 +354,9 @@ var generateArgs = (args, isServer) => {
|
|
|
354
354
|
const arg = args[part];
|
|
355
355
|
if (arg) {
|
|
356
356
|
const partName = part === "path" ? "params" : part === "header" ? "headers" : part;
|
|
357
|
-
if (partName === "query") {
|
|
357
|
+
if (partName === "query" && isServer) {
|
|
358
358
|
tokens.push(
|
|
359
|
-
`${partName}${arg.optional ? "?" : ""}:
|
|
359
|
+
`${partName}${arg.optional ? "?" : ""}: QueryParams<${generateType(arg)}>`
|
|
360
360
|
);
|
|
361
361
|
} else {
|
|
362
362
|
tokens.push(
|
|
@@ -464,6 +464,7 @@ var generate = (name, doc) => `
|
|
|
464
464
|
GenericRouteHandler,
|
|
465
465
|
LowerCaseHeaders,
|
|
466
466
|
PartiallySerialized,
|
|
467
|
+
QueryParams,
|
|
467
468
|
RequestOptions,
|
|
468
469
|
Serialized,
|
|
469
470
|
} from '@sebspark/openapi-core'
|