Replies: 1 comment
-
|
A colleague of mine added some context about the issue. First of all, Also,
However, in OAI/OpenAPI-Specification#3182, So it looks like using @danielgtaylor WDYT? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there!
I've recently faced an issue with downgrading the Huma-generated OAS spec to 3.0.1.
I have a custom type
type MyID uuid.UUID( whereuuid.UUIDis google one )Huma generates a schema that has
contentEncoding: base64for such type in 3.1.0When downgrading to
3.0.1,it's becomingformat: base64.The problem is that
format: base64is not mentioned in the spec ( I couldn't find it ), and for example,kin-openapiraises an error for such format https://github.com/getkin/kin-openapi/blob/master/openapi3/schema.go#L1017I looked at it here: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.1.md#data-types
At the same time, there is a migration (
3.0 -> 3.1) guide where this is mentioned as the correct format: https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0 ( from here )My questions are:
formatforcontentEncoding: base64( in 3.0.* )?format: byte, maybe? (here: https://github.com/danielgtaylor/huma/blob/v2.19.0/openapi.go#L1601)Thank you!
Beta Was this translation helpful? Give feedback.
All reactions