Skip to content

Commit

Permalink
[feat] Bump openapi-types to fix peer dep complaint from @apidevtools…
Browse files Browse the repository at this point in the history
…/swagger-parser
  • Loading branch information
simplesmiler committed Jul 29, 2022
1 parent 9cc34d7 commit ab69bff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taxios-generate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"lodash": "^4.17.19",
"minimist": "^1.2.5",
"mkdirp": "^1.0.4",
"openapi-types": "^1.3.5",
"openapi-types": "^12.0.0",
"swagger2openapi": "^6.2.1",
"ts-morph": "^7.1.3"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/taxios-generate/src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ async function main(): Promise<number> {
type: Writers.objectType({
properties: await Promise.all(
Object.entries(openApiDocument.paths).map(async ([route, pathItem]) => {
if (!pathItem) {
throw new Error(`Unexpected situation, pathItem of ${route} is missing`);
}
const commonParameters = resolveRefArray(openApiParser, pathItem.parameters) || []; // @NOTE: Url fragment params
return {
name: JSON.stringify(route), // @NOTE: E.g. PetStore.Api['routes']['/users/{id}']
Expand Down

0 comments on commit ab69bff

Please sign in to comment.