Closed nils4cosee closed 11 months ago
The workaround is to preprocess the openapi-spec using the json-refs package. I use its filter
-option to exclude references to #/components/schema
from being resolved.
@anttiviljami
related bug in dtsgenerator was fixed in v3.12.1
But I know that we use custom modification of dtsgenerator v2, so can you try to update that fork?
Testing with ^7.1.3
this appears to still be an issue. I can confirm that @nknapp's solution works as expected, although it'd be ideal if this step wasn't required.
Something like this works:
"generate": "json-refs resolve openapi.spec.yaml > openapi.spec.resolved.yaml && typegen openapi.spec.resolved.yaml > ./src/shared/client/index.ts"
@ruaanvds This is a great library and it has helped us a lot in the past. But since this issue, I went with oazapfts instead. I also wrote a small blog post about it.
dear @nils4cosee, this workaround was great! this package handles it as of >=7.4.0
correctly.
This is fixed as of openapi-client-axios-typegen@7.4.1
First of all, thank you for this project. Out of all the projects I have seen so far, this is the one that suites us best and we are currently trying to use it in our project.
My current problem is that
typegen
does not resolve $ref-objects that are parameters.Example input:
Notice the
UnknownParamsObject
in the the output oftypegen
.I guess I will look for a workaround in the short term, but it would be great if this was fixed.