-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
How to describe dynamic keys in response schema #1505
Comments
@satkunas this is not currently possible in OpenAPI's Schema Object. In normal JSON Schema you could use |
See also #1443 (alternate schema languages) |
Hello! This is a very clear and helpful explanation, thank you! I was curious if there are any plans to move to JSON schema draft-06 or later? Cheers. |
@tylermauthe @satkunas OpenAPI 3.1 is moving to the latest JSON Schema draft (#1977), so this will be possible with regular JSON Schema features in that version. There's no way to do it in 3.0.x, and none can be added due to the patch release compatibility requirements. Since it's fixed in 3.1 and can't be fixed in earlier versions, I'm going to go ahead and close this. |
How could the following response schema properties be described in YAML?
Both the network address key
192.168.0.0/24
and each of the member key(s)10:1f:74:b2:f6:a5
are dynamic and must follow a specific regular expression pattern. I've found documentation on how to define regular expression patterns for the value, but there's no details on how to define a pattern for the key.The text was updated successfully, but these errors were encountered: