Skip to content

Commit

Permalink
chore(auth-spec): split auth spec (#188)
Browse files Browse the repository at this point in the history
* chore(auth-spec): split auth spec

* chore(auth-spec): add folder structure, use shared schema file

* chore: update github workflows

* fix: github workflows

* chore: merge gh workflow jobs

* refactor(auth): use shared schemas also for OP spec, delete old spec files

* refactor: simplify gh workflow

* style(auth-spec): undo double quotes

* refactor(OP-spec): share assetCode assetScale schemas

* feat(auth-spec): add .prettierrc, single quotes

* feat(auth-spec): use shared `access`

* chore(specs): move RS spec into RS folder

* chore: rename directory `openapi-specs` -> `openapi`

* chore: update workflow paths

* chore: add linting to workflow

* chore: update spec publishing workflow

* chore: split openapi workflows
  • Loading branch information
sabineschaller authored Oct 17, 2022
1 parent e45aaab commit 9b2ffcf
Show file tree
Hide file tree
Showing 11 changed files with 1,066 additions and 1,095 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/publish-as-api-to-readme-io.yaml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/publish-openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: OpenAPI Publisher

on:
push:
branches:
- main
paths:
- openapi/**

jobs:
publish:
workflow_run:
workflows: ['OpenAPI Validator']
branches: [main]
types:
- completed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Check out repository

- uses: readmeio/[email protected]
name: Sync Open Payments API spec
with:
rdme: openapi openapi/RS/openapi.yaml --key=${{ secrets.README_API_KEY }} --id=${{ secrets.README_OP_API_ID }}

- uses: readmeio/[email protected]
name: Sync Auth Server API spec
with:
rdme: openapi openapi/AS/client/openapi.yaml --key=${{ secrets.README_API_KEY }} --id=${{ secrets.README_AUTH_API_ID }}
21 changes: 0 additions & 21 deletions .github/workflows/publish-rs-api-to-readme-io.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ on:
branches:
- main
paths:
- auth-server-open-api-spec.yaml
- open-api-spec.yaml
- openapi/**
pull_request:
branches:
- main
paths:
- auth-server-open-api-spec.yaml
- open-api-spec.yaml
- openapi/**

jobs:
validate:
Expand All @@ -21,11 +19,14 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2

- name: Validate open-api-spec.yaml
- name: Lint openapi.yaml
run: |
npx prettier --check openapi/**/openapi.yaml
- name: AsyncAPI extension
run: |
echo "{\"extends\":[\"spectral:oas\",\"spectral:asyncapi\"]}" >> .spectral.json
npx @stoplight/spectral-cli lint open-api-spec.yaml
- name: Validate auth-server-open-api-spec.yaml
- name: Validate openapi.yaml
run: |
npx @stoplight/spectral-cli lint auth-server-open-api-spec.yaml
npx @stoplight/spectral-cli lint openapi/**/openapi.yaml
1 change: 1 addition & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
singleQuote: true
Loading

0 comments on commit 9b2ffcf

Please sign in to comment.