openapi-typescript
Advanced tools
Comparing version 6.7.3 to 6.7.4
# openapi-typescript | ||
## 6.7.4 | ||
### Patch Changes | ||
- [#1509](https://github.com/drwpow/openapi-typescript/pull/1509) [`747611bcd0d056d5027841f985aed0aefcf6b63d`](https://github.com/drwpow/openapi-typescript/commit/747611bcd0d056d5027841f985aed0aefcf6b63d) Thanks [@drwpow](https://github.com/drwpow)! - Fix missing params when they have same name, different location | ||
## 6.7.3 | ||
@@ -4,0 +10,0 @@ |
@@ -16,3 +16,3 @@ import { escObjKey, indent, tsOptionalProperty, tsReadonly } from "../utils.js"; | ||
output.push(indent(`${key}: ${transformParameterObject(node, { | ||
path: `${path}/${node.name}`, | ||
path: `${path}/${node.in}/${node.name}`, | ||
ctx: { ...ctx, indentLv: ctx.indentLv + 1 }, | ||
@@ -19,0 +19,0 @@ })};`, ctx.indentLv)); |
@@ -18,3 +18,3 @@ import { escStr, getSchemaObjectComment, indent } from "../utils.js"; | ||
for (const parameter of [...(pathItem.parameters ?? []), ...(operationObject.parameters ?? [])]) { | ||
keyedParameters["$ref" in parameter ? parameter.$ref : parameter.name] = parameter; | ||
keyedParameters["$ref" in parameter ? parameter.$ref : `${parameter.in}/${parameter.name}`] = parameter; | ||
} | ||
@@ -21,0 +21,0 @@ } |
{ | ||
"name": "openapi-typescript", | ||
"description": "Convert OpenAPI 3.0 & 3.1 schemas to TypeScript", | ||
"version": "6.7.3", | ||
"version": "6.7.4", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Drew Powers", |
@@ -23,3 +23,3 @@ import type { GlobalContext, ParameterObject, ReferenceObject } from "../types.js"; | ||
`${key}: ${transformParameterObject(node, { | ||
path: `${path}/${node.name}`, | ||
path: `${path}/${node.in}/${node.name}`, | ||
ctx: { ...ctx, indentLv: ctx.indentLv + 1 }, | ||
@@ -26,0 +26,0 @@ })};`, |
@@ -31,3 +31,3 @@ import type { GlobalContext, ParameterObject, PathItemObject, ReferenceObject } from "../types.js"; | ||
// note: the actual key doesn’t matter here, as long as it can match between PathItem and OperationObject | ||
keyedParameters["$ref" in parameter ? parameter.$ref : parameter.name] = parameter; | ||
keyedParameters["$ref" in parameter ? parameter.$ref : `${parameter.in}/${parameter.name}`] = parameter; | ||
} | ||
@@ -34,0 +34,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
416089