feat(openapi): github workflow to generate and validate openapi spec EE-2056 (#6101)

* github workflow to generate and validate openapi spec

* updated github workflow name to remove spaces and be more explicit

* added swagger-cli globally to reduce dep installation times

* removed redundant webhook payload in GET request

* fixed edgeGroupList OAS3 response model

* updated CI pipeline to convert OAS2 to OAS3 and validate OAS3 instead

* updated pipeline name to be more explicit

* removed redundant swagger-cli dependency as we are using swagger2openapi only in github CI

* fixed bug with no validation - using swagger-cli to validate
This commit is contained in:
zees-dev
2021-11-19 09:44:08 +13:00
committed by GitHub
parent 0042c7c1d9
commit 183304853e
5 changed files with 326 additions and 11 deletions

View File

@@ -22,6 +22,7 @@
"build:client": "grunt clean:client && grunt build:client",
"prebuild:docs": "go install github.com/swaggo/swag/cmd/swag@v1.7.1",
"build:docs": "cd api && swag init -g ./http/handler/handler.go --parseDependency --parseInternal --parseDepth 2 --markdownFiles ./",
"validate:docs": "swagger2openapi --warnOnly api/docs/swagger.yaml -o api/docs/openapi.yaml && swagger-cli validate api/docs/openapi.yaml",
"clean": "grunt clean:all",
"start": "grunt start",
"start:clean": "grunt clean:all && grunt start",
@@ -119,6 +120,7 @@
"yaml": "^1.10.0"
},
"devDependencies": {
"@apidevtools/swagger-cli": "^4.0.4",
"@babel/core": "^7.1.2",
"@babel/preset-env": "^7.1.0",
"@babel/preset-react": "^7.14.5",
@@ -191,6 +193,7 @@
"speed-measure-webpack-plugin": "^1.2.3",
"storybook-css-modules-preset": "^1.1.1",
"style-loader": "2",
"swagger2openapi": "^7.0.8",
"tsconfig-paths-webpack-plugin": "^3.5.1",
"typescript": "^4.4.3",
"url-loader": "^1.1.1",