Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions tools/spectral/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
# Spectral updates
# MongoDB API Spectral Validation

If adding new rules or updating `.spectral.yaml` overall, the validations will instantly get updated across the `mongodb/openapi` repository.
A set of custom validator rules for the MongoDB Atlas Programmatic API, adhering to API Standards (IPA)
## Structure

Please perform the following steps:
- **/ipa** - Contains custom Spectral rulesets covering MongoDB API standards.
- **/.spectral.yaml** - Contains validators not specifically related to API standards.

1. Open a `mongodb/openapi` PR with the changes to `tools/spectral/.spectral.yaml`
2. Validate that the new Spectral lint checks pass
3. Review and merge the PR
### Custom Rules

**Note:** For MongoDB engineers, please review http://go/openapi-spectral-updates.
For a complete list of implemented rules, please refer to the [Ruleset Documentation](./ipa/rulesets/README.md).

### Updating the .spectral.yaml Ruleset

When adding new rules or updating the `.spectral.yaml` file, the validations will automatically update across the `mongodb/openapi` repository. Follow these steps:

1. Open a pull request (PR) in the `mongodb/openapi` repository with changes to `tools/spectral/.spectral.yaml`.
2. Ensure that the new Spectral lint checks pass.
3. Review and merge the PR.

### Internal Documentation

- Refer to the [IPA Standards](http://go/ipa) for specific rules.
- Visit the [Spectral Wiki](http://go/openapi-spectral-updates) for additional information.
Loading