-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
Support AsyncAPI linting using Spectral #3387
Comments
@pjungermann would it just work if we update default config file shipped with MegaLinter ? If not, we could also update the doc to tell to override the config file name using variable OPENAPI_SPECTRAL_CONFIG_FILE Would you like to make a PR ? :) |
@nvuillam updating the config file would be a viable option (+ updating docs).
Based on the setup for other linters, I assumed there might be a preference for I'm willing to provide a PR. Before, I wanted to find out the right solution for this project. |
@pjungermann I would prefer the option where OPENAPI_SPECTRAL can handle sync + async APIs ^^ Ypu could rename the default config file as extends:
- spectral:asyncapi
- spectral:oas Semantically, OPENAPI_SPECTRAL would analyze openapi + asyncapi , but i wouldn't like to create a new descriptor for each new capability Another solution might be to deprecate OPENAPI descriptor and create a new descriptor API that would contain API_SPECTRAL, but in my opinion that's not mandatory |
I like the idea of changing OPENAPI to API as linter grouping 👍 I will have a look at preparing the necessary changes. |
@pjungermann great :) In order to ensure compatibility until the next major release (usually once a year), please do not remove the openapi descriptor, just add |
This issue has been automatically marked as stale because it has not had recent activity. If you think this issue should stay open, please remove the |
not stale |
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: oxsecurity#3387
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: oxsecurity#3387
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: oxsecurity#3387
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: oxsecurity#3387
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: oxsecurity#3387
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: oxsecurity#3387
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: oxsecurity#3387
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: oxsecurity#3387
…ort (#3474) 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
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when […]
Currently, AsyncAPI definitions are not ignored/not linted by Spectral.
Describe the solution you'd like
A clear and concise description of what you want to happen.
There is a linter OPENAPI_SPECTRAL with the config file
.openapirc.yml
.The default file shipped with MegaLinter contains
However, Spectral supports OpenAPI and AsyncAPI.
could be used to validate both.
The recommended naming for the config file is
.spectral.yaml
according to their documentation.However, the linter is called
OPENAPI_SPECTRAL
which sets the scope to OpenAPI only.Similar to others like prettier, we could add an additional linter
ASYNCAPI_SPECTRAL
.Either with a config file
.asyncapirc.yml
or using a shared config file.spectral.yaml
as default.Changing the default config filename would be fine as long as there is some backward compatibility
to custom
.openapirc.yml
files with repos.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: