Skip to content

Commit 2f239ff

Browse files
committed
#113 fixed typos
1 parent 1f91733 commit 2f239ff

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

packages/openapi-ts-router/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openapi-ts-router",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"private": false,
55
"description": "Thin wrapper around the router of web frameworks like Express and Hono, offering OpenAPI typesafety and seamless integration with validation libraries such as Valibot and Zod",
66
"keywords": [],

packages/openapi-ts-router/src/features/with-express/with-express.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import { formatPath, parseParams, ValidationError } from '../../lib';
66
import {
77
TOpenApiExpressFeature,
88
TOpenApiExpressParsedData,
9-
TOpenApiExpressPathParams,
10-
TOpenApiExpressQueryParams,
119
TParams,
1210
type TOpenApiExpressParamsParserOptions,
1311
type TOpenApiExpressRequest,
@@ -96,11 +94,11 @@ function parseParamsMiddleware<GPathOperation>(
9694
query: parseQueryParams(
9795
req.query as TParams,
9896
parseQueryParamsBlacklist
99-
) as TOpenApiExpressQueryParams<GPathOperation>,
97+
) as TOperationQueryParams<GPathOperation>,
10098
params: parsePathParams(
10199
req.params as TParams,
102100
parsePathParamsBlacklist
103-
) as TOpenApiExpressPathParams<GPathOperation>
101+
) as TOperationPathParams<GPathOperation>
104102
} as TOpenApiExpressParsedData<GPathOperation>;
105103
}
106104
next();

packages/openapi-ts-router/src/types/features/express.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,6 @@ export type TOpenApiExpressRequest<GPathOperation> = express.Request<
8484
valid: TOpenApiExpressParsedData<GPathOperation>;
8585
};
8686

87-
export type TOpenApiExpressQueryParams<GPathOperation> =
88-
TOperationQueryParams<GPathOperation> extends never
89-
? core.Query
90-
: TOperationQueryParams<GPathOperation>;
91-
92-
export type TOpenApiExpressPathParams<GPathOperation> =
93-
TOperationPathParams<GPathOperation> extends never
94-
? core.ParamsDictionary
95-
: TOperationPathParams<GPathOperation>;
96-
9787
export type TOpenApiExpressRequestBody<GPathOperation> = TRequestBody<GPathOperation>;
9888

9989
export type TOpenApiExpressResponse<GPathOperation> = express.Response<
@@ -107,12 +97,12 @@ export type TOpenApiExpressParsedData<GPathOperation> = TOpenApiExpressParsedQue
10797
export type TOpenApiExpressParsedQuery<GPathOperation> =
10898
TOperationQueryParams<GPathOperation> extends never
10999
? { query?: never }
110-
: { query: TOpenApiExpressQueryParams<GPathOperation> };
100+
: { query: TOperationQueryParams<GPathOperation> };
111101

112102
export type TOpenApiExpressParsedParams<GPathOperation> =
113103
TOperationPathParams<GPathOperation> extends never
114104
? { params?: never }
115-
: { params: TOpenApiExpressPathParams<GPathOperation> };
105+
: { params: TOperationPathParams<GPathOperation> };
116106

117107
// =============================================================================
118108
// Router Options

0 commit comments

Comments
 (0)