Simple docker image to be used, to create and upload openAPI documentation to bump.sh
How to use
- Validate
docker run -ti --rm -v$(pwd):/opt/app taxfix/oas-bump /validate.sh
- Publish documentation
docker run -ti --rm -v$(pwd):/opt/app taxfix/oas-bump /generate-publish.sh
Used for CI
Make sure to define BUMP_DOC_ID
and BUMP_TOKEN
as env variables.
CircleCI
- Add a new job
jobs:
publish-api-documentation:
docker:
- image: taxfix/oas-bump:latest
steps:
- checkout
- run: cp /generate-publish.sh .
- run: ./generate-publish.sh
- Add this job to the workflow
workflows:
version: 2
workflow-name:
jobs:
- publish-api-documentation:
requires:
- build
filters:
branches:
only:
- master
GitLab
- Validate
validate-docs:
stage: build-and-push
image: taxfix/oas-bump:latest
before_script:
- ''
script:
- /validate.sh
environment:
name: integration
allow_failure: false
- Publish
publish-specs:
stage: build-and-push
image: taxfix/oas-bump:latest
before_script:
- ''
script:
- /generate-publish.sh
rules:
- if: $CI_COMMIT_BRANCH == "master"
when: always
environment:
name: integration
allow_failure: false
Optional features
Generate documentation using swagger-inline (without bump upload)
docker run -ti --rm -v$(pwd):/opt/app taxfix/oas-bump /generate.sh