[openSUSE/open-build-service] 8c733b: Create ruby script to resolve references in swagge...
Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: 8c733bcaee0b30b3bd3ebacba2f28c638977948f https://github.com/openSUSE/open-build-service/commit/8c733bcaee0b30b3bd3eba... Author: Lukas Krause <lkrause@suse.de> Date: 2023-04-26 (Wed, 26 Apr 2023) Changed paths: A dist/resolve_swagger_yaml.rb Log Message: ----------- Create ruby script to resolve references in swagger yaml In order to speed up the rendering of the OpenAPI documentation in Swagger, we need to resolve all the references to the different yaml files and create on big yaml file. This improves the loading time a lot since we only have on query instead of multiple. Local tests without caching: Before: 3,69sec -> 268 requests in total After: 172ms -> 8 requests in total We will use the script during the build process of the obs-server package to replace the Swagger YAML that we use during development with the YAML that inlcudes all resolved references to the other YAML files. Usage: ``` ./resolve_swagger_yaml.rb -i ../src/api/public/apidocs-new/OBS-v2.10.50.yaml -o ../src/api/public/apidocs-new/OBS-v2.10.50_new.yaml ``` OR ``` ./resolve_swagger_yaml.rb -i ../src/api/public/apidocs-new/OBS-v2.10.50.yaml -o ../src/api/public/apidocs-new/OBS-v2.10.50.yaml -f ``` to force overwrite of an existing file Commit: 48cf6d1e38479db68b5af6f535c1a12e67145646 https://github.com/openSUSE/open-build-service/commit/48cf6d1e38479db68b5af6... Author: Henne Vogelsang <hvogel@opensuse.org> Date: 2023-04-27 (Thu, 27 Apr 2023) Changed paths: A dist/resolve_swagger_yaml.rb Log Message: ----------- Merge pull request #14240 from krauselukas/speed_up_api_docs Create ruby script to resolve references in swagger yaml Compare: https://github.com/openSUSE/open-build-service/compare/6fb44c3deb94...48cf6d...
participants (1)
-
Henne Vogelsang