Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vlauciani/gitlabci-include-for-api-oas-checker

.gitlab-ci.yml include-for-api-oas-checker
https://github.com/vlauciani/gitlabci-include-for-api-oas-checker

Last synced: 25 days ago
JSON representation

.gitlab-ci.yml include-for-api-oas-checker

Awesome Lists containing this project

README

        

[![License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://github.com/vlauciani/gitlabci-include-for-api-oas-checker/blob/main/LICENSE)

# OpenApi Spec checker 'include', for `.gitlab-ci.yml`
*Open-Api-Specification* checker `include:` directive, for `.gitlab-ci.yml`

## Usage

This snippet can be included in GitLab CI to check *Open-Api-Specification*.

In your `.gitlab-ci.yml` file, remeber to set varaibles:
- `OAS_BASEDIR`
- `OAS_FILENAME`

### Example

```yml
# .gitlab-ci.yml
include:
- remote: 'https://raw.githubusercontent.com/vlauciani/gitlabci-include-for-api-oas-checker/main/api-oas-checker.yml'

variables:
OAS_DIR: "/home/user/myapp/public"
OAS_FILENAME: "openapi.yml"

stages:
- . . .
- api-oas-checker_stage
- . . .

api-oas-checker:
stage: api-oas-checker_stage
variables:
INCLUDE_OAS_BASEDIR: ${OAS_DIR}
INCLUDE_OAS_FILENAME: ${OAS_FILENAME}
```

## Contribute
Thanks to your contributions!

Here is a list of users who already contributed to this repository: \


## References
- https://github.com/italia/api-oas-checker
- https://medium.com/@imalik8088/tired-of-repeated-gitlab-ci-files-includes-to-the-rescue-17225532812a
- https://gitlab.com/imalik8088/gitlab-ci-include-test/-/blob/master/.gitlab-ci.yml

## Author
(c) 2021 Valentino Lauciani vlauciani[at]gmail.com