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

Should security object that was inlined in server.security be left as duplicate under securitySchemes #196

Open
derberg opened this issue Oct 9, 2023 · 2 comments

Comments

@derberg
Copy link
Member

derberg commented Oct 9, 2023

So here we have securituSchemes.supportedOauthFlows -> https://github.com/asyncapi/spec/blob/next-major-spec/examples/correlation-id.yml#L150 but it was already inlined in https://github.com/asyncapi/spec/blob/next-major-spec/examples/correlation-id.yml#L24

so we kinda duplicate info, imho securituSchemes.supportedOauthFlows should be removed by the converter.

also, why Security requirements that use scopes are defined in the appropriate places inline?

cc @magicmatatjahu @jonaslagoni

@magicmatatjahu
Copy link
Member

magicmatatjahu commented Oct 10, 2023

@derberg

Security requirements that use scopes are defined in the appropriate places inline

Because in v3 security schemas for the oauth2 type has scopes field in the root level of security scheme object, so you cannot do something like:

security:
- $ref: "#/components/securitySchemes/oauth2"
  scopes: [...]

you need to define it as inline (everything). However about duplication, tbh I don't remember why I did that in this way, in 99% it can be erase, that 1% I left because maybe there is a case with referencing with external files.

Copy link
Member Author

derberg commented Oct 10, 2023

external file you mean that some external file references that security scheme and that is why it should stay?

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

No branches or pull requests

2 participants