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

Sanitize descriptions in code generator #47

Open
wwerner opened this issue Oct 4, 2019 · 3 comments
Open

Sanitize descriptions in code generator #47

wwerner opened this issue Oct 4, 2019 · 3 comments
Labels
P:3 Low Priority

Comments

@wwerner
Copy link
Contributor

wwerner commented Oct 4, 2019

Currently, both the editor and the display support markdown formatting.
As (I think) the description will be rendered into the generated code's comments, we need to make sure that this does not break the target syntax.

This is also true for arbitrary comments.

@VaughnVernon
Copy link
Contributor

@wwerner Do you mean using AJAX to compile check on perhaps line-by-line changes?

@wwerner
Copy link
Contributor Author

wwerner commented Oct 6, 2019

No, I thought we'd check validity/escape/sanitize content on the server side when the user saves content, as the request can come from our UI as well as from some other API client.

We could additionally hook into Monaco Editor's highlighting to show invalid content.

Just for traceability: Referring to #35 (comment), I was under the impression that the Description in SchemaVersion would be part of the sources generated from the Specification, probably in the comments.

@VaughnVernon
Copy link
Contributor

@wwerner Ah, ok, good point. Let's do generate comments for the (sanitized) description.

@wwerner wwerner added the P:3 Low Priority label Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P:3 Low Priority
Projects
None yet
Development

No branches or pull requests

2 participants