Sign inSign up

gkarthics/swagger-validate

By gkarthics

•Updated over 6 years ago

Image
0

50K+

gkarthics/swagger-validate repository overview

⁠swagger-validate-container

This container image swagger-validate is used to validate the OpenAPI Spec formerly known as Swagger Spec in YAML, YML or JSON format.

⁠Usage

This is to be used in CI runners to validate the openapi spec yaml files or json files for the specified directory. The container has been built as it have validate and command and accepts the space separated directory path that contains the yml, yaml and/or json spec files, i.e., validate /tmp/yaml/spec /tmp/json

⁠GitLab Example

To use in GitLab,

image: gkarthics/swagger-validate:0.2.0

before_script:
  - swagger-cli -v

swagger-validate:
  stage: deploy
  script:
    - validate <folder path for yaml and/or json files>

⁠GitHub Example

To use in GitHub Actions,

name: swagger-validate
on:
  push:
    branches: [ master ]
jobs:
  build:
    container: gkarthics/swagger-validate:0.2.0
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: validate
      run: validate <folder path for yaml and/or json files>

⁠Credits

This container image uses the swagger-cli⁠ to validate the yaml files.

Tag summary

Content type

Image

Digest

Size

60.6 MB

Last updated

over 6 years ago

docker pull gkarthics/swagger-validate:0.2.0