[dreamwidth/dreamwidth] a0ca65: API tooling (#3033)
Branch: refs/heads/main Home: https://github.com/dreamwidth/dreamwidth Commit: a0ca65ee1b7a9cba644d6554ee6c1d7deb3b331a https://github.com/dreamwidth/dreamwidth/commit/a0ca65ee1b7a9cba644d6554ee6c1d7deb3b331a Author: momijizukamori momijizukamori+bugzilla@gmail.com Date: 2023-01-03 (Tue, 03 Jan 2023)
Changed paths: M .gitignore A api/README.md A api/build.js R api/comments/screening.yaml A api/dist/comments/screening.yaml A api/dist/components/error.yaml A api/dist/components/errors/400.yaml A api/dist/components/errors/404-user.yaml A api/dist/components/schemas/icon.yaml A api/dist/components/schemas/username.yaml A api/dist/icons.yaml A api/dist/icons_all.yaml A api/dist/spec.yaml R api/icons.yaml R api/icons_all.yaml A api/package-lock.json A api/package.json R api/spec.yaml A api/src/comments/screening.yaml A api/src/components/error.yaml A api/src/components/errors/400.yaml A api/src/components/errors/404-user.yaml A api/src/components/schemas/icon.yaml A api/src/components/schemas/username.yaml A api/src/icons.yaml A api/src/icons_all.yaml A api/src/spec.yaml M cgi-bin/Apache/LiveJournal.pm M cgi-bin/DW/API/Key.pm M cgi-bin/DW/API/Method.pm M cgi-bin/DW/API/Parameter.pm M cgi-bin/DW/Controller/API/REST.pm M cgi-bin/DW/Controller/API/REST/Icons.pm M cgi-bin/DW/Controller/API/REST/Spec.pm M cgi-bin/DW/Routing.pm M cgi-bin/LJ/JSON.pm A htdocs/js/vendor/rapidoc-min.js A views/api.tt
Log Message:
API tooling (#3033)
Updates to API generation and tooling
Added build script and build instructions for API files
- Updated
.gitignore
to keep node_module folders out, wherever they occur - Rewrite existing YAML files to use new component system
- Compile rewritten YAML files
- Add more validation checks to the route builders and dispatchers
- Add a user-facing documentation page with interactive view using RapiDoc
- Add a generic 404 handler for missing routes under
/api
, which returns JSON instead of HTML Clean up spec output route slightly to make it valid OpenAPI 3.0.0
Auto-fill API Key in docs
Co-authored-by: Cocoa momijizukamori@gmail.com