Commit 692fb3f
authored
refactor: replace stoplight/yaml with yaml (eemeli) (#206)
* refactor: migrate YAML parser from stoplight/yaml to yaml (eemeli)
Problem: stoplight/yaml has unfixed bugs in block scalar chomping (|+
loses trailing blank lines, explicit indent indicators like |2 produce a
spurious leading newline). Furthermore the library is effectivelly unmaintained.
Solution: Replace stoplight/yaml with the actively maintained yaml
(eemeli) package. Comment preservation is re-implemented using a
path-based extract/inject strategy.
* docs: remove stoplight studio section from readme
* test: update expected output for quote normalization
* test: update expected output for behaviors broken in stoplight/yaml
- yaml-default-newline: block scalar chomping (|+ keep, |- strip, |
clip) now behaves correctly. |+ doesn't lose trailing blank lines,
and spurious leading newlines are not created.
- yaml-no-sort-keep-comments: a valueCommentBefore (key: # comment
above a block node) is re-emitted on its own line below the key
rather than inline. This is a known rendering difference of the new
path-based inject approach; the YAML is semantically equivalent.1 parent 904d78c commit 692fb3f
78 files changed
Lines changed: 1330 additions & 1331 deletions
File tree
- test
- _split
- json-custom-yaml
- json-default-yaml
- overlay-combi
- overlay-extends-remote
- overlay-params
- overlay-preserve-required
- yaml-big-numbers
- yaml-casing-component-keys
- yaml-casing-component-parameters-keys
- yaml-casing-operationId
- yaml-casing-parameters
- yaml-casing-properties
- yaml-casing
- yaml-convert-3.0-3.1
- yaml-convert-3.0-3.2
- yaml-convert-3.1-3.2
- yaml-custom-3.1
- yaml-custom
- yaml-default-bug-examples-properties
- yaml-default-bug-nested-properties
- yaml-default-bug-numbers-x-tag
- yaml-default-newline
- yaml-default
- yaml-filter-custom-default-3.1
- yaml-filter-custom-flags-flagsValues
- yaml-filter-custom-flagsvalue-array
- yaml-filter-custom-flagsvalue-value-array
- yaml-filter-custom-flagsvalue-value
- yaml-filter-custom-flags
- yaml-filter-custom-methods
- yaml-filter-custom-operationids
- yaml-filter-custom-operations-method-wildcard
- yaml-filter-custom-operations-path-wildcard
- yaml-filter-custom-operations
- yaml-filter-custom-tags
- yaml-filter-custom
- yaml-filter-default
- yaml-filter-inverse-all-methods
- yaml-filter-inverse-flags-flagsValues
- yaml-filter-inverse-flagsvalue-value-array
- yaml-filter-inverse-flags
- yaml-filter-inverse-methods
- yaml-filter-inverse-operationids-free-form
- yaml-filter-inverse-operationids
- yaml-filter-inverse-request-content
- yaml-filter-inverse-response-content
- yaml-filter-inverse-tags
- yaml-filter-markdown-comments
- yaml-filter-replace-text
- yaml-filter-request-content
- yaml-filter-response-content
- yaml-filter-security-empty
- yaml-filter-unused-components
- yaml-linewidth
- yaml-no-sort-keep-comments
- yaml-no-sort
- yaml-preserve-empty-no-filter
- yaml-preserve-empty-objects-default
- yaml-preserve-empty-objects-false
- yaml-preserve-empty-objects-schema-only
- yaml-preserve-empty-objects-true
- yaml-ref-quotes
- yaml-remove-empty-filter
- yaml-rename
- yaml-sort-components
- yaml-sort-keep-comments
- yaml-sort-skip-components
- yaml-stoplight-studio-style
- yaml-strip-flags
- yaml-unused-extra
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1699 | 1699 | | |
1700 | 1700 | | |
1701 | 1701 | | |
1702 | | - | |
1703 | | - | |
1704 | | - | |
1705 | | - | |
1706 | | - | |
1707 | | - | |
1708 | | - | |
1709 | | - | |
1710 | | - | |
1711 | | - | |
1712 | | - | |
1713 | | - | |
1714 | 1702 | | |
1715 | 1703 | | |
1716 | 1704 | | |
| |||
1727 | 1715 | | |
1728 | 1716 | | |
1729 | 1717 | | |
1730 | | - | |
| 1718 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
| 134 | + | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
341 | 341 | | |
342 | | - | |
343 | | - | |
| 342 | + | |
| 343 | + | |
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
| 353 | + | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
| 356 | + | |
0 commit comments