-
Notifications
You must be signed in to change notification settings - Fork 73
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
JSDoc endpoint comments should be explicitly split in summary and description #2757
Comments
This is maybe not completely relevant to the core issue, but I wanted to raise it just in case: Markdown requires newlines for paragraph breaks, and the output currently escapes newline markup (
All that being said, I think an empty line between the summary and description makes things clearer 👍 |
I agree with @shainaraskas.
This is the main reason why I suggested this specific format. That allows us the parse the markdown and take the first paragraph node as the summary. Otherwise we would have to detect the end of the first sentence or to look for the first line break in the first paragraph etc.
This might be an issue in the OAPI converter. The line break must be escaped to be able to output it as a valid JSON string in the schema.json. The OAPI generator should unescape this before using the string in the OAPI Yaml. cc @l-trotta |
checking the OAPI converter.
what's the desired output? |
@l-trotta the output is currently correct because I'm using spaces rather than typing |
@shainaraskas could you let me know if this works? |
@l-trotta yes, |
great! I'll do a few more tests to see if we can make the process more generic for every special symbol |
🚀 Feature Proposal
Descriptions in the specification should have the following format:
Motivation
The motivation is that OpenAPI that distinguishes between summary and description. Today, we try to split on the first sentence (see #2608 and #2717), but having the source format correct will avoid using heuristics and will make sure we only use Markdown in the description.
The goal is not to migrate everything now, but document the ideal format for us.
Example
If we agree, I'll open a pull request to document this in https://github.com/elastic/elasticsearch-specification/blob/main/docs/doc-comments-guide.md.
The text was updated successfully, but these errors were encountered: