Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Swagger tag descriptions to match Berkeley API GUI how-to guide #682

Conversation

eecavanna
Copy link
Collaborator

Description

In this branch, I updated Swagger tag descriptions to be consistent with the latest Berkeley Schema-compatible API GUI how-to guide (here). That was my main objective.

While I was at it, I also disabled a buggy feature, where expanding a table within a tag description would simultaneously collapse the endpoints in that tag section; and vice versa. This was happening because the click event was being propagated up the DOM tree, being received be listeners at every level (i.e. there was no event.stopPropagation() happening within the tag description level). Now, the table is always visible.

Fixes #646

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration, if it is not simply make up-test && make test-run.

  • I viewed Swagger UI in my local development environment
  • I clicked on the tag description and its contents and observed the behavior of the nearby elements

Configuration Details: none

Definition of Done (DoD) Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas

The implementation contained a bug: it relied on a `<details />` element
that accepted user clicks; but was within an element that was already
listening for user clicks (i.e. the metadata description element).
Clicking on the `<details />` element also counted as clicking on all
of its parent elements (there was no `event.stopPropagation()` call).
As a result, when the `<details />` element was expanded, the endpoints
would be collapsed—and vice versa.
@eecavanna
Copy link
Collaborator Author

Merging without review because we are down to the wire, the changes carry nearly no risk of adversely affecting functionality (from my perspective), and the content is a verbatim copy/paste of content that has already been reviewed/approved in a different context.

@eecavanna eecavanna merged commit 7a386c5 into berkeley Sep 18, 2024
2 checks passed
@eecavanna eecavanna deleted the 646-berkeley-synchronize-swagger-ui-documentation-with-standalone-api_guimd-how-to-guide branch September 18, 2024 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant