-
Notifications
You must be signed in to change notification settings - Fork 91
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(new-rule): ibm-schema-naming-convention #627
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dpopp07
commented
Sep 7, 2023
dpopp07
commented
Sep 7, 2023
dpopp07
commented
Sep 7, 2023
dpopp07
commented
Sep 7, 2023
dpopp07
commented
Sep 7, 2023
Adds a new rule that enforces the schema naming guidelines in the API Handbook. Specifically, the new rule checks for correctly named collection schemas, resource collection element schemas, creation/replacement schemas, and patch schemas against the name of the associated canonical schema. Signed-off-by: Dustin Popp <[email protected]>
dpopp07
force-pushed
the
dp/schema-naming-conventions
branch
from
September 7, 2023 19:24
14b1671
to
ec5b8c0
Compare
padamstx
reviewed
Sep 8, 2023
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.
Overall looks great. Just had a few questions to consider
packages/ruleset/src/utils/get-resource-specific-sibling-path.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Phil Adams <[email protected]> Signed-off-by: Dustin Popp <[email protected]>
dpopp07
force-pushed
the
dp/schema-naming-conventions
branch
from
September 8, 2023 21:43
702f7cb
to
ac78dfe
Compare
All comments have been addressed |
padamstx
approved these changes
Sep 8, 2023
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
dpopp07
added a commit
that referenced
this pull request
Oct 1, 2023
Adds a new rule that enforces the schema naming guidelines in the API Handbook. Specifically, the new rule checks for correctly named collection schemas, resource collection element schemas, creation/replacement schemas, and patch schemas against the name of the associated canonical schema. Signed-off-by: Dustin Popp <[email protected]> Co-authored-by: Phil Adams <[email protected]>
dpopp07
added a commit
that referenced
this pull request
Oct 2, 2023
Adds a new rule that enforces the schema naming guidelines in the API Handbook. Specifically, the new rule checks for correctly named collection schemas, resource collection element schemas, creation/replacement schemas, and patch schemas against the name of the associated canonical schema. There is one expection for creation/replacement schemas The Handbook states: "There is an important exception to this guidance if the nature of an API is to provide clients with full control over entire resources, with no system-defined or immutable aspects. For such APIs, the canonical schema itself SHOULD be used in requests to create or replace a resource." The rule allows for the name of the canonical schema to be used for resource-oriented POSTs and PUTs. Signed-off-by: Dustin Popp <[email protected]> Co-authored-by: Phil Adams <[email protected]>
dpopp07
added a commit
that referenced
this pull request
Oct 2, 2023
Adds a new rule that enforces the schema naming guidelines in the API Handbook. Specifically, the new rule checks for correctly named collection schemas, resource collection element schemas, creation/replacement schemas, and patch schemas against the name of the associated canonical schema. There is one expection for creation/replacement schemas The Handbook states: "There is an important exception to this guidance if the nature of an API is to provide clients with full control over entire resources, with no system-defined or immutable aspects. For such APIs, the canonical schema itself SHOULD be used in requests to create or replace a resource." The rule allows for the name of the canonical schema to be used for resource-oriented POSTs and PUTs. Signed-off-by: Dustin Popp <[email protected]> Co-authored-by: Phil Adams <[email protected]>
ibm-devx-sdk
pushed a commit
that referenced
this pull request
Oct 2, 2023
# @ibm-cloud/openapi-ruleset [1.14.0](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/[email protected]...@ibm-cloud/[email protected]) (2023-10-02) ### Features * **new-rule:** ibm-api-symmetry ([#634](#634)) ([7033dbd](7033dbd)) * **new-rule:** ibm-schema-casing-convention ([#628](#628)) ([9b5dc92](9b5dc92)) * **new-rule:** ibm-schema-naming-convention ([#627](#627)) ([b82f66a](b82f66a))
ibm-devx-sdk
pushed a commit
that referenced
this pull request
Oct 2, 2023
# ibm-openapi-validator [1.14.0](https://github.com/IBM/openapi-validator/compare/[email protected]@1.14.0) (2023-10-02) ### Features * **new-rule:** ibm-schema-naming-convention ([#627](#627)) ([b82f66a](b82f66a)) ### Dependencies * **@ibm-cloud/openapi-ruleset:** upgraded to 1.14.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new rule that enforces the schema naming guidelines in the API Handbook.
Specifically, the new rule checks for correctly named collection schemas, resource collection element schemas, creation/replacement schemas, and patch schemas against the name of the associated canonical schema.
PR summary
PR Checklist
General checklist
Please make sure that your PR fulfills the following requirements:
Checklist for adding a new validation rule: