-
-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add API descriptor with API_SPECTRAL with AsyncAPI/OpenAPI support
Add API descriptor as modified copy of the OPENAPI descriptor. Deprecate the contained linter OPENAPI_SPECTRAL. Add `.spectral.yaml` as default config file to `TEMPLATE/` as modified copy of `.openapirc.yml` with rulesets for AsyncAPI and OpenAPI (previously, only OpenAPI). Closes: #3387
- Loading branch information
1 parent
cee23e5
commit b6603a4
Showing
76 changed files
with
797 additions
and
65 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -519,6 +519,7 @@ | |
"asdict", | ||
"ashokm", | ||
"assignuser", | ||
"asyncapi", | ||
"autocorrect", | ||
"autocrlf", | ||
"autofix", | ||
|
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
|
||
####################################### | ||
####################################### | ||
## AsyncAPI and OpenAPI Linter rules ## | ||
####################################### | ||
####################################### | ||
|
||
extends: | ||
- spectral:asyncapi | ||
- spectral:oas |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: API linters in MegaLinter | ||
description: spectral is available to analyze API files in MegaLinter | ||
--- | ||
<!-- markdownlint-disable MD003 MD020 MD033 MD041 --> | ||
<!-- @generated by .automation/build.py, please don't update manually --> | ||
<!-- Instead, update descriptor file at https://github.com/oxsecurity/megalinter/tree/main/megalinter/descriptors/api.yml --> | ||
# API | ||
|
||
## Linters | ||
|
||
| Linter | Additional | | ||
|-----------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------| | ||
| [**spectral**](api_spectral.md)<br/>[_API_SPECTRAL_](api_spectral.md) | [![GitHub stars](https://img.shields.io/github/stars/stoplightio/spectral?cacheSeconds=3600)](https://github.com/stoplightio/spectral) | | ||
|
||
## Linted files | ||
|
||
- File extensions: | ||
- `.yml` | ||
- `.yaml` | ||
- `.json` | ||
|
||
- Detected file content: | ||
- `"asyncapi":` | ||
- `"openapi":` | ||
- `"swagger":` | ||
- `asyncapi:` | ||
- `openapi:` | ||
- `swagger:` | ||
|
||
## Configuration in MegaLinter | ||
|
||
| Variable | Description | Default value | | ||
|--------------------------|-------------------------------------------------|---------------| | ||
| API_PRE_COMMANDS | List of bash commands to run before the linters | None | | ||
| API_POST_COMMANDS | List of bash commands to run after the linters | None | | ||
| API_FILTER_REGEX_INCLUDE | Custom regex including filter | | | ||
| API_FILTER_REGEX_EXCLUDE | Custom regex excluding filter | | | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
Oops, something went wrong.