feat: add all{components} functions#969
Conversation
| allServerVariables(): ServerVariablesInterface; | ||
| allParameters(): ChannelParametersInterface; | ||
| allCorrelationIds(): CorrelationIdsInterface; | ||
| allTags(): TagsInterface; |
There was a problem hiding this comment.
There was a problem hiding this comment.
@smoya I'm a little confused about where to add the allReplies function. If I add it here, then v2 also needs to implement it. But v2 doesn't have replies. I see three possible approaches:
- Remove
allRepliesfromparser-apisince it can't be implemented for v2. - Add it here and return an empty array for the v2 implementation.
- Add
allRepliesto v3 only.
I would appreciate some insight on this.
|
|
||
| export class AsyncAPIDocument extends BaseModel<v3.AsyncAPIObject> implements AsyncAPIDocumentInterface { | ||
| allSecuritySchemes(): SecuritySchemesInterface { | ||
| return this.securitySchemes(); |
There was a problem hiding this comment.
I see two issues here:
- If
allSecuritySchemesdoes the same assecuritySchemes, then this is redundant. - I believe
securitySchemesmethod implementation is wrong ATM because it is only returning Security Schemes fromcomponentsbut instead would need to return from, for example, Operations in the root document.
cc @jonaslagoni please double 👀 just in case I'm delirious.
There was a problem hiding this comment.
- If
allSecuritySchemesdoes the same assecuritySchemes, then this is redundant.
I agree. it has only been added for the sake of completeness.
- I believe
securitySchemesmethod implementation is wrong ATM because it is only returning Security Schemes fromcomponentsbut instead would need to return from, for example, Operations in the root document.
the problem is that when I try to access the security scheme of an specific operation or operationTrait it returns SecurityRequirements[] instead of SecuritySchemes.
not sure if this is a bug or I am missing something.
|
|
|
This pull request has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation. There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |




Description