Nested type declaration in separate file causes specs to fail to load
Hello,
If the yaml spec is splitted in 2 files as follows:
- api.yaml: paths that refers to
models.yaml#components/schemas/XXX - models.yaml: components that re sub component
#components/schemas/YYY
At startup the GetSwagger() function returns an error that complains that #components/schemas/YYY is not found.
You'll find an example to reproduce this behavior here: https://github.com/ydarma/oapi-codegen-subtype
Thancks
Do you have this problem all the time or does it regenerating the sources a few times makes it work?
Hello, I remember that the problem always happened. It is an old thread, I remember that we decided to work this around and to not use a separate model specification. Recently on another project we went with a separate model file with nested components and now it works. Maybe the problem has been fixed since.