Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ci checks for api [WIP] #183

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,27 @@ jobs:
- checkout

- run:
name: install
name: install json-spec
command: |
cd json-spec
npm install

- run:
name: validate
name: install api-spec
command: |
cd api-spec
npm install

- run:
name: validate api-spec
command: |
cd api-spec
npm run generate-all
git diff-index HEAD --
if git diff-index HEAD -- | grep -q -e yaml; then echo "the main yaml files are not auto-generated"; exit 1; fi

- run:
name: validate json-spec
command: |
cd json-spec
echo 'doing nothing'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ build/Release
# Dependency directories
node_modules/
jspm_packages/
package-lock.json

# Typescript v1 declaration files
typings/
Expand Down
11 changes: 11 additions & 0 deletions api-spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,15 @@ for a GET endpoint, which are included in the openapi specifications. The GET re
fields as the POST fields, and are based on WFS 3 requests. It is recommended for implementations to implement both, but
only POST is required.

## Development & Contribution

The yaml files under `api-spec` directory are generated from yaml files under `defintions` and `extensions` folders. Do **NOT** edit them directly.

All edits should be applied to files under `defintions` and `extensions` folder.

To generate the main yaml files, run:

$ npm install
$ npm run generate-all

There is CI check to make sure correct yaml files are generated. The CI build will fail if you forget to generate and commit and main yaml files.
1 change: 0 additions & 1 deletion api-spec/STAC-query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ paths:
operationId: getSearchSTAC
tags:
- STAC
- STAC
parameters:
- $ref: '#/components/parameters/bbox'
- $ref: '#/components/parameters/time'
Expand Down