Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 2.04 KB

File metadata and controls

62 lines (46 loc) · 2.04 KB

gha-api/validate

Check that an OpenAPI specification is valid and ready to be published using gha-api/publish.

Inputs

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

Outputs

No outputs.

Usage

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: inherit

Specifying path to spec

If 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: inherit

Using a generated spec

If 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