Skip to content

feat: allow configuration of authPolicy for swagger page#13

Merged
sjorobekov merged 3 commits intomainfrom
feat_allow_configuration_of_authPolicy
Mar 19, 2026
Merged

feat: allow configuration of authPolicy for swagger page#13
sjorobekov merged 3 commits intomainfrom
feat_allow_configuration_of_authPolicy

Conversation

@sjorobekov
Copy link
Collaborator

No description provided.

@sjorobekov sjorobekov marked this pull request as ready for review March 19, 2026 11:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an authPolicy option to the OpenAPI registry configuration so consumers can control authentication behavior for the Swagger UI mount route.

Changes:

  • Extended OpenApiRegistryConfig with an optional authPolicy.
  • Applied the configured authPolicy when registering the Swagger UI MOUNT route.
  • Added tests and README documentation for the new configuration option.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/types.ts Adds authPolicy?: AuthPolicy to the registry config type.
src/openapi-registry.ts Uses configured/default auth policy when creating the docs mount route (and currently also adds it to the schema object).
src/tests/openapi-registry.test.ts Adds coverage for default vs configured auth policy on the MOUNT /api/docs route.
README.md Documents the new authPolicy config field and its default.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

sjorobekov and others added 2 commits March 19, 2026 15:12
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sjorobekov sjorobekov merged commit 11bbea0 into main Mar 19, 2026
2 checks passed
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.

3 participants