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

feat(openapi): add tool to generate openapi docs #31

Merged
merged 8 commits into from
Oct 9, 2023
Merged

Conversation

lahabana
Copy link
Contributor

@lahabana lahabana commented Oct 6, 2023

This tool which is usable as a docker image can be used in our repos to generate openapi specs from multiple existing ones.

This tool will be used in: kumahq/kuma#7975

@lahabana lahabana requested a review from a team as a code owner October 6, 2023 09:03
@lahabana lahabana requested review from Automaat and bartsmykla and removed request for a team October 6, 2023 09:03
Signed-off-by: Charly Molter <[email protected]>
Signed-off-by: Charly Molter <[email protected]>
Signed-off-by: Charly Molter <[email protected]>
Signed-off-by: Charly Molter <[email protected]>
Signed-off-by: Charly Molter <[email protected]>
}
}

async function fileIsOpenApiSpec(path) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am not a js specialist, but does this function need to be async if you await it instantly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No actually in JS you need to declare a funciton as async as soon as you use await inside it. I guess @johncowen or @kleinfreund could explain in detail. My guess is that this indicates that in reality this function returns a promise.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’s the rule, yes: a function that uses await in its immediate scope needs to be marked with the async keyword. That’s the case here.

@lahabana lahabana merged commit 0098c0a into main Oct 9, 2023
4 checks passed
@lahabana lahabana deleted the openapi-tool branch October 9, 2023 19:33
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

Successfully merging this pull request may close these issues.

3 participants