Skip to content

Commit

Permalink
Merge with repo lukaspanni/api-client-documentation-template
Browse files Browse the repository at this point in the history
- Add generator_config and generator action
- Add REDME with quickstart
- Add CNAME
  • Loading branch information
lukaspanni committed Dec 29, 2021
1 parent e19771e commit 67b1259
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/deutschland_generator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on: [push]
jobs:
deutschland_generation:
name: "Deutschland Generation"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7.8"]
steps:
- uses: actions/checkout@v2

# Create default .spectral.yaml file used for linting if its not existing already
- name: "Create spectral file if it not exists"
continue-on-error: true
run: |
set -C; echo "extends: spectral:oas" > .spectral.yaml
# Runs a single command using the runners shell
- name: "Lint file"
uses: stoplightio/[email protected]
with:
file_glob: "openapi.yaml"

- name: "Generate deutschland code"
uses: wirthual/deutschland-generator-action@latest
with:
openapi-file: ${{ github.workspace }}/openapi.yaml
commit-to-git: true
upload-to-pypi: true
upload-to-testpypi: false
pypi-token: ${{ secrets.PYPI_API_TOKEN }}
testpypi-token: ${{ secrets.TEST_PYPI_API_TOKEN }}
python-version: ${{ matrix.python-version }}
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<url>.api.bund.dev
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# api-doc-template
# [_TEMPLATE_]

## Quickstart

- Add openAPI spec inside _openapi.yml_
- Update _index.html_ (insert the api-name in the title)
- Update _generator_config.yaml_ (Update all values surrounded with <>)
- Update the url in _CNAME_ once the api has its own subdomain
- Replace this README
26 changes: 26 additions & 0 deletions generator_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
templateDir: deutschland_templates # For local use: ./local/deutschland_templates
additionalProperties:
packageName: "<NAME>"
infoName: "BundesAPI"
infoEmail: "[email protected]"
packageVersion: <VERSION>
packageUrl: "https://github.com/bundesAPI/<REPO>"
namespace: "deutschland"
docLanguage: "de"
gitHost: "github.com"
gitUserId: "bundesAPI"
gitRepoId: "<REPO-ID>"
files:
pyproject.mustache:
destinationFilename: pyproject.toml
templateType: SupportingFiles
requirements.txt: {}
create_doc.mustache:
destinationFilename: create_doc.py
templateType: SupportingFiles
rename_generated_code.mustache:
destinationFilename: rename_generated_code.py
templateType: SupportingFiles
README.mustache:
destinationFilename: README.md
templateType: SupportingFiles

0 comments on commit 67b1259

Please sign in to comment.