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
Can this issue be reproduced with the latest version?
yes
What did you do?
Attempting to generate code from an OpenAPI 3.1 json file (generated from FastAPI) using
go:generate go run github.com/ogen-go/ogen/cmd/ogen --target openapi_internal -package internalapi --clean http://localhost:8000/_internal/v1/openapi.json
What did you expect to see?
An error that might help me find what is wrong with my open api spec or configuration
What did you see instead?
A more general error that I can't seem to narrow down what is wrong: openapi.json:1:933 -> invalid schema.type:style:explode combination: ("null":"form":true) followed by a dump of my spec. Eg:
at character 933 there is a null type [{"type":"integer"},{"type":"null"}],"title":"Token"}}] which seems to be ok on another spec that I have
any clues to narrow down what's going wrong would be great.
The text was updated successfully, but these errors were encountered:
It seems JSON spec you are using is minimized and does not contain any newlines. Try to format spec before running ogen.
invalid schema.type:style:explode combination: ("null":"form":true) says that spec have a parameter or urlencoded form field of type null. ogen does not support null parameters, since they are not properly defined by Open API spec.
Thanks, the newlines helped to track it down.
It does indeed seem to be because of the null type on a parameter which as you say is unsupported.
Nullable params doesn't appear to be much of a topic outside of that issue - so i guess people ether don't use them or its assumed there is some handling of null values (the linked rfc appears to indicate this). I guess this would be nice as its probably common for optional params to get a 'null' type
What version of ogen are you using?
github.com/ogen-go/ogen v1.4.0
Can this issue be reproduced with the latest version?
yes
What did you do?
Attempting to generate code from an OpenAPI 3.1 json file (generated from FastAPI) using
What did you expect to see?
An error that might help me find what is wrong with my open api spec or configuration
What did you see instead?
A more general error that I can't seem to narrow down what is wrong:
openapi.json:1:933 -> invalid schema.type:style:explode combination: ("null":"form":true)
followed by a dump of my spec. Eg:at character 933 there is a null type
[{"type":"integer"},{"type":"null"}],"title":"Token"}}]
which seems to be ok on another spec that I haveany clues to narrow down what's going wrong would be great.
The text was updated successfully, but these errors were encountered: