Should we add test cases asserting the validity of "controversial" or "questionable" practices? #4459
duncanbeevers
started this conversation in
Enhancements
Replies: 1 comment 3 replies
-
My main concern here is the effort vs value trade-off of doing this work. If a volunteer wants to do this and can do it without taking up a lot of the time of people who would otherwise be working on the spec, then that's great. But if it's going to take a lot of back and forth about minutia like the "'#'-in-path-templates" question did, I'm against it (as the person who is most likely to get asked about minutia, especially involving URIs). |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
🗣️ Discussion
Some PRs proposing changes to the validation schema enforce constraints not specified in the OpenAPI specification. Such changes are considered linty.
Such changes are typically dismissed after maintainer review.
Some discussion end in "well, it's allowed by the spec".
This discussion is intended to shorten the feedback loop between proposal-which-will-not-be-accepted to proposal-which-may-be-accepted.
Instead of rejecting such PRs out-of-hand, I propose we instead open counter-PRs which add test cases explicitly asserting the validity of such controversial cases.
This will help to steer future contributors away from anti-patterns which are not explicitly disallowed by the specification, and provide specific points of adjustment should the specification change with regards to these anti-pattern test cases.
This PR seeks to add tests which assert certain anti-patterns are explicitly allowable, despite their incongruousness or meaninglessness.
The intention is not to lock the schema into these behaviors, but to guide contributors towards areas where their updates make sense (custom linters, etc…) rather than rejecting contributor PRs on first principles.
Beta Was this translation helpful? Give feedback.
All reactions