-
Notifications
You must be signed in to change notification settings - Fork 398
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
feat: add new rule to prefer single resources (#764) #785
Conversation
Signed-off-by: tkrop <tronje.krop@zalando.de>
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.
A few comments :)
chapters/json-guidelines.adoc
Outdated
@@ -32,6 +31,27 @@ As a consequence, a JSON payload must | |||
* contain only {RFC-7493}#section-2.3[unique member names] (no duplicate | |||
names). | |||
|
|||
|
|||
[#252] | |||
== {SHOULD} design single resource for reading and writing |
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.
Resource might be ambiguous here, how about schema? That seems to be what OpenAPI calls it and also where you'd usually define these (under components/schemas
)
== {SHOULD} design single resource for reading and writing | |
== {SHOULD} design single schema for reading and writing |
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.
How about resource schema
?
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.
Yeah that also works!
Signed-off-by: tkrop <tronje.krop@zalando.de>
👍 |
2 similar comments
👍 |
👍 |
|
||
**Note:** A resource with property marked `readOnly` in the API according to | ||
the {json-schema-validation}#rfc.section.9.4[JSON schema validation] may be | ||
ignored or rejected by a server. Both are in line with the idea behind <<#109, |
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.
ignored or rejected by a server. Both are in line with the idea behind <<#109, | |
ignored or rejected by a server. Both are in line with the idea behind | |
<<#109, the compatibility guidance>>, however, we suggest to document when | |
rejecting to prevent client side surprises. |
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.
What is the reason. The line length is 79
?
This pull request adds a new single resource preference rule according to proposal defined in #764.
fixes #764.