-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
refactor: add SecurityRequirement(s) models #588
refactor: add SecurityRequirement(s) models #588
Conversation
src/models/v2/server.ts
Outdated
} | ||
const scheme = this.createModel(SecurityScheme, securitySchemes[security], { id: security, pointer: `/components/securitySchemes/${security}` }); | ||
requirements.push( | ||
this.createModel(SecurityRequirement, scopes, { id: security, scheme: scheme, pointer: `` }) // TODO pointer?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure which pointer should be here as we don't know if the object is under components or not. cc @magicmatatjahu any idea?
src/models/v2/operation-trait.ts
Outdated
} | ||
const scheme = this.createModel(SecurityScheme, securitySchemes[security], { id: security, pointer: `/components/securitySchemes/${security}` }); | ||
requirements.push( | ||
this.createModel(SecurityRequirement, scopes, { id: security, scheme: scheme, pointer: `` }) // TODO pointer?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pointer for SecurityRequirement
should be as (example):
/channels/{channel}/{operation}/security/{index of requirements}/{security variable - name of security schemes}
Why? Because we point to a single scheme of a single security requirement :) I hope this is clear. Let me know of any misunderstandings!
03c49d7
to
ac8a428
Compare
ac8a428
to
70f75e9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix only types and rest is good :)
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
/rtm |
Description
This PR adds the models for
SecurityRequirement
andSecurityRequirements
based on asyncapi/parser-api#71.Related issue(s)
#482