Repository navigation
refactor: add iterator for traversing an AsyncAPI doc - #604
Merged
Merged
Conversation
smoya
requested review from
asyncapi-bot-eve,
derberg,
fmvilas,
jonaslagoni and
magicmatatjahu
as code owners
September 9, 2022 13:22
smoya
marked this pull request as draft
September 9, 2022 13:22
smoya
commented
Sep 9, 2022
| no-empty-character-class: 2 | ||
| no-self-compare: 2 | ||
| valid-typeof: 2 | ||
| no-unused-vars: [2, { "args": "none" }] |
Member
Author
There was a problem hiding this comment.
Not compatible with Typescript, however we also use the compatible version so I'm just removing the support here.
smoya
force-pushed
the
feat/traverse
branch
2 times, most recently
from
September 9, 2022 17:19
2fdaf3b to
f5ddec2
Compare
smoya
marked this pull request as ready for review
September 12, 2022 07:33
smoya
force-pushed
the
feat/traverse
branch
2 times, most recently
from
September 13, 2022 07:53
8b771c8 to
8abbfe5
Compare
| seenSchemas: Set<any> | ||
| } | ||
|
|
||
| export type TraverseCallback = (schema: SchemaInterface, propOrIndex: String | Number | null, callbackType: SchemaIteratorCallbackType) => void |
Member
There was a problem hiding this comment.
Suggested change
| export type TraverseCallback = (schema: SchemaInterface, propOrIndex: String | Number | null, callbackType: SchemaIteratorCallbackType) => void | |
| export type TraverseCallback = (schema: SchemaInterface, propOrIndex: string | number | null, callbackType: SchemaIteratorCallbackType) => void |
| /** | ||
| * Traverse current schema and all nested schemas. | ||
| */ | ||
| function traverseSchema(schema: SchemaInterface, propOrIndex: String | Number | null, options: TraverseOptions) { // NOSONAR |
Member
There was a problem hiding this comment.
Suggested change
| function traverseSchema(schema: SchemaInterface, propOrIndex: String | Number | null, options: TraverseOptions) { // NOSONAR | |
| function traverseSchema(schema: SchemaInterface, propOrIndex: string | number | null, options: TraverseOptions) { // NOSONAR |
smoya
force-pushed
the
feat/traverse
branch
from
September 13, 2022 08:37
8abbfe5 to
1a396c7
Compare
Member
Author
|
@magicmatatjahu would you mind reviewing again? I fixed the linting issues but also improved the tests. Thanks! |
smoya
requested review from
magicmatatjahu
and removed request for
asyncapi-bot-eve,
derberg,
fmvilas and
jonaslagoni
September 13, 2022 08:37
|
Kudos, SonarCloud Quality Gate passed! |
magicmatatjahu
approved these changes
Sep 13, 2022
Member
Author
|
/rtm |
magicmatatjahu
pushed a commit
to magicmatatjahu/parser-js
that referenced
this pull request
Oct 3, 2022
derberg
pushed a commit
that referenced
this pull request
Oct 4, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Description
This PR adds an iterator for traversing AsyncAPI documents. It is based in the current one. See https://github.com/asyncapi/parser-js/blob/master/lib/iterators.js
Related issue(s)
#481