You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With OpenAPI 3.0, there is no way to include map key type information in the schema. However, this changes with OpenAPI 3.1, where keys are still assumed as strings (which is unfortunate but understandable since it targets JSON), but can be specified as a pattern.
I thought about limiting the accepted key types to some known ones that we can provide a pattern for, but I don't really like that idea. So maybe this will not be possible before (a) the openapiv3 crate (or another, similar crate) adds support for 3.1 and (b) Rust stabilises specialisation, so we can add patterns for known types but keep support for "unknown" types.
The text was updated successfully, but these errors were encountered:
With OpenAPI 3.0, there is no way to include map key type information in the schema. However, this changes with OpenAPI 3.1, where keys are still assumed as strings (which is unfortunate but understandable since it targets JSON), but can be specified as a pattern.
I thought about limiting the accepted key types to some known ones that we can provide a pattern for, but I don't really like that idea. So maybe this will not be possible before (a) the
openapiv3
crate (or another, similar crate) adds support for 3.1 and (b) Rust stabilises specialisation, so we can add patterns for known types but keep support for "unknown" types.The text was updated successfully, but these errors were encountered: