Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wirthual committed Jul 23, 2024
1 parent 2fa48f8 commit 9e94b34
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 78 deletions.
2 changes: 1 addition & 1 deletion CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<url>.api.bund.dev
bundestag-tagesordnung.api.bund.dev
8 changes: 4 additions & 4 deletions generator_config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
templateDir: deutschland_templates # For local use: ./local/deutschland_templates
additionalProperties:
packageName: "<NAME>"
packageName: "bundestag_tagesordnung"
infoName: "BundesAPI"
infoEmail: "[email protected]"
packageVersion: <VERSION>
packageUrl: "https://github.com/bundesAPI/<REPO>"
packageVersion: 1.0.0
packageUrl: "https://github.com/bundesAPI/bundestag-tagesordnung-api"
namespace: "deutschland"
docLanguage: "de"
gitHost: "github.com"
gitUserId: "bundesAPI"
gitRepoId: "<REPO-ID>"
gitRepoId: "bundestag-tagesordnung-api"
files:
pyproject.mustache:
destinationFilename: pyproject.toml
Expand Down
117 changes: 83 additions & 34 deletions openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,94 @@
openapi: "3.0.0"
openapi: 3.0.0
info:

Check warning on line 2 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

info-contact

Info object must have "contact" object.

Check warning on line 2 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

info-description

Info "description" must be present and non-empty string.
description: "API Description"
version: "1.0.0"
title: "API Name"
x-office: "Amtsname"
contact:
name: Zuständige Behörde
email: [email protected]
url: https://example.de

title: Tagesordnungen API
version: 1.0.0
servers:
- url: "https://warnung.bund.de/api31"

tags:
- name: default

- url: https://api.hutt.io/

Check warning on line 6 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

oas3-server-trailing-slash

Server URL must not have trailing slash.
paths:
/dashboard/{AGS}.json:
/bt-to/csv:
get:

Check warning on line 9 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

operation-tags

Operation must have non-empty "tags" array.

Check warning on line 9 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

operation-operationId

Operation must have "operationId".

Check warning on line 9 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

operation-description

Operation "description" must be present and non-empty string.
summary: Name des Endpoints
description: Hier wird die Funktion des Endpunktes beschrieben.
operationId: getAGS
tags:
- default
summary: Tagesordnungen im CSV-Format abrufen
parameters:
- name: year
in: query
description: Das Jahr, für das Tagesordnungen abgerufen werden sollen (optional)
schema:
type: integer
- name: week
in: query
description: Die Kalenderwoche, für die Tagesordnungen abgerufen werden sollen (optional; kann mit Jahr kombiniert werden)
schema:
type: integer
responses:
"200":
description: OK
'200':
description: Erfolgreiche Antwort
content:
text/csv:
schema:
type: string
/bt-to/json:
get:

Check warning on line 30 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

operation-tags

Operation must have non-empty "tags" array.

Check warning on line 30 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

operation-operationId

Operation must have "operationId".

Check warning on line 30 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

operation-description

Operation "description" must be present and non-empty string.
summary: Tagesordnungen im JSON-Format abrufen
parameters:
- name: week
in: query
description: Die Kalenderwoche, für die Tagesordnungen abgerufen werden sollen (optional)
schema:
type: integer
responses:
'200':
description: Erfolgreiche Antwort
content:
application/json:
schema:
$ref: "#/components/schemas/Result"
type: array
items:
type: object
/bt-to/xml:
get:

Check warning on line 48 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

operation-operationId

Operation must have "operationId".

Check warning on line 48 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

operation-tags

Operation must have non-empty "tags" array.

Check warning on line 48 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

operation-description

