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

[V2] Missing security schemes when inlining references are enabled to write a document. #2267

Closed
andrueastman opened this issue Mar 15, 2025 · 1 comment · Fixed by #2278
Closed
Assignees
Labels
Milestone

Comments

@andrueastman
Copy link
Member

andrueastman commented Mar 15, 2025

One of the effects of enabling InlineLocalReferences and InlineExternalReferences in this PR is that the library will attempt to resolve the references and not write the components section.
https://github.com/microsoft/kiota/blob/e4b45e9f12c0fa1daea76f1849618ee953e73e49/src/Kiota.Builder/Plugins/PluginsGenerationService.cs#L64

See reference in library at

if (writer.GetSettings().InlineLocalReferences)

The OpenApi.Net library should probably inline the Security Requirement Object in the operation level for the scenario when inlining references or have the components section always write the securitySchemes in the components sections if this is an exception.

Related to microsoft/kiota#6279

@darrelmiller
Copy link
Member

@andrueastman It is not allowed to inline security schemes into security requirement objects. When doing local inlining we should not remove the #/components/securitySchemes section in the output document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants