From 2f1c9183f6b9b88d7cf5faeb5659367786724384 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Fri, 24 Jan 2025 14:35:50 +0400 Subject: [PATCH] Run docs lint as part of CI (#3575) (cherry picked from commit c9124c2cac0c0ab44634285db3bb45f8b56f4831) # Conflicts: # Makefile --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a725cee70f..a81dd10a16 100644 --- a/Makefile +++ b/Makefile @@ -57,8 +57,6 @@ filter-for-serverless: ## Generate the serverless version from the compiled sche dump-routes: ## Create a new schema with all generics expanded @npm run dump-routes --prefix compiler -contrib: | generate license-check spec-format-fix transform-to-openapi filter-for-serverless ## Pre contribution target - overlay-docs: ## Apply overlays to OpenAPI documents @npx bump overlay "output/openapi/elasticsearch-openapi.json" "docs/overlays/elasticsearch-openapi-overlays.yaml" > "output/openapi/elasticsearch-openapi.tmp1.json" @npx bump overlay "output/openapi/elasticsearch-openapi.tmp1.json" "docs/overlays/elasticsearch-shared-overlays.yaml" > "output/openapi/elasticsearch-openapi.tmp2.json" @@ -71,6 +69,8 @@ lint-docs: ## Lint the OpenAPI documents after overlays lint-docs-errs: ## Lint the OpenAPI documents after overlays and return only errors @npx @stoplight/spectral-cli lint output/openapi/elasticsearch-*.examples.json --ruleset .spectral.yaml -D +contrib: | generate license-check spec-format-fix transform-to-openapi filter-for-serverless lint-docs-errs ## Pre contribution target + help: ## Display help @awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) #------------- --------------