-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat(converter): add securitySchemeTypeRefractorPlugin #3802
Conversation
13a3737
to
e3defde
Compare
...verter/src/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type.ts
Outdated
Show resolved
Hide resolved
...verter/src/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type.ts
Outdated
Show resolved
Hide resolved
...verter/src/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type.ts
Outdated
Show resolved
Hide resolved
...verter/src/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type.ts
Outdated
Show resolved
Hide resolved
555bcdd
to
d39d076
Compare
...test/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type/index.ts
Outdated
Show resolved
Hide resolved
...verter/src/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type.ts
Outdated
Show resolved
Hide resolved
As we discussed, the strategy is going to be different so I'm converting this PR to draft as I'm applying those changes. |
d39d076
to
2d8f926
Compare
@char0n I updated the solution but I'm not sure if I'm handling it correctly (checking for |
...verter/src/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type.ts
Show resolved
Hide resolved
3aa4964
to
29dd933
Compare
...verter/src/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type.ts
Outdated
Show resolved
Hide resolved
...verter/src/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type.ts
Outdated
Show resolved
Hide resolved
...verter/src/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type.ts
Outdated
Show resolved
Hide resolved
29dd933
to
53fc446
Compare
We now have working |
...verter/src/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type.ts
Show resolved
Hide resolved
...verter/src/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type.ts
Show resolved
Hide resolved
@char0n Two things I'm unsure about:
"security": [
{},
{
"apiKey-scheme": [
"read",
"write"
]
}
], |
...verter/src/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type.ts
Outdated
Show resolved
Hide resolved
Good question. Let me think about this for a minute.
We don't care. Empty Security Requirement Object is valid as empty object according to OpenAPI 3.0.x spec. |
c97b9ac
to
5a552de
Compare
I guess this is dependent on the broader strategy how annotations should be generated. Do we want to generate annotation for every removed Schema Element or just generate one for the entire plugin? I currently see two possible strategies for this. Let's stay in the realm of Generate single annotation for plugin runWe'll just introduce Another option is to add annotation when first Generate annotations for every elementNow this one would be more complex. We add annotation for every removal. Along with that we will translate element source maps to the annotation. This means that this single plugin can generate number of annotations and each annotation will contain specific source map information about the removed Security Scheme Object. |
I think users of the converter would prefer to see information about all changes to the API definition and where they happened. So IMO |
All right, decided then. |
...verter/src/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type.ts
Outdated
Show resolved
Hide resolved
5a552de
to
eed8f16
Compare
...verter/src/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type.ts
Show resolved
Hide resolved
...test/strategies/openapi-3-1-to-openapi-3-0-3/refractor-plugins/security-scheme-type/index.ts
Show resolved
Hide resolved
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
8ef577e
to
2f364f9
Compare
refs: SWG-9963