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
-
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.UUID
is google one )Huma generates a schema that has
contentEncoding: base64
for such type in 3.1.0When downgrading to
3.0.1,
it's becomingformat: base64
.The problem is that
format: base64
is not mentioned in the spec ( I couldn't find it ), and for example,kin-openapi
raises 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:
format
forcontentEncoding: 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