Check that an OpenAPI specification is valid and ready to be published using gha-api/publish.
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|---|---|---|---|---|
| artifact | string | false | Artifact containing the OpenAPI specification. | |
| env | string | false | "prd" |
The environment to operate against. dev |
| path | string | false | Path to OpenAPI specification |
No outputs.
Add the following step to your workflow configuration.
By default, the workflow looks for a specification at specs/openapi.yaml.
#ci.yml
jobs:
openapi-validate:
uses: entur/gha-api/.github/workflows/validate.yml@v6
secrets: inheritIf your spec is in another file, you can specify it using the path input.
#ci.yml
jobs:
openapi-validate:
uses: entur/gha-api/.github/workflows/validate.yml@v6
with:
path: specs/openapi.json
secrets: inheritIf your spec is generated as part of your workflow, you can specify the artifact name using the artifact input.
When artifact is specified, path should refer to a file inside the artifact, by default openapi.yaml.
#ci.yml
jobs:
openapi-validate:
uses: entur/gha-api/.github/workflows/validate.yml@v6
with:
artifact: myArtifactName