Migrate speccy to spectral in OpenAPI linting. (#10351)
This commit is contained in:
Родитель
f7fad67df3
Коммит
5b6464f489
|
@ -209,9 +209,9 @@ repos:
|
|||
entry: koalaman/shellcheck:stable -x -a
|
||||
files: ^breeze$|^breeze-complete$|\.sh$|^hooks/build$|^hooks/push$|\.bash$|\.bats$
|
||||
- id: lint-openapi
|
||||
name: Lint OpenAPI using speccy
|
||||
name: Lint OpenAPI using spectral
|
||||
language: docker_image
|
||||
entry: wework/speccy lint -r default -r ./scripts/ci/speccy_rules/connexion.yml
|
||||
entry: stoplight/spectral lint -r ./scripts/ci/spectral_rules/connexion.yml
|
||||
files: ^airflow/api_connexion/openapi/
|
||||
- id: lint-openapi
|
||||
name: Lint OpenAPI using openapi-spec-validator
|
||||
|
|
|
@ -15,8 +15,12 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
---
|
||||
|
||||
rules:
|
||||
- name: operation-x-openapi-router-controller
|
||||
object: operation
|
||||
operation-x-openapi-router-controller:
|
||||
description: operation should have a x-openapi-router-controller attribute
|
||||
truthy: x-openapi-router-controller
|
||||
given: $.paths[*][get,post,put,patch,delete,head,options,trace]
|
||||
severity: error
|
||||
then:
|
||||
field: x-openapi-router-controller
|
||||
function: truthy
|
Загрузка…
Ссылка в новой задаче