Skip to content

Commit 1adfd4f

Browse files
authored
Fix the bug where query parameter is not hoist to the top (#46)
1 parent 4231dc4 commit 1adfd4f

File tree

5 files changed

+114
-62
lines changed

5 files changed

+114
-62
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "crosswalk",
3-
"version": "2.2.3",
3+
"version": "2.2.4",
44
"description": "Type-safe express routing with TypeScript",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/__tests__/__snapshots__/openapi.test.ts.snap

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,15 @@ exports[`Open API V3 should have the expected endpoints: open-api-v3 1`] = `
129129
],
130130
"type": "object",
131131
},
132+
"QueryParams": {
133+
"additionalProperties": false,
134+
"properties": {
135+
"createdAt": {
136+
"type": "string",
137+
},
138+
},
139+
"type": "object",
140+
},
132141
"User": {
133142
"additionalProperties": false,
134143
"properties": {
@@ -246,6 +255,15 @@ exports[`Open API V3 should have the expected endpoints: open-api-v3 1`] = `
246255
"summary": undefined,
247256
},
248257
"post": {
258+
"parameters": [
259+
{
260+
"in": "query",
261+
"name": "createdAt",
262+
"schema": {
263+
"type": "string",
264+
},
265+
},
266+
],
249267
"requestBody": {
250268
"content": {
251269
"application/json": {
@@ -788,6 +806,15 @@ exports[`Open API integration should have the expected endpoints: open-api 1`] =
788806
],
789807
"type": "object",
790808
},
809+
"QueryParams": {
810+
"additionalProperties": false,
811+
"properties": {
812+
"createdAt": {
813+
"type": "string",
814+
},
815+
},
816+
"type": "object",
817+
},
791818
"User": {
792819
"additionalProperties": false,
793820
"properties": {

0 commit comments

Comments
 (0)