-
Notifications
You must be signed in to change notification settings - Fork 17
Add support for sets with custom OAS format field #25
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎸
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🚀
I presume that uniqueItems will be treated via validation over set handling? Technically, you can have an ordered list with unique items. Can create the coverage issue if you agree.
I actually do not remember coming across Yeah as you mentioned JSON schema defines arrays as "ordered", however I do see some tools that have made the decision to treat OpenAPI's
So if we want to use Also related: json-schema-org/json-schema-spec#1197 |
After chatting in our sync today, the plan is to keep the custom JSON schema does not have a concept of unordered arrays, so we'd be making a technically invalid assumption that |
Opened #26 as follow-up |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
RFC: https://docs.google.com/document/d/15PJokoO7mkMYsc2Z7DN1copykQgH5Kt7nnzb-mcNcTo/edit#heading=h.j9b2jaknykw
This PR adds support for:
SetNestedAttribute
SetAttribute
SetType
(only possible under a collection type currently,ListAttribute
orSetAttribute
)I also added documentation to the design doc and added unit/integration tests to cover since this is a custom field that is not present in existing OAS tests.
I wrote the integration tests first, and you can see the diff (
list
->set
) after implementation here: bc38b31#diff-d0cc596b04078cce090146b7654ac6f32f518ba08c68becbfcb93a07257eefdbNotes
codegen-spec
package to the latest commit