-
Couldn't load subscription status.
- Fork 14
CLOUDP-272001: IPA-112: Disallow usages of project in the api #566
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
| then: | ||
| function: 'IPA112AvoidProjectFieldNames' | ||
| functionOptions: | ||
| prohibitedFieldName: 'project' |
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.
[Nit] can we have this as array? I can see more prohibited names in future
| 'x-xgen-IPA-exception': { | ||
| 'xgen-IPA-112-avoid-project-field-names': 'reason', | ||
| }, |
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.
Q: Is it possible to have exceptions on properties? IIRC when we did the enum rule we had to have the exception on the 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.
For enum one, we have the exceptions on the property level. Ex:
"roleName": {
"description": "Human-readable label that identifies a group of privileges assigned to a database user. This value can either be a built-in role or a custom role.",
"enum": [
"atlasAdmin",
...
],
"type": "string",
"x-xgen-IPA-exception": {
"xgen-IPA-123-enum-values-must-be-upper-snake-case": "Schema predates IPA validation"
}
}
which is equivalent of Schema annotation for the property itself on Java. I kept the same level for exception. Are you asking keeping the exception level for Schema annotation level but for the schema level?
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.
Ah thanks for clarifying, I misremembered and thought it was on the schema level higher up. 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.
(Prettier failure, otherwise LGTM)
|
@yelizhenden-mdb Feel free to setup commit hook. It will sort out prettier during commit |
Proposed changes
Jira ticket: CLOUDP-272001
15 violations found
Checklist
Changes to Spectral
Further comments