Skip to content

Commit 055bd28

Browse files
committed
test: add failing e2e test for route matching
1 parent bb7e271 commit 055bd28

File tree

13 files changed

+477
-0
lines changed

13 files changed

+477
-0
lines changed

e2e/openapi.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tags:
77
- name: validation
88
- name: escape hatches
99
- name: media types
10+
- name: route matching
1011
servers:
1112
- url: '{protocol}://{host}:{port}'
1213
variables:
@@ -196,6 +197,7 @@ paths:
196197
type: array
197198
items:
198199
type: string
200+
199201
/validation/numbers/random-number:
200202
get:
201203
tags:
@@ -355,6 +357,36 @@ paths:
355357
schema:
356358
type: string
357359

360+
/route-matching/fixed-field:
361+
get:
362+
operationId: routeMatchingGetByFixedField
363+
tags:
364+
- route matching
365+
responses:
366+
200:
367+
description: 'ok'
368+
content:
369+
application/json:
370+
schema: {}
371+
372+
/route-matching/{id}:
373+
get:
374+
operationId: routeMatchingGetById
375+
tags:
376+
- route matching
377+
parameters:
378+
- name: id
379+
in: path
380+
required: true
381+
schema:
382+
type: string
383+
responses:
384+
200:
385+
description: 'ok'
386+
content:
387+
application/json:
388+
schema: {}
389+
358390
components:
359391
responses:
360392
GetHeaders:

e2e/src/express.entrypoint.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {createEscapeHatchesRouter} from "./routes/express/escape-hatches.ts"
44
import {createMediaTypesRouter} from "./routes/express/media-types.ts"
55
import {createQueryParametersRouter} from "./routes/express/query-parameters.ts"
66
import {createRequestHeadersRouter} from "./routes/express/request-headers.ts"
7+
import {createRouteMatchingRouter} from "./routes/express/route-matching.ts"
78
import {createValidationRouter} from "./routes/express/validation.ts"
89
import {createErrorResponse} from "./shared.ts"
910

@@ -15,12 +16,14 @@ function createRouter() {
1516
const escapeHatchesRouter = createEscapeHatchesRouter()
1617
const mediaTypesRouter = createMediaTypesRouter()
1718
const queryParametersRouter = createQueryParametersRouter()
19+
const routeMatchingRouter = createRouteMatchingRouter()
1820

1921
router.use(requestHeadersRouter)
2022
router.use(validationRouter)
2123
router.use(escapeHatchesRouter)
2224
router.use(mediaTypesRouter)
2325
router.use(queryParametersRouter)
26+
router.use(routeMatchingRouter)
2427

2528
return router
2629
}

e2e/src/generated/client/axios/client.ts

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/src/generated/client/fetch/client.ts

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/src/generated/server/express/models.ts

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/src/generated/server/express/routes/route-matching.ts

Lines changed: 142 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/src/generated/server/koa/models.ts

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)