Commit f3a72ed
authored
Feature/issue 3051 swagger preserve rpc order (#3500)
* add preserveRPCOrder option to registry options
* add preserve_rpc_order flag to protoc-gen-openapiv2 main
* convert openapiPathsObject from map to ordered data structure
* alphabetically sort paths if preserveRPCOrder is false during swagger file gen
* add tests for path order preservation in generate function
* add tests for path preservation in the renderServices function
* fix bugs in generator.go tests
* regenerate files
* fix incorrect boolean argument to require generate
* fix test error log in template_test.go not reflecting openapiPathItemObject change
* create custom json and yaml marshallers for openapiPathsObject
* marshal PathItemObject in custom yaml marshaller, instead of encode
* regenerate files
* further test template.go functions
* fix golangci warnings
* document `preserve_rpc_order` option
* regenerate files after rebase1 parent 0651476 commit f3a72ed
File tree
8 files changed
+2429
-82
lines changed- docs/docs/mapping
- internal/descriptor
- protoc-gen-openapiv2
- internal/genopenapi
8 files changed
+2429
-82
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
847 | 847 | | |
848 | 848 | | |
849 | 849 | | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
850 | 877 | | |
851 | 878 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
149 | 153 | | |
150 | 154 | | |
151 | 155 | | |
| |||
811 | 815 | | |
812 | 816 | | |
813 | 817 | | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
115 | 167 | | |
116 | 168 | | |
117 | 169 | | |
| |||
341 | 393 | | |
342 | 394 | | |
343 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
344 | 399 | | |
345 | 400 | | |
346 | 401 | | |
| |||
351 | 406 | | |
352 | 407 | | |
353 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
354 | 412 | | |
355 | 413 | | |
356 | 414 | | |
| |||
364 | 422 | | |
365 | 423 | | |
366 | 424 | | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
367 | 431 | | |
368 | 432 | | |
369 | 433 | | |
| |||
0 commit comments