-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature: Generate markdown document from proto file #1
Conversation
Add config for caching generated markdown files
@@ -84,7 +87,8 @@ export async function getProtosFromEntitySpec( | |||
imports: imports.map(pSaveProtoTextAsFile), | |||
}; | |||
} catch (err) { | |||
console.log('OUTPUT ~ getProtosFromEntitySpec ~ err', err); | |||
logger.info(`Error getProtosFromEntitySpec`); |
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.
Should this 2 lines combine to one with logger.error
only, info and error log in 2 lines is confusing
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 will fix it
console.error(`Error generating document. Please submit a new issue at ${REPO_URL}`); | ||
console.error(`Error:`, err); | ||
logger.warn(`Error generating document. Please submit a new issue at ${REPO_URL}`); | ||
logger.error(err); |
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.
same with previous comment
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 will fix it
let isGenDoc = req.body.isGenDoc; | ||
|
||
try { | ||
isGenDoc = JSON.parse(isGenDoc); |
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.
should this just be JSON.parse(req.body.isGenDoc) ?
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 wrote it for prevent the case req.body.isGenDoc
is undefined and JSON.parse will throw error
ref zalopay-oss/backstage-grpc-playground#3
protoc
binarybackstage-grpc-playground-backend/config.d.ts
Lines 12 to 15 in dceba94
TODO: Cache generated files