Operation "description" must be present and non-empty string.
summary: Tagesordnungen im XML-Format abrufen
parameters:
- in: path
required: true
name: AGS
- name: year
in: query
description: Das Jahr, für das Tagesordnungen abgerufen werden sollen (optional)
schema:
type: string
description: Amtlicher Gebietsschlüssel - kann z.B. von [hier](https://www.xrepository.de/api/xrepository/urn:de:bund:destatis:bevoelkerungsstatistik:schluessel:rs_2021-07-31/download/Regionalschl_ssel_2021-07-31.json) bezogen werden. Die Letzten 7 Stellen müssen dabei mit "0000000" ersetzt werden, weil die Daten nur auf [Kreisebene](https://de.wikipedia.org/wiki/Amtlicher_Gemeindeschl%C3%BCssel) bereitgestellt werden.
example: "example-parameter"
type: integer
- name: week
in: query
description: Die Kalenderwoche, für die Tagesordnungen abgerufen werden sollen (optional; kann mit Jahr kombiniert werden)
schema:
type: integer
responses:
'200':
description: Erfolgreiche Antwort
content:
application/xml:
schema:
type: string
/bt-to/ical:
get:

Check warning on line 69 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

operation-operationId

Operation must have "operationId".

Check warning on line 69 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

operation-tags

Operation must have non-empty "tags" array.

Check warning on line 69 in openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (push)

operation-description

Operation "description" must be present and non-empty string.
summary: Tagesordnungen im iCal-Format abrufen
parameters:
- name: na
in: query
description: Zusätzliche Kalendereinträge für Namentliche Abstimmungen erstellen (optional; kombinierbar)
schema:
type: boolean
- name: naAlarm
in: query
description: Alarme 15 Minuten vor Namentlichen Abstimmungen hinzufügen (optional; kombinierbar)
schema:
type: boolean
- name: showSW
in: query
description: Ganztägige Termine für Sitzungswochen erstellen (optional; kombinierbar)
schema:
type: boolean
responses:
'200':
description: Erfolgreiche Antwort
content:
text/calendar:
schema:
type: string

components:
schemas:
Result:
type: string
125 changes: 86 additions & 39 deletions openapi_en.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,93 @@
openapi: "3.0.0"
openapi: 3.0.0
info:
description: "API Description"
version: "1.0.0"
title: "API Name"
x-office: "Amtsname"
contact:
name: Responsible authority
email: [email protected]
url: https://example.com

title: Tagesordnungen API
version: 1.0.0
servers:
- url: "https://warnung.bund.de/api31"

tags:
- name: default

- url: https://api.hutt.io/
paths:
/dashboard/{AGS}.json:
/bt-to/csv:
get:
summary: Name of endpoint
description: Here the function of the end point is described.
operationId: getAGS
tags:
- default
summary: Get Tagesordnungen in CSV format
parameters:
- name: year
in: query
description: The year for which to retrieve Tagesordnungen (optional)
schema:
type: integer
- name: week
in: query
description: The calendar week for which to retrieve Tagesordnungen (optional; can be combined with year)
schema:
type: integer
responses:
'200':
description: Successful response
content:
text/csv:
schema:
type: string
/bt-to/json:
get:
summary: Get Tagesordnungen in JSON format
parameters:
- name: week
in: query
description: The calendar week for which to retrieve Tagesordnungen (optional)
schema:
type: integer
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: array
items:
type: object
/bt-to/xml:
get:
summary: Get Tagesordnungen in XML format
parameters:
- name: year
in: query
description: The year for which to retrieve Tagesordnungen (optional)
schema:
type: integer
- name: week
in: query
description: The calendar week for which to retrieve Tagesordnungen (optional; can be combined with year)
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Result'
description: Successful response
content:
application/xml:
schema:
type: string
/bt-to/ical:
get:
summary: Get Tagesordnungen in iCal format
parameters:
- in: path
required: true
name: AGS
schema:
type: string
description: Official area key - can be retrieved from [here](https://www.xrepository.de/api/xrepository/urn:de:bund:destatis:bevoelkerungsstatistik:schluessel:rs_2021-07-31/download/Regionalschl_ssel_2021-07-31.json). The last 7 digits have to be replaced with "0000000" because data is only offered on the area level [Kreisebene](https://de.wikipedia.org/wiki/Amtlicher_Gemeindeschl%C3%BCssel).
example: "example-parameter"


components:
schemas:
Result:
type: string
- name: na
in: query
description: Create additional calendar entries for Namentliche Abstimmungen (optional; combinable)
schema:
type: boolean
- name: naAlarm
in: query
description: Add alarms 15 minutes before Namentliche Abstimmungen (optional; combinable)
schema:
type: boolean
- name: showSW
in: query
description: Create all-day appointments for Sitzungswochen (optional; combinable)
schema:
type: boolean
responses:
'200':
description: Successful response
content:
text/calendar:
schema:
type: string

0 comments on commit 9e94b34

Please sign in to comment.