-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UUID needed? #8
Comments
I guess we'd have to balance between ease of use, varied support of the format and risk of logic errors. Support of uuid format varies
https://spec.openapis.org/oas/v3.0.3#data-types But support has been added to OpenAPI 3.1 (via newer JSON Schema version), though it makes the whole At the time when we defined UUID in openapi-common, versions of openapi-generator or swagger-codegen didn't map it to risk on logic errors e.g. DB lookup in a varchar column may fail inadvertedly due to casing mismatch, or by java/javascript string comparison (already encountered this in the wild). https://www.belgif.be/specification/rest/api-guide/#rule-id-design
ISO/RFC Standard https://datatracker.ietf.org/doc/html/rfc4122#section-3 The hexadecimal values "a" through "f" are output as https://www.iso.org/obp/ui/fr/#iso:std:iso-iec:9834:-8:ed-3:v1:en 6.5.4 Software generating the hexadecimal representation of a UUID shall not use upper case letters. NOTE – It is recommended that the hexadecimal representation used in all human-readable formats be restricted to lower-case letters. Software processing this representation is, however, required to accept both upper and lower case letters as specified in 6.5.2. For Java, the UUID::toString() javadoc allows both upper- and lowercase so its not fully compliant with the ISO/RFC. We could add |
Why do we have UUID in openapi-common?
Why isn't it configured as type: string / format: uuid ?
Is this really needed for standardizing on exclusively lowercase UUID values?
The annoyance is that it generates
java.lang.String
instead ofjava.util.UUID
unless you configure an import mapper.The text was updated successfully, but these errors were encountered: