unioslo / harborapi

Python async client for the Harbor REST API v2.0.
https://unioslo.github.io/harborapi/
MIT License
24 stars 5 forks source link

Redefine broken models from scratch instead of using inheritance #45

Closed pederhan closed 1 year ago

pederhan commented 1 year ago

Until mkdocstrings can handle Pydantic models that make use of inheritance, we're better off just redefining all the broken models. The way it's currently rendered in the API reference section of the documentation is unacceptable.

We should continue using harborapi.models.models as the place to define these models, and leave harborapi.models._models untouched. This ensures we can update the auto-generated models without overwriting our changes. We could definitely benefit from some sort of system to warn us whenever redefined models are updated, but we all know that's not gonna happen... We just need to carefully review any changes to harborapi.models._models and harborapi.models._scanner.