You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ogen --version
ogen version v1.1.1-0.20240428023010-b41f78c97d17 (built with go1.21.5) darwin/arm64
Can this issue be reproduced with the latest version?
Yes
What did you do?
Take the sample petstore.yaml
Remove all of the paths. I can do this by eliminating the paths: section entirely (compliant with openapi 3.1 IIRC), or by replacing it with paths: {}
ogen ./petstore.yaml
What did you expect to see?
Defined types
What did you see instead?
The oas_schemas_gen.go file is essentially empty:
// Code generated by ogen, DO NOT EDIT.package api
Additional helpful information
I think this actually may comply with the spec, which says:
All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.
However, this makes it difficult to define reusable components. For example, I might want to hold my schemas in one file schemas.yaml, and then reference that file from different openapi implementations.
I might even use just the schemas.yaml alone as a way to describe reusable content from which I can generate go code and rust and js etc.
Note: This might not actually be a "bug", based on the above, but it seemed to fit the options most closely. If I erred, please feel free to recategorize.
The text was updated successfully, but these errors were encountered:
What version of ogen are you using?
Can this issue be reproduced with the latest version?
Yes
What did you do?
paths
. I can do this by eliminating thepaths:
section entirely (compliant with openapi 3.1 IIRC), or by replacing it withpaths: {}
ogen ./petstore.yaml
What did you expect to see?
Defined types
What did you see instead?
The
oas_schemas_gen.go
file is essentially empty:Additional helpful information
I think this actually may comply with the spec, which says:
However, this makes it difficult to define reusable components. For example, I might want to hold my schemas in one file
schemas.yaml
, and then reference that file from different openapi implementations.I might even use just the
schemas.yaml
alone as a way to describe reusable content from which I can generate go code and rust and js etc.Note: This might not actually be a "bug", based on the above, but it seemed to fit the options most closely. If I erred, please feel free to recategorize.
The text was updated successfully, but these errors were encountered: