Skip to content

feat: allow setting securitySchemes in config#14

Merged
sjorobekov merged 6 commits intomainfrom
feat_allow_setting_securitySchemes_in_config
Mar 19, 2026
Merged

feat: allow setting securitySchemes in config#14
sjorobekov merged 6 commits intomainfrom
feat_allow_setting_securitySchemes_in_config

Conversation

@sjorobekov
Copy link
Collaborator

No description provided.

sjorobekov and others added 4 commits March 19, 2026 14:58
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 requested a review from Copilot March 19, 2026 12:40
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

This PR adds support for defining OpenAPI components.securitySchemes upfront via createOpenApiRegistry configuration, so consumers can ship predefined auth scheme definitions without having to register them imperatively.

Changes:

  • Add securitySchemes to OpenApiRegistryConfig typings.
  • Initialize and restore components.securitySchemes from the config (including on reset()).
  • Update tests and README docs to cover/describe the new config option.

Reviewed changes

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

File Description
src/types.ts Extends registry config type to accept securitySchemes.
src/openapi-registry.ts Seeds components.securitySchemes from config and restores it on reset().
src/tests/openapi-registry.test.ts Asserts schema includes configured securitySchemes and that reset() preserves initial schemes.
README.md Documents the new config option and adds an example.

💡 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.

imsitnikov
imsitnikov previously approved these changes Mar 19, 2026
@sjorobekov sjorobekov marked this pull request as ready for review March 19, 2026 13:22
@sjorobekov sjorobekov changed the base branch from feat_allow_configuration_of_authPolicy to main March 19, 2026 13:24
@sjorobekov sjorobekov dismissed imsitnikov’s stale review March 19, 2026 13:24

The base branch was changed.

@sjorobekov sjorobekov merged commit 4c1c01b 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