Per #157 this is kind of a feature request, but discussions aren't turned on.
When I run a document through deference or upgrade, I get the OpenAPI.Document type. This type contains a bunch of union fields, like .paths is a union between all possible paths types:
It'd be ideal to:
Have this type be a discriminated union based on the value of .openapi
Have upgrade return a v3.1 type, because it should always be upgrading to that
As it is, it's tricky to work with the types because they are too flexible.
What happens?
Per #157 this is kind of a feature request, but discussions aren't turned on.
When I run a document through
deference
orupgrade
, I get theOpenAPI.Document
type. This type contains a bunch of union fields, like.paths
is a union between all possible paths types:It'd be ideal to:
.openapi
upgrade
return a v3.1 type, because it should always be upgrading to thatAs it is, it's tricky to work with the types because they are too flexible.
What did you expect to happen?
These types would be discriminated
How can we reproduce the issue?
…
Swagger/OpenAPI Example
http://