Open lukeggchapman opened 4 years ago
Just ran a test and it's working for your example-pet-api.openapi.yml
test file, will investigate further.
It should definitely work. Can you supply a counter example? https://github.com/anttiviljami/openapi-client-axios/blob/master/src/typegen/typegen.ts#L68
It might be struggling to find my schema as it's nested in content.
{
// ...
"parameters": [
{
"name": "organizationId",
"in": "path",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "filter",
"in": "query",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Inventory.Filter"
}
}
}
}
]
// ...
}
I will investigate further.
@lukeggchapman I think you might've hit on something here. This might be a problem in the upstream https://github.com/horiuchi/dtsgenerator. I think having the content
property in a parameter object is not supported yet. Care to open an issue there?
In #5 the change was made to allow for all param types to be used in the first argument for an operation, when a operation has both query and path params the typegen only uses the PathParameters.