[BUG][TYPESCRIPT-AXIOS] Typescript-axios generator creates the wrong return type and encoding
I used this official OPA openapi to generate an a client for OPA using typescript-axios
I ran the following to generate the code
npx @openapitools/openapi-generator-cli generate -i openapi.yaml -g typescript-axios -o gen -penumUnknownDefaultCase=true -pnpmName=my-npm-package -pnpmVersion=0.0.1 -pnullSafeAdditionalProps=true -pwithNodeImports=true -pwithSeparateModelsAndApi=true -pmodelPackage=models -papiPackage=api
I also tried with latest cli docker to make sure that it isn't something related to the npx version
- One weird thing is that the Data Api
getDocumentWithPath
function was generated withDeletePolicyModule200Response
which is definitely not the expected case. - The path param in
getDocumentWithPath
is getting encoded so I can't reach nested paths (e.g/firstPath/secondPath
) since it is trying to get tofirstPath%2FsecondPath
that doesn't exist, which makes a lot of sense. Maybe there's a possibility to utilize the theurl
field in the axios config argument that is passed as the last param of the function