-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge with repo lukaspanni/api-client-documentation-template
- Add generator_config and generator action - Add REDME with quickstart - Add CNAME
- Loading branch information
1 parent
e19771e
commit 67b1259
Showing
4 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<url>.api.bund.dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |