-
Notifications
You must be signed in to change notification settings - Fork 14
CLOUDP-284437: Add Spectral rule to ensure operationId uses camelcase #284
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
description: operationId should be camelCased. | ||
given: "$.paths[*]..operationId" | ||
severity: error | ||
then: |
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.
can you add a message like
then: | |
message: "Operation ID should be camelCase: {{property}}." | |
then: |
so we can see what the current value is?
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.
good point! I will update it
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.
I updated to use {{value}}
which gives the message 40221:26 error xgen-docs-operationId-camel-case Operation ID should be camelCase: grantMongoDBEmployeeAccess.
Using {{property}}
does not give a useful message 40221:26 error xgen-docs-operationId-camel-case Operation ID should be camelCase: operationId.
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.
perfect I wasn't sure what the right interpolation was, thanks for fixing it
Proposed changes
Jira ticket: CLOUDP-284437