Add OpenAPI link to navigation bar#301
Merged
vanschelven merged 4 commits intobugsink:mainfrom Jan 11, 2026
Merged
Conversation
Added a new "OpenAPI" link in the navigation bar next to "Users" and "Tokens" links. The link points to /api/canonical/0/schema/swagger-ui/ and is only visible to superusers. Also added comprehensive tests in theme/tests.py to verify that: - Superusers can see the OpenAPI link - Superusers can see Users and Tokens links - Regular users cannot see any of these superuser-only links Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Contributor
Author
|
Trying to run tests locally like a good citizen, but the main branch already has failing tests on my system. Looking into it. |
Contributor
Author
|
EDIT : Alright I see in the CI files that tests depend on the bugsink/event-samples repo. |
Contributor
Author
|
Much better. Tests passing now |
Contributor
Author
Contributor
Author
|
Contributor
|
Thanks! This is indeed a very good idea for visibility of the API. Regarding the mocking, I have a more idiomatic solution. |
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.



Added a new "OpenAPI" link in the navigation bar next to "Users" and "Tokens" links. The link points to /api/canonical/0/schema/swagger-ui/ and is only visible to superusers.
Also added comprehensive tests in theme/tests.py to verify that:
Note: This commit was created by AI.... I'm creating a PR to get the CI to run and will review it myself before removing the WIP flag