"description": "An array containing the type names of the sections of this text. The length of sectionNames gives the depth of the structure of this text. For example, Kohelet `([\"Chapter\", \"Verse\"])` has depth 2, while Mishneh Torah `([\"Book\", \"Topic\", \"Section\", \"Law\"])` has depth 4. Comparing this depth to the depth of sections will show if the request was for the lowest level, or a higher level, of the text.",
results in this output:
/**
* An array containing the type names of the sections of this text. The length of
* sectionNames gives the depth of the structure of this text. For example,
* Kohelet `(["Chapter", "Verse"])` has depth 2, while Mishneh Torah `(["Book",
* "Topic", "Section", "Law"])` has depth 4. Comparing this depth to the depth of
* sections will show if the request was for the lowest level, or a higher level,
* of the text.
*/
This results in an error being thrown during the conversion because one of the code spans has been split between two different lines:
I personally don't think this long-line-breaking is desirable behavior for a migration (at the very least, it should be optional for people who need maximum fidelity for a tool like ReadMe), but at the very least, it should either (a) be disable-able, or (b) be smart enough to not break code spans.
@Arithmomaniac Thank you for opening up this issue!
3839 should address this. The tool will no longer automatically add line breaks but will still honor line breaks that exist in the original documentation string.
Describe the bug
the tsp-openapi3 tool (as of
@typespec/openapi3@0.58.0-dev.6
) automatically breaks long documentation lines into newlines.For example, the following description:
results in this output:
This results in an error being thrown during the conversion because one of the code spans has been split between two different lines:
I personally don't think this long-line-breaking is desirable behavior for a migration (at the very least, it should be optional for people who need maximum fidelity for a tool like ReadMe), but at the very least, it should either (a) be disable-able, or (b) be smart enough to not break code spans.
Reproduction
npx -p @typespec/openapi3@next tsp-openapi3 openAPI.json --output-dir tsp
Checklist