-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
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]>
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) { |
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.
i am not a js specialist, but does this function need to be async if you await it instantly?
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.
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.
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.
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.
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