forked from fedora-copr/copr
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See fedora-copr#1865 This is still miles from being finished. I tried probably all OpenAPI libraries that are available and decided to go with flask-restx. It is already in Fedora, Packit team uses it as well, and it is malleable enough to be comfortable used within our codebase. I intentionally defined all data types and descriptions in `schema.py` and in the way that everything is defined separately in its own variable. We should IMHO try to compose things as much as possible to avoid copy-pasting. Remains to be done: - Only a fraction of API endpoints are migrated under flask-restx, we need to finish the rest of them - There is a potential to generate WTForms forms from the API schema or the other way around. - We should share descriptions between API fields and web UI as much as possible - Packit team uses does something like this, we should do as well @koji_builds_ns.response(HTTPStatus.OK, "OK, koji build group details follow")
- Loading branch information
Showing
10 changed files
with
809 additions
and
73 deletions.
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
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
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
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
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
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
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
Oops, something went wrong.