Skip to content

string_enum: OpenAPI encoding is not canonical

The OpenAPI generated for string_enum prints the enumeration tags in an unpredictable order. This may cause confusing issues when printing the diffs of nearly-identical schemas. See for example this diff.

As enum tags represent sets, it should be fine to print the tags in lexicographic order: https://spec.openapis.org/oas/v3.1.0#fixed-fields-4

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information