Skip to content

Commit

Permalink
Fix swag target and add OpenAPI3 conversion target
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Lucidi <[email protected]>
  • Loading branch information
mansam committed Oct 27, 2023
1 parent 9e53b11 commit 8d8caa2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,19 @@ controller-gen:
addon: fmt vet
go build -o bin/addon github.com/konveyor/tackle2-hub/hack/cmd/addon

docs: docs-swagger docs-binding
docs: docs-html docs-openapi3 docs-binding

# Build Swagger API spec into ./docs directory
docs-swagger:
${GOBIN}/swag init -g api/base.go
${GOBIN}/swag init -g pkg.go --dir api,assessment

# Build OpenAPI 3.0 docs
docs-openapi3: docs-swagger
curl -X POST -H "Content-Type: application/json" -d @docs/swagger.json https://converter.swagger.io/api/convert | jq > docs/openapi3.json

# Build HTML docs from Swagger API spec
docs-html: docs-swagger
redoc-cli bundle -o docs/index.html docs/swagger.json
docs-html: docs-openapi3
redoc-cli bundle -o docs/index.html docs/openapi3.json

# Build binding doc.
docs-binding:
Expand Down

0 comments on commit 8d8caa2

Please sign in to comment.