bundesAPI / dip-bundestag-api

Bundestag: Dokumentations- und Informationssystem für Parlamentsmaterialien
https://dip.bundestag.api.bund.dev/
16 stars 2 forks source link

Update openapi.yaml #12

Closed maximiliancw closed 1 year ago

maximiliancw commented 1 year ago

Reflect API's current version: https://search.dip.bundestag.de/api/v1/openapi.yaml

This will introduce several new features, for example:

PS: I think it should be feasible to pull the API's current version on each client generation, instead of having to manually copy/paste it like I did now. Is this something the team is interested in?

maximiliancw commented 1 year ago

Sorry, I just realized that bundesbot seems to (partially) be taking care of this already. In this case, I'd suggest removing the old openapi.yaml and closing my PR.

But: my confusion was a result of me installing the package de-dip-bundestag via PyPI, which includes a client that does not reflect the API's current state. Hence I was thinking that it is still using the openapi.yaml from this repo. I saw that your GitHub action provides an option for syncing with PyPI, is this still being used?

wirthual commented 1 year ago

Hi,

The bundesbot only takes the openapi.yaml from this repo and generates the package which gets then uploaded by the github action deutschland_generator to pypi.

The reason for the documentation being not up to date with the code on pypi is, there was no new release after the change of the openapi.yaml since the version was not incremented.

So in order for the deutschland_generator action to upload the newest version, we need to update the version in the generator_config.yaml to something larger than 0.1.0 which it currently is. (Deutschland generator fails becaue of this because it is saying hey theres already a version 0.1.0 uploaded at pypi, I can not upload another one.)

So copying the openapi.yaml here is needed (feel free to work on some automated checking of the source.) as well as the update of the version in the generator_config.yaml

Hope that makes sense. Let me know if anything else is unclear. I guess this PR is related to #13

maximiliancw commented 1 year ago

Thanks, I get it now. Shall we move on to v0.1.1 with this PR then? We'd at least have the current spec on PyPI. I'd be happy to look into a solution to automate the update process.

I guess this PR is related to https://github.com/bundesAPI/dip-bundestag-api/issues/13

Yes, it is

Edit: I just sent another PR by accident which included the version bump. Let me know how you want to proceed on this