Add OpenAPI to disabling-linters doc

This commit is contained in:
Justin Kalland 2020-06-25 12:21:11 +02:00
parent 37f6828d1e
commit 79671724a0
2 changed files with 31 additions and 0 deletions

9
.github/linters/.openapirc.yml vendored Normal file
View file

@ -0,0 +1,9 @@
---
##########################
##########################
## OpenAPI Linter rules ##
##########################
##########################
extends: spectral:oas

View file

@ -24,6 +24,7 @@ Below are examples and documentation for each language and the various methods t
- [CSS](#stylelint)
- [ENV](#dotenv-linter)
- [Kotlin](#kotlin)
- [OpenAPI](#openapi)
<!-- toc -->
@ -607,3 +608,24 @@ import package.b.*
### ktlint disable entire file
- There is currently **No** way to disable rules inline of the file(s)
--------------------------------------------------------------------------------
## OpenAPI
- [spectral](https://github.com/stoplightio/spectral)
### OpenAPI Config file
- `.github/linters/.openapirc.yml`
- You can add, extend, and disable rules
- Documentation at [Spectral Custom Rulesets](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/guides/4-custom-rulesets.md)
- File should be located at: `.github/linters/.openapirc.yml`
### OpenAPI disable single line
- There is currently **No** way to disable rules inline of the file(s)
### OpenAPI disable code block
- There is currently **No** way to disable rules inline of the file(s)
### OpenAPI disable entire file
- There is currently **No** way to disable rules inline of the file(s)
- However, you can make [rule exceptions](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/guides/6-exceptions.md?srn=gh/stoplightio/spectral/docs/guides/6-exceptions.md) in the config for individual file(s).