Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The component creation and update schemas require JSON bodies, causing schema-based validation to reject supported query-only and form requests.
1 open issue
What changed in this PR
Introduces incremental OpenAPI documentation for Bugzilla’s REST API, starting with Component endpoints, plus an interactive explorer.
Changes:
- Generate and serve a specification from routes and controller fragments.
- Add a locally hosted Swagger UI explorer.
- Check route coverage and validate documented responses in REST tests.
| File | Description |
|---|---|
| template/en/default/pages/api_explorer.html.tmpl | Add explorer page and request warning. |
| t/api-openapi.t | Test specification, routing, and explorer markup. |
| skins/standard/api-explorer.css | Integrate explorer styling. |
| scripts/build-frontend.mjs | Include Swagger UI assets. |
| qa/t/rest_user_update_protected.t | Hook response validation. |
| qa/t/rest_user_update_credentials.t | Hook response validation. |
| qa/t/rest_user_suggest_whoami.t | Hook response validation. |
| qa/t/rest_user_offer_account_by_email.t | Hook response validation. |
| qa/t/rest_user_get.t | Hook response validation. |
| qa/t/rest_user_create.t | Hook response validation. |
| qa/t/rest_triage_owners.t | Hook response validation. |
| qa/t/rest_see_also.t | Hook response validation. |
| qa/t/rest_search_api.t | Hook response validation. |
| qa/t/rest_reminders.t | Hook response validation. |
| qa/t/rest_relationship_trees.t | Hook response validation. |
| qa/t/rest_pulsebot.t | Hook response validation. |
| qa/t/rest_product.t | Hook response validation. |
| qa/t/rest_product_create.t | Hook response validation. |
| qa/t/rest_phabbugz_attachment.t | Hook response validation. |
| qa/t/rest_needinfo_mentions.t | Hook response validation. |
| qa/t/rest_native_login.t | Hook validation for both clients. |
| qa/t/rest_last_change_time_non_bot.t | Hook response validation. |
| qa/t/rest_lando_uplift.t | Hook response validation. |
| qa/t/rest_group_update_protected.t | Hook response validation. |
| qa/t/rest_group_get.t | Hook response validation. |
| qa/t/rest_group_create.t | Hook response validation. |
| qa/t/rest_github_push_comment.t | Hook response validation. |
| qa/t/rest_github_pull_requests.t | Hook response validation. |
| qa/t/rest_github_pull_request.t | Hook response validation. |
| qa/t/rest_flag_types.t | Hook response validation. |
| qa/t/rest_field.t | Hook response validation. |
| qa/t/rest_components.t | Hook response validation. |
| qa/t/rest_classification.t | Hook response validation. |
| qa/t/rest_bugzilla.t | Hook response validation. |
| qa/t/rest_bug.t | Hook response validation. |
| qa/t/rest_bug_user_last_visit.t | Hook response validation. |
| qa/t/rest_bug_update.t | Hook response validation. |
| qa/t/rest_bug_update_see_also.t | Hook response validation. |
| qa/t/rest_bug_update_attachment.t | Hook response validation. |
| qa/t/rest_bug_search.t | Hook response validation. |
| qa/t/rest_bug_routes.t | Hook response validation. |
| qa/t/rest_bug_possible_duplicates.t | Hook response validation. |
| qa/t/rest_bug_object_condition.t | Hook response validation. |
| qa/t/rest_bug_legal_values.t | Hook response validation. |
| qa/t/rest_bug_history.t | Hook response validation. |
| qa/t/rest_bug_get.t | Hook response validation. |
| qa/t/rest_bug_date_fields.t | Hook response validation. |
| qa/t/rest_bug_create.t | Hook response validation. |
| qa/t/rest_bug_comments.t | Hook response validation. |
| qa/t/rest_bug_comment_misc.t | Hook response validation. |
| qa/t/rest_bug_comment_edits.t | Hook response validation. |
| qa/t/rest_bug_attachments.t | Hook response validation. |
| qa/t/rest_bug_add_comment.t | Hook response validation. |
| qa/t/rest_bug_add_attachment.t | Hook response validation. |
| qa/t/rest_attachment_redirect.t | Hook response validation. |
| qa/t/lib/QA/OpenAPI.pm | Validate responses against the served specification. |
| package.json | Add Swagger UI and disable install analytics. |
| package-lock.json | Lock new frontend dependencies. |
| Makefile.PL | Declare YAML::XS dependency. |
| js/api-explorer.js | Initialize Swagger UI and theme handling. |
| docs/en/md/api/index.md | Link explorer and describe partial coverage. |
| cpanfile | Declare YAML::XS dependency. |
| Bugzilla/App/Controller/Docs.pm | Route and render the explorer. |
| Bugzilla/App/Controller/API.pm | Serve and cache the specification. |
| Bugzilla/API/V1/Component.openapi.yaml | Describe Component operations and schemas. |
| Bugzilla/API/openapi.yaml | Define shared metadata, authentication, and errors. |
| Bugzilla/API/OpenAPI.pm | Assemble fragments and match documented routes. |
Review effort: Balanced
Comment on lines
+304
to
+306
| required: true | ||
| content: | ||
| application/json: |
3 of 14 tasks
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Uh oh!
There was an error while loading. Please reload this page.