-
Notifications
You must be signed in to change notification settings - Fork 171
extra fields are exposed with a JSON description #241
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
base: master
Are you sure you want to change the base?
Conversation
| try { | ||
| // Parsing description as a JSON | ||
| descObj = JSON.parse(descStr); | ||
| for (const x in descObj) { |
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.
What happens when the payload is json, but not structured as a dict?
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.
If the provided description is not structured as a JSON dictionary, it is not a JSON. Consequently, it would treat it as a plain text and it would not be processed thus entering the catch block.
| } | ||
| } catch(e) { | ||
| //Not a JSON description | ||
| metaDivp.text("{{.Description }}"); |
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.
Isn't {{.Description}} already emitted in the paragraph block above?
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.
The paragraph needs to reset its text before the try block. On the contrary, it would append the processed JSON description just after the unprocessed description. The catch is for the text that it is not structured as JSON.
|
There's no documentation of this new feature, so as it stands it will have just one user. |
We will update the readme.md explaining the additions. |
|
@pramsey We have updated the readme explaining the changes |
This PR solves issue #236