Skip to content

Commit 7345a8c

Browse files
committed
Test sorting parameters and parameter keys together
1 parent 6ba02ff commit 7345a8c

File tree

4 files changed

+34
-13
lines changed

4 files changed

+34
-13
lines changed

test/json-custom/customSort.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"put": ["operationId", "summary", "description", "parameters", "requestBody", "responses"],
66
"patch": ["operationId", "summary", "description", "parameters", "requestBody", "responses"],
77
"delete": ["operationId", "summary", "description", "parameters", "requestBody", "responses"],
8+
"parameters": ["name"],
89
"parameters[*]": ["required", "schema", "name", "in", "description"],
910
"requestBody": ["description", "headers", "content", "links"],
1011
"responses[*]": ["description", "headers", "content", "links"],

test/json-sort-properties/input.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,16 @@
175175
"sold"
176176
]
177177
}
178+
},
179+
{
180+
"name": "limit",
181+
"in": "query",
182+
"description": "Maximal number of pets to return",
183+
"required": false,
184+
"schema": {
185+
"type": "integer",
186+
"default": 100
187+
}
178188
}
179189
],
180190
"responses": {
@@ -517,4 +527,4 @@
517527
}
518528
}
519529
}
520-
}
530+
}

test/json-sort-properties/output.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,16 @@
162162
]
163163
},
164164
"explode": true
165+
},
166+
{
167+
"name": "limit",
168+
"in": "query",
169+
"description": "Maximal number of pets to return",
170+
"required": false,
171+
"schema": {
172+
"type": "integer",
173+
"default": 100
174+
}
165175
}
166176
],
167177
"responses": {

test/yaml-custom-json/output.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -936,14 +936,14 @@
936936
"format": "date-time"
937937
},
938938
"status": {
939-
"description": "Order Status",
940939
"type": "string",
941-
"example": "approved",
940+
"description": "Order Status",
942941
"enum": [
943942
"placed",
944943
"approved",
945944
"delivered"
946-
]
945+
],
946+
"example": "approved"
947947
},
948948
"complete": {
949949
"type": "boolean"
@@ -1056,10 +1056,10 @@
10561056
"example": 12345
10571057
},
10581058
"userStatus": {
1059-
"description": "User Status",
10601059
"type": "integer",
10611060
"format": "int32",
1062-
"example": 1
1061+
"example": 1,
1062+
"description": "User Status"
10631063
}
10641064
},
10651065
"x-swagger-router-model": "io.swagger.petstore.model.User",
@@ -1100,31 +1100,31 @@
11001100
},
11011101
"photoUrls": {
11021102
"type": "array",
1103+
"xml": {
1104+
"wrapped": true
1105+
},
11031106
"items": {
11041107
"type": "string",
11051108
"xml": {
11061109
"name": "photoUrl"
11071110
}
1108-
},
1109-
"xml": {
1110-
"wrapped": true
11111111
}
11121112
},
11131113
"tags": {
11141114
"type": "array",
1115+
"xml": {
1116+
"wrapped": true
1117+
},
11151118
"items": {
11161119
"$ref": "#/components/schemas/Tag",
11171120
"xml": {
11181121
"name": "tag"
11191122
}
1120-
},
1121-
"xml": {
1122-
"wrapped": true
11231123
}
11241124
},
11251125
"status": {
1126-
"description": "pet status in the store",
11271126
"type": "string",
1127+
"description": "pet status in the store",
11281128
"enum": [
11291129
"available",
11301130
"pending",

0 commit comments

Comments
 (0)