Commit 01c12f5
authored
[Bug] Handle the '\r\n' newline correctly (#169)
[Bug] Handle the '\r\n' newline correctly
### Motivation
Fixes #143, which tracks including the '\r\n' newline in a description in the OpenAPI document.
### Modifications
Replaces the '\r\n' character with '\n' before rendering comments, as '\n' is handled properly.
### Result
OpenAPI documents that include '\r\n' in a description produce compiling code now.
### Test Plan
Added a unit test for this case.
Reviewed by: simonjbeaumont
Builds:
✔︎ pull request validation (5.8) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (docc test) - Build finished.
✔︎ pull request validation (integration test) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
#1691 parent b3c2b09 commit 01c12f5
File tree
6 files changed
+30
-11
lines changed- Sources/_OpenAPIGeneratorCore/Renderer
- Tests
- OpenAPIGeneratorCoreTests/Renderer
- OpenAPIGeneratorReferenceTests/Resources
- Docs
- ReferenceSources/Petstore
6 files changed
+30
-11
lines changedLines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | | - | |
62 | | - | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
721 | 723 | | |
722 | 724 | | |
723 | 725 | | |
724 | | - | |
| 726 | + | |
725 | 727 | | |
726 | 728 | | |
727 | 729 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
70 | 83 | | |
71 | 84 | | |
72 | 85 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
704 | 705 | | |
705 | 706 | | |
706 | 707 | | |
707 | | - | |
| 708 | + | |
| 709 | + | |
708 | 710 | | |
709 | 711 | | |
710 | 712 | | |
| |||
0 commit comments