@orpc/openapi 2.0.0-beta.2 → 2.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/fetch/index.d.mts +1 -1
- package/dist/adapters/fetch/index.d.ts +1 -1
- package/dist/adapters/fetch/index.mjs +1 -1
- package/dist/adapters/node/index.d.mts +1 -1
- package/dist/adapters/node/index.d.ts +1 -1
- package/dist/adapters/node/index.mjs +1 -1
- package/dist/adapters/standard/index.d.mts +1 -1
- package/dist/adapters/standard/index.d.ts +1 -1
- package/dist/adapters/standard/index.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +3 -3
- package/dist/shared/{openapi.DR-y5p-D.mjs → openapi.B3H7yHQa.mjs} +24 -21
- package/dist/shared/{openapi.BYcWgK1j.d.ts → openapi.DBYxUpK8.d.ts} +14 -11
- package/dist/shared/{openapi.XeW6_5tm.d.mts → openapi.DuDd2iQz.d.mts} +14 -11
- package/package.json +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Context, Router } from '@orpc/server';
|
|
2
2
|
import { FetchHandler, FetchHandlerOptions } from '@orpc/server/fetch';
|
|
3
3
|
import { StandardHandlerOptions } from '@orpc/server/standard';
|
|
4
|
-
import { O as OpenAPIHandlerCodecOptions } from '../../shared/openapi.
|
|
4
|
+
import { O as OpenAPIHandlerCodecOptions } from '../../shared/openapi.DuDd2iQz.mjs';
|
|
5
5
|
import { ClientContext } from '@orpc/client';
|
|
6
6
|
import { FetchLinkTransportOptions } from '@orpc/client/fetch';
|
|
7
7
|
import { StandardLink, StandardLinkOptions } from '@orpc/client/standard';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Context, Router } from '@orpc/server';
|
|
2
2
|
import { FetchHandler, FetchHandlerOptions } from '@orpc/server/fetch';
|
|
3
3
|
import { StandardHandlerOptions } from '@orpc/server/standard';
|
|
4
|
-
import { O as OpenAPIHandlerCodecOptions } from '../../shared/openapi.
|
|
4
|
+
import { O as OpenAPIHandlerCodecOptions } from '../../shared/openapi.DBYxUpK8.js';
|
|
5
5
|
import { ClientContext } from '@orpc/client';
|
|
6
6
|
import { FetchLinkTransportOptions } from '@orpc/client/fetch';
|
|
7
7
|
import { StandardLink, StandardLinkOptions } from '@orpc/client/standard';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FetchHandler } from '@orpc/server/fetch';
|
|
2
2
|
import { StandardHandler } from '@orpc/server/standard';
|
|
3
|
-
import { O as OpenAPIHandlerCodec } from '../../shared/openapi.
|
|
3
|
+
import { O as OpenAPIHandlerCodec } from '../../shared/openapi.B3H7yHQa.mjs';
|
|
4
4
|
import { FetchLinkTransport } from '@orpc/client/fetch';
|
|
5
5
|
import { StandardLink } from '@orpc/client/standard';
|
|
6
6
|
import { O as OpenAPILinkCodec } from '../../shared/openapi.B2SK0ZAr.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Context, Router } from '@orpc/server';
|
|
2
2
|
import { NodeHttpHandler, NodeHttpHandlerOptions } from '@orpc/server/node';
|
|
3
3
|
import { StandardHandlerOptions } from '@orpc/server/standard';
|
|
4
|
-
import { O as OpenAPIHandlerCodecOptions } from '../../shared/openapi.
|
|
4
|
+
import { O as OpenAPIHandlerCodecOptions } from '../../shared/openapi.DuDd2iQz.mjs';
|
|
5
5
|
import '@orpc/client';
|
|
6
6
|
import '@orpc/shared';
|
|
7
7
|
import '@standardserver/core';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Context, Router } from '@orpc/server';
|
|
2
2
|
import { NodeHttpHandler, NodeHttpHandlerOptions } from '@orpc/server/node';
|
|
3
3
|
import { StandardHandlerOptions } from '@orpc/server/standard';
|
|
4
|
-
import { O as OpenAPIHandlerCodecOptions } from '../../shared/openapi.
|
|
4
|
+
import { O as OpenAPIHandlerCodecOptions } from '../../shared/openapi.DBYxUpK8.js';
|
|
5
5
|
import '@orpc/client';
|
|
6
6
|
import '@orpc/shared';
|
|
7
7
|
import '@standardserver/core';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NodeHttpHandler } from '@orpc/server/node';
|
|
2
2
|
import { StandardHandler } from '@orpc/server/standard';
|
|
3
|
-
import { O as OpenAPIHandlerCodec } from '../../shared/openapi.
|
|
3
|
+
import { O as OpenAPIHandlerCodec } from '../../shared/openapi.B3H7yHQa.mjs';
|
|
4
4
|
import '@orpc/client';
|
|
5
5
|
import '@orpc/server';
|
|
6
6
|
import '@orpc/shared';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as OpenAPIHandlerCodec, b as
|
|
1
|
+
export { a as OpenAPIHandlerCodec, b as OpenAPIHandlerCodecCore, c as OpenAPIHandlerCodecCoreOptions, O as OpenAPIHandlerCodecOptions, d as OpenAPIMatcher, e as OpenAPIMatcherOptions } from '../../shared/openapi.DuDd2iQz.mjs';
|
|
2
2
|
import { ClientContext, ClientOptions, AnyORPCError } from '@orpc/client';
|
|
3
3
|
import { StandardLinkCodec, StandardLinkCodecDecodedResponse } from '@orpc/client/standard';
|
|
4
4
|
import { RouterContract } from '@orpc/contract';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as OpenAPIHandlerCodec, b as
|
|
1
|
+
export { a as OpenAPIHandlerCodec, b as OpenAPIHandlerCodecCore, c as OpenAPIHandlerCodecCoreOptions, O as OpenAPIHandlerCodecOptions, d as OpenAPIMatcher, e as OpenAPIMatcherOptions } from '../../shared/openapi.DBYxUpK8.js';
|
|
2
2
|
import { ClientContext, ClientOptions, AnyORPCError } from '@orpc/client';
|
|
3
3
|
import { StandardLinkCodec, StandardLinkCodecDecodedResponse } from '@orpc/client/standard';
|
|
4
4
|
import { RouterContract } from '@orpc/contract';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { O as OpenAPIHandlerCodec, a as
|
|
1
|
+
export { O as OpenAPIHandlerCodec, a as OpenAPIHandlerCodecCore, b as OpenAPIMatcher } from '../../shared/openapi.B3H7yHQa.mjs';
|
|
2
2
|
export { O as OpenAPILinkCodec, a as OpenAPILinkCodecError } from '../../shared/openapi.B2SK0ZAr.mjs';
|
|
3
3
|
import '@orpc/client';
|
|
4
4
|
import '@orpc/server';
|
package/dist/index.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ export { d as JsonifiedArray, O as OpenAPIOperationObject } from './shared/opena
|
|
|
9
9
|
export { a as OpenAPIFunction, O as OpenAPIMeta, b as OpenAPIMetaPlugin, c as OpenAPIMethodMetaPlugin, d as OpenAPIPathMetaPlugin, e as OpenAPIPrefixMetaPlugin, f as OpenAPISpecMetaPlugin, g as getOpenAPIMeta, o as openapi } from './shared/openapi.BcEtAxQj.mjs';
|
|
10
10
|
import { JsonSchemaConverter, JsonSchema } from '@orpc/json-schema';
|
|
11
11
|
import { AnyRouter, AnyProcedure } from '@orpc/server';
|
|
12
|
-
|
|
12
|
+
export { StandardBodyHint } from '@standardserver/core';
|
|
13
13
|
import '@hey-api/spec-types';
|
|
14
14
|
|
|
15
15
|
interface ContractJsonifiedCaller<TClientContext extends ClientContext> {
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { d as JsonifiedArray, O as OpenAPIOperationObject } from './shared/opena
|
|
|
9
9
|
export { a as OpenAPIFunction, O as OpenAPIMeta, b as OpenAPIMetaPlugin, c as OpenAPIMethodMetaPlugin, d as OpenAPIPathMetaPlugin, e as OpenAPIPrefixMetaPlugin, f as OpenAPISpecMetaPlugin, g as getOpenAPIMeta, o as openapi } from './shared/openapi.BQzzr4-4.js';
|
|
10
10
|
import { JsonSchemaConverter, JsonSchema } from '@orpc/json-schema';
|
|
11
11
|
import { AnyRouter, AnyProcedure } from '@orpc/server';
|
|
12
|
-
|
|
12
|
+
export { StandardBodyHint } from '@standardserver/core';
|
|
13
13
|
import '@hey-api/spec-types';
|
|
14
14
|
|
|
15
15
|
interface ContractJsonifiedCaller<TClientContext extends ClientContext> {
|
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { g as getOpenAPIMeta } from './shared/openapi.B9PQzqBn.mjs';
|
|
|
6
6
|
export { o as openapi } from './shared/openapi.B9PQzqBn.mjs';
|
|
7
7
|
import { COMMON_ERROR_STATUS_MAP } from '@orpc/client';
|
|
8
8
|
export { COMMON_ERROR_STATUS_MAP } from '@orpc/client';
|
|
9
|
-
import { DelegatingJsonSchemaConverter, StandardJsonSchemaConverter, combineJsonSchemasWithComposition, isUnconstrainedSchema, extractJsonObjectSchemaEntries, combineJsonObjectSchemaEntries, isJsonPrimitiveSchema, matchArrayableJsonSchema,
|
|
9
|
+
import { DelegatingJsonSchemaConverter, StandardJsonSchemaConverter, combineJsonSchemasWithComposition, isUnconstrainedSchema, extractJsonObjectSchemaEntries, combineJsonObjectSchemaEntries, flattenJsonUnionSchema, isJsonPrimitiveSchema, matchArrayableJsonSchema, ensureJsonSchemaObject, isJsonFileSchema, mapJsonSchemaRefs, encodeJsonPointerSegment, decodeJsonPointerSegment } from '@orpc/json-schema';
|
|
10
10
|
import { walkProcedureContractsAsync, DEFAULT_SUCCESS_STATUS, DEFAULT_ERROR_STATUS } from '@orpc/server';
|
|
11
11
|
import { toArray, clone, value, pathToHttpPath, mergeHttpPath, stringifyJSON, findDeepMatches, isPlainObject, isDeepEqual } from '@orpc/shared';
|
|
12
12
|
import '@standardserver/core';
|
|
@@ -202,9 +202,9 @@ ${errors.join("\n\n")}`
|
|
|
202
202
|
};
|
|
203
203
|
delete parameter.schema;
|
|
204
204
|
} else if (style === void 0) {
|
|
205
|
-
if (!isJsonPrimitiveSchema(
|
|
205
|
+
if (flattenJsonUnionSchema(schema2).some((s) => !isJsonPrimitiveSchema(s))) {
|
|
206
206
|
const arrayable = matchArrayableJsonSchema(schema2);
|
|
207
|
-
if (!arrayable ||
|
|
207
|
+
if (!arrayable || flattenJsonUnionSchema(arrayable[0]).some((s) => !isJsonPrimitiveSchema(s))) {
|
|
208
208
|
parameter.style = "deepObject";
|
|
209
209
|
parameter.explode = true;
|
|
210
210
|
}
|
|
@@ -124,15 +124,11 @@ function decodeParams(params) {
|
|
|
124
124
|
return Object.fromEntries(Object.entries(params).map(([key, val]) => [key, tryDecodeURIComponent(val)]));
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
class
|
|
128
|
-
}
|
|
129
|
-
class OpenAPIHandlerCodec {
|
|
130
|
-
matcher;
|
|
127
|
+
class OpenAPIHandlerCodecCore {
|
|
131
128
|
serializer;
|
|
132
129
|
errorStatusMap;
|
|
133
130
|
customErrorResponseBodySerializer;
|
|
134
|
-
constructor(
|
|
135
|
-
this.matcher = new OpenAPIMatcher(router, options);
|
|
131
|
+
constructor(options = {}) {
|
|
136
132
|
this.serializer = options.serializer ?? new OpenAPISerializer();
|
|
137
133
|
this.errorStatusMap = options.errorStatusMap ?? COMMON_ERROR_STATUS_MAP;
|
|
138
134
|
this.customErrorResponseBodySerializer = options.customErrorResponseBodyEncoder;
|
|
@@ -166,20 +162,8 @@ class OpenAPIHandlerCodec {
|
|
|
166
162
|
body: this.serializer.deserialize(await request.resolveBody(meta?.requestBodyHint))
|
|
167
163
|
};
|
|
168
164
|
}
|
|
169
|
-
async resolveProcedure(request, options) {
|
|
170
|
-
const [pathname] = parseStandardUrl(request.url);
|
|
171
|
-
const matched = await this.matcher.match(request.method, pathname, options.prefix);
|
|
172
|
-
if (!matched) {
|
|
173
|
-
return void 0;
|
|
174
|
-
}
|
|
175
|
-
return {
|
|
176
|
-
procedure: matched.procedure,
|
|
177
|
-
path: matched.path,
|
|
178
|
-
decodeInput: () => this.decodeInput(matched, request)
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
165
|
/**
|
|
182
|
-
* @throws {
|
|
166
|
+
* @throws {TypeError} If `outputStructure` is "detailed" and the output doesn't match the expected structure.
|
|
183
167
|
*/
|
|
184
168
|
encodeOutput(output, procedure, path, _options) {
|
|
185
169
|
const meta = getOpenAPIMeta(procedure);
|
|
@@ -193,7 +177,7 @@ class OpenAPIHandlerCodec {
|
|
|
193
177
|
};
|
|
194
178
|
}
|
|
195
179
|
if (!isValidDetailedOutput(output)) {
|
|
196
|
-
throw new
|
|
180
|
+
throw new TypeError(`
|
|
197
181
|
Invalid "detailed" output structure returned by procedure (${path.join(".")}):
|
|
198
182
|
\u2022 Expected an object with optional properties:
|
|
199
183
|
- status (number 200-399)
|
|
@@ -278,6 +262,25 @@ class OpenAPIHandlerCodec {
|
|
|
278
262
|
return parsed;
|
|
279
263
|
}
|
|
280
264
|
}
|
|
265
|
+
class OpenAPIHandlerCodec extends OpenAPIHandlerCodecCore {
|
|
266
|
+
matcher;
|
|
267
|
+
constructor(router, options = {}) {
|
|
268
|
+
super(options);
|
|
269
|
+
this.matcher = new OpenAPIMatcher(router, options);
|
|
270
|
+
}
|
|
271
|
+
async resolveProcedure(request, options) {
|
|
272
|
+
const [pathname] = parseStandardUrl(request.url);
|
|
273
|
+
const matched = await this.matcher.match(request.method, pathname, options.prefix);
|
|
274
|
+
if (!matched) {
|
|
275
|
+
return void 0;
|
|
276
|
+
}
|
|
277
|
+
return {
|
|
278
|
+
procedure: matched.procedure,
|
|
279
|
+
path: matched.path,
|
|
280
|
+
decodeInput: () => this.decodeInput(matched, request)
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
}
|
|
281
284
|
function isValidDetailedOutput(output) {
|
|
282
285
|
if (!isTypescriptObject(output)) {
|
|
283
286
|
return false;
|
|
@@ -312,4 +315,4 @@ function decodeDelimitedObject(value, delimiter) {
|
|
|
312
315
|
return obj;
|
|
313
316
|
}
|
|
314
317
|
|
|
315
|
-
export { OpenAPIHandlerCodec as O,
|
|
318
|
+
export { OpenAPIHandlerCodec as O, OpenAPIHandlerCodecCore as a, OpenAPIMatcher as b };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnyORPCError } from '@orpc/client';
|
|
2
2
|
import { AnyProcedure, AnyRouter, Context } from '@orpc/server';
|
|
3
|
-
import {
|
|
3
|
+
import { StandardHandlerHandleOptions, StandardHandlerCodec, StandardHandlerCodecResolvedProcedure } from '@orpc/server/standard';
|
|
4
4
|
import { Value, Promisable } from '@orpc/shared';
|
|
5
5
|
import { StandardLazyRequest, StandardResponse } from '@standardserver/core';
|
|
6
6
|
import { AnyProcedureContract } from '@orpc/contract';
|
|
@@ -31,9 +31,7 @@ declare class OpenAPIMatcher {
|
|
|
31
31
|
private resolveProcedure;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
interface OpenAPIHandlerCodecOptions<_T extends Context> extends OpenAPIMatcherOptions {
|
|
34
|
+
interface OpenAPIHandlerCodecCoreOptions<_T extends Context> {
|
|
37
35
|
/**
|
|
38
36
|
* Override the default OpenAPI serializer.
|
|
39
37
|
*/
|
|
@@ -55,25 +53,30 @@ interface OpenAPIHandlerCodecOptions<_T extends Context> extends OpenAPIMatcherO
|
|
|
55
53
|
*/
|
|
56
54
|
customErrorResponseBodyEncoder?: (error: AnyORPCError) => unknown;
|
|
57
55
|
}
|
|
58
|
-
declare class
|
|
59
|
-
private readonly matcher;
|
|
56
|
+
declare class OpenAPIHandlerCodecCore<T extends Context> {
|
|
60
57
|
private readonly serializer;
|
|
61
58
|
private readonly errorStatusMap;
|
|
62
59
|
private readonly customErrorResponseBodySerializer;
|
|
63
|
-
constructor(
|
|
60
|
+
constructor(options?: OpenAPIHandlerCodecCoreOptions<T>);
|
|
64
61
|
decodeInput(matched: {
|
|
65
62
|
procedure: AnyProcedure;
|
|
66
63
|
params?: undefined | Record<string, string>;
|
|
67
64
|
}, request: StandardLazyRequest): Promise<unknown>;
|
|
68
|
-
resolveProcedure(request: StandardLazyRequest, options: StandardHandlerHandleOptions<T>): Promise<StandardHandlerCodecResolvedProcedure | undefined>;
|
|
69
65
|
/**
|
|
70
|
-
* @throws {
|
|
66
|
+
* @throws {TypeError} If `outputStructure` is "detailed" and the output doesn't match the expected structure.
|
|
71
67
|
*/
|
|
72
68
|
encodeOutput(output: unknown, procedure: AnyProcedure, path: string[], _options: StandardHandlerHandleOptions<T>): Promisable<StandardResponse>;
|
|
73
69
|
encodeError(error: AnyORPCError, _procedure: AnyProcedure, _path: string[], _options: StandardHandlerHandleOptions<T>): Promisable<StandardResponse>;
|
|
74
70
|
private deserializeQuery;
|
|
75
71
|
private deserializeParams;
|
|
76
72
|
}
|
|
73
|
+
interface OpenAPIHandlerCodecOptions<T extends Context> extends OpenAPIHandlerCodecCoreOptions<T>, OpenAPIMatcherOptions {
|
|
74
|
+
}
|
|
75
|
+
declare class OpenAPIHandlerCodec<T extends Context> extends OpenAPIHandlerCodecCore<T> implements StandardHandlerCodec<T> {
|
|
76
|
+
private readonly matcher;
|
|
77
|
+
constructor(router: AnyRouter, options?: OpenAPIHandlerCodecOptions<T>);
|
|
78
|
+
resolveProcedure(request: StandardLazyRequest, options: StandardHandlerHandleOptions<T>): Promise<StandardHandlerCodecResolvedProcedure | undefined>;
|
|
79
|
+
}
|
|
77
80
|
|
|
78
|
-
export { OpenAPIHandlerCodec as a,
|
|
79
|
-
export type { OpenAPIHandlerCodecOptions as O, OpenAPIMatcherOptions as
|
|
81
|
+
export { OpenAPIHandlerCodec as a, OpenAPIHandlerCodecCore as b, OpenAPIMatcher as d };
|
|
82
|
+
export type { OpenAPIHandlerCodecOptions as O, OpenAPIHandlerCodecCoreOptions as c, OpenAPIMatcherOptions as e };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnyORPCError } from '@orpc/client';
|
|
2
2
|
import { AnyProcedure, AnyRouter, Context } from '@orpc/server';
|
|
3
|
-
import {
|
|
3
|
+
import { StandardHandlerHandleOptions, StandardHandlerCodec, StandardHandlerCodecResolvedProcedure } from '@orpc/server/standard';
|
|
4
4
|
import { Value, Promisable } from '@orpc/shared';
|
|
5
5
|
import { StandardLazyRequest, StandardResponse } from '@standardserver/core';
|
|
6
6
|
import { AnyProcedureContract } from '@orpc/contract';
|
|
@@ -31,9 +31,7 @@ declare class OpenAPIMatcher {
|
|
|
31
31
|
private resolveProcedure;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
interface OpenAPIHandlerCodecOptions<_T extends Context> extends OpenAPIMatcherOptions {
|
|
34
|
+
interface OpenAPIHandlerCodecCoreOptions<_T extends Context> {
|
|
37
35
|
/**
|
|
38
36
|
* Override the default OpenAPI serializer.
|
|
39
37
|
*/
|
|
@@ -55,25 +53,30 @@ interface OpenAPIHandlerCodecOptions<_T extends Context> extends OpenAPIMatcherO
|
|
|
55
53
|
*/
|
|
56
54
|
customErrorResponseBodyEncoder?: (error: AnyORPCError) => unknown;
|
|
57
55
|
}
|
|
58
|
-
declare class
|
|
59
|
-
private readonly matcher;
|
|
56
|
+
declare class OpenAPIHandlerCodecCore<T extends Context> {
|
|
60
57
|
private readonly serializer;
|
|
61
58
|
private readonly errorStatusMap;
|
|
62
59
|
private readonly customErrorResponseBodySerializer;
|
|
63
|
-
constructor(
|
|
60
|
+
constructor(options?: OpenAPIHandlerCodecCoreOptions<T>);
|
|
64
61
|
decodeInput(matched: {
|
|
65
62
|
procedure: AnyProcedure;
|
|
66
63
|
params?: undefined | Record<string, string>;
|
|
67
64
|
}, request: StandardLazyRequest): Promise<unknown>;
|
|
68
|
-
resolveProcedure(request: StandardLazyRequest, options: StandardHandlerHandleOptions<T>): Promise<StandardHandlerCodecResolvedProcedure | undefined>;
|
|
69
65
|
/**
|
|
70
|
-
* @throws {
|
|
66
|
+
* @throws {TypeError} If `outputStructure` is "detailed" and the output doesn't match the expected structure.
|
|
71
67
|
*/
|
|
72
68
|
encodeOutput(output: unknown, procedure: AnyProcedure, path: string[], _options: StandardHandlerHandleOptions<T>): Promisable<StandardResponse>;
|
|
73
69
|
encodeError(error: AnyORPCError, _procedure: AnyProcedure, _path: string[], _options: StandardHandlerHandleOptions<T>): Promisable<StandardResponse>;
|
|
74
70
|
private deserializeQuery;
|
|
75
71
|
private deserializeParams;
|
|
76
72
|
}
|
|
73
|
+
interface OpenAPIHandlerCodecOptions<T extends Context> extends OpenAPIHandlerCodecCoreOptions<T>, OpenAPIMatcherOptions {
|
|
74
|
+
}
|
|
75
|
+
declare class OpenAPIHandlerCodec<T extends Context> extends OpenAPIHandlerCodecCore<T> implements StandardHandlerCodec<T> {
|
|
76
|
+
private readonly matcher;
|
|
77
|
+
constructor(router: AnyRouter, options?: OpenAPIHandlerCodecOptions<T>);
|
|
78
|
+
resolveProcedure(request: StandardLazyRequest, options: StandardHandlerHandleOptions<T>): Promise<StandardHandlerCodecResolvedProcedure | undefined>;
|
|
79
|
+
}
|
|
77
80
|
|
|
78
|
-
export { OpenAPIHandlerCodec as a,
|
|
79
|
-
export type { OpenAPIHandlerCodecOptions as O, OpenAPIMatcherOptions as
|
|
81
|
+
export { OpenAPIHandlerCodec as a, OpenAPIHandlerCodecCore as b, OpenAPIMatcher as d };
|
|
82
|
+
export type { OpenAPIHandlerCodecOptions as O, OpenAPIHandlerCodecCoreOptions as c, OpenAPIMatcherOptions as e };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/openapi",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.dev",
|
|
7
7
|
"repository": {
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
"@types/swagger-ui": "^5.32.0",
|
|
66
66
|
"rou3": "^0.8.1",
|
|
67
67
|
"swagger-ui": "^5.32.6",
|
|
68
|
-
"@orpc/
|
|
69
|
-
"@orpc/
|
|
70
|
-
"@orpc/
|
|
71
|
-
"@orpc/shared": "2.0.0-beta.
|
|
72
|
-
"@orpc/
|
|
68
|
+
"@orpc/json-schema": "2.0.0-beta.3",
|
|
69
|
+
"@orpc/client": "2.0.0-beta.3",
|
|
70
|
+
"@orpc/contract": "2.0.0-beta.3",
|
|
71
|
+
"@orpc/shared": "2.0.0-beta.3",
|
|
72
|
+
"@orpc/server": "2.0.0-beta.3"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"fastify": "^5.6.2",
|