Skip to content

Conversation

@lovisaberggren
Copy link
Collaborator

@lovisaberggren lovisaberggren commented Feb 24, 2025

Proposed changes

Adds a script to generate a README file in tools/spectral/ipa/rulesets. The file shows tables of all available rules (based on the ipa-spectral.yaml ruleset), and can be automatically updated when a new rule is added to the IPA validation by running:

npm run gen-ipa-docs

Also, a test is added to fail if the file is not updated, it looks like this when failed:

Screenshot 2025-02-24 at 17 32 19

Jira ticket: CLOUDP-301224

@lovisaberggren lovisaberggren marked this pull request as ready for review February 24, 2025 18:08
@lovisaberggren lovisaberggren requested a review from a team as a code owner February 24, 2025 18:08

| Rule Name | Description | Severity |
| ---------------------------------------------- | ------------------------------------------------------------------------- | -------- |
| xgen-IPA-109-custom-method-must-be-GET-or-POST | The HTTP method for custom methods must be GET or POST. http://go/ipa/109 | warn |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] Golink to internal site. Might be better to have actions self explanatory. Then downstream can link upstream instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO I think it's nice to have a link to the IPA itself for each rule, as it will show up when a validation fails. We do use golinks pretty widely in the openapi repo

Copy link
Member

@wtrocki wtrocki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you

Copy link
Collaborator

@yelizhenden-mdb yelizhenden-mdb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@lovisaberggren lovisaberggren merged commit 32d5015 into main Feb 25, 2025
13 checks passed
@lovisaberggren lovisaberggren deleted the CLOUDP-301224 branch February 25, 2025 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants