@orpc/openapi 0.0.0-next.dd914a8 → 0.0.0-next.de2bec7
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/README.md +11 -7
- package/dist/adapters/aws-lambda/index.mjs +3 -3
- package/dist/adapters/fastify/index.mjs +3 -3
- package/dist/adapters/fetch/index.mjs +3 -3
- package/dist/adapters/node/index.mjs +3 -3
- package/dist/adapters/standard/index.mjs +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +2 -2
- package/dist/plugins/index.mjs +1 -1
- package/dist/shared/{openapi.DIt-Z9W1.mjs → openapi.BB-W-NKv.mjs} +14 -0
- package/dist/shared/{openapi.CoREqFh3.mjs → openapi.BwdtJjDu.mjs} +31 -6
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -108,7 +108,6 @@ If you find oRPC valuable and would like to support its development, you can do
|
|
|
108
108
|
<table>
|
|
109
109
|
<tr>
|
|
110
110
|
<td align="center"><a href="https://misskey.io/?ref=orpc" target="_blank" rel="noopener" title="村上さん"><img src="https://avatars.githubusercontent.com/u/37681609?u=0dd4c7e4ba937cbb52b068c55914b1d8164dc0c7&v=4" width="209" alt="村上さん"/><br />村上さん</a></td>
|
|
111
|
-
<td align="center"><a href="https://github.com/christ12938?ref=orpc" target="_blank" rel="noopener" title="christ12938"><img src="https://avatars.githubusercontent.com/u/25758598?v=4" width="209" alt="christ12938"/><br />christ12938</a></td>
|
|
112
111
|
</tr>
|
|
113
112
|
</table>
|
|
114
113
|
|
|
@@ -125,23 +124,22 @@ If you find oRPC valuable and would like to support its development, you can do
|
|
|
125
124
|
<table>
|
|
126
125
|
<tr>
|
|
127
126
|
<td align="center"><a href="https://github.com/hrmcdonald?ref=orpc" target="_blank" rel="noopener" title="Reece McDonald"><img src="https://avatars.githubusercontent.com/u/39349270?v=4" width="139" alt="Reece McDonald"/><br />Reece McDonald</a></td>
|
|
128
|
-
<td align="center"><a href="https://github.com/u1-liquid?ref=orpc" target="_blank" rel="noopener" title="あわわわとーにゅ"><img src="https://avatars.githubusercontent.com/u/17376330?u=de3353804be889f009f7e0a1582daf04d0ab292d&v=4" width="139" alt="あわわわとーにゅ"/><br />あわわわとーにゅ</a></td>
|
|
129
127
|
<td align="center"><a href="https://github.com/nicognaW?ref=orpc" target="_blank" rel="noopener" title="nk"><img src="https://avatars.githubusercontent.com/u/66731869?u=4699bda3a9092d3ec34fbd959450767bcc8b8b6d&v=4" width="139" alt="nk"/><br />nk</a></td>
|
|
130
128
|
<td align="center"><a href="https://github.com/supastarter?ref=orpc" target="_blank" rel="noopener" title="supastarter"><img src="https://avatars.githubusercontent.com/u/110960143?v=4" width="139" alt="supastarter"/><br />supastarter</a></td>
|
|
131
129
|
<td align="center"><a href="https://github.com/divmgl?ref=orpc" target="_blank" rel="noopener" title="Dexter Miguel"><img src="https://avatars.githubusercontent.com/u/5452298?u=645993204be8696c085ecf0d228c3062efe2ed65&v=4" width="139" alt="Dexter Miguel"/><br />Dexter Miguel</a></td>
|
|
132
130
|
<td align="center"><a href="https://github.com/herrfugbaum?ref=orpc" target="_blank" rel="noopener" title="herrfugbaum"><img src="https://avatars.githubusercontent.com/u/12859776?u=644dc1666d0220bc0468eb0de3c56b919f635b16&v=4" width="139" alt="herrfugbaum"/><br />herrfugbaum</a></td>
|
|
131
|
+
<td align="center"><a href="https://github.com/ryota-murakami?ref=orpc" target="_blank" rel="noopener" title="Ryota Murakami"><img src="https://avatars.githubusercontent.com/u/5501268?u=599389e03340734325726ca3f8f423c021d47d7f&v=4" width="139" alt="Ryota Murakami"/><br />Ryota Murakami</a></td>
|
|
133
132
|
</tr>
|
|
134
133
|
<tr>
|
|
135
|
-
<td align="center"><a href="https://github.com/ryota-murakami?ref=orpc" target="_blank" rel="noopener" title="Ryota Murakami"><img src="https://avatars.githubusercontent.com/u/5501268?u=599389e03340734325726ca3f8f423c021d47d7f&v=4" width="139" alt="Ryota Murakami"/><br />Ryota Murakami</a></td>
|
|
136
134
|
<td align="center"><a href="https://github.com/dcramer?ref=orpc" target="_blank" rel="noopener" title="David Cramer"><img src="https://avatars.githubusercontent.com/u/23610?v=4" width="139" alt="David Cramer"/><br />David Cramer</a></td>
|
|
137
135
|
<td align="center"><a href="https://github.com/valerii15298?ref=orpc" target="_blank" rel="noopener" title="Valerii Petryniak"><img src="https://avatars.githubusercontent.com/u/44531564?u=88ac74d9bacd20401518441907acad21063cd397&v=4" width="139" alt="Valerii Petryniak"/><br />Valerii Petryniak</a></td>
|
|
138
|
-
<td align="center"><a href="https://github.com/happyboy2022?ref=orpc" target="_blank" rel="noopener" title="happyboy"><img src="https://avatars.githubusercontent.com/u/103669586?u=65b49c4b893ed3703909fbb3a7a22313f3f9c121&v=4" width="139" alt="happyboy"/><br />happyboy</a></td>
|
|
139
136
|
<td align="center"><a href="https://github.com/letstri?ref=orpc" target="_blank" rel="noopener" title="Valerii Strilets"><img src="https://avatars.githubusercontent.com/u/13253748?u=c7b10399ccc8f8081e24db94ec32cd9858e86ac3&v=4" width="139" alt="Valerii Strilets"/><br />Valerii Strilets</a></td>
|
|
140
137
|
<td align="center"><a href="https://github.com/K-Mistele?ref=orpc" target="_blank" rel="noopener" title="Kyle Mistele"><img src="https://avatars.githubusercontent.com/u/18430555?u=3afebeb81de666e35aaac3ed46f14159d7603ffb&v=4" width="139" alt="Kyle Mistele"/><br />Kyle Mistele</a></td>
|
|
141
|
-
</tr>
|
|
142
|
-
<tr>
|
|
143
138
|
<td align="center"><a href="https://github.com/andrewpeters9?ref=orpc" target="_blank" rel="noopener" title="Andrew Peters"><img src="https://avatars.githubusercontent.com/u/36251325?v=4" width="139" alt="Andrew Peters"/><br />Andrew Peters</a></td>
|
|
144
139
|
<td align="center"><a href="https://github.com/R44VC0RP?ref=orpc" target="_blank" rel="noopener" title="Ryan Vogel"><img src="https://avatars.githubusercontent.com/u/89211796?u=1857347b9787d8d8a7ea5bfc333f96be92d5a683&v=4" width="139" alt="Ryan Vogel"/><br />Ryan Vogel</a></td>
|
|
140
|
+
</tr>
|
|
141
|
+
<tr>
|
|
142
|
+
<td align="center"><a href="https://github.com/christ12938?ref=orpc" target="_blank" rel="noopener" title="christ12938"><img src="https://avatars.githubusercontent.com/u/25758598?v=4" width="139" alt="christ12938"/><br />christ12938</a></td>
|
|
145
143
|
<td align="center"><a href="https://github.com/peter-adam-dy?ref=orpc" target="_blank" rel="noopener" title="Peter Adam"><img src="https://avatars.githubusercontent.com/u/132129459?u=4f3dbbb3b443990b56acb7d6a5d11ed2c555f6db&v=4" width="139" alt="Peter Adam"/><br />Peter Adam</a></td>
|
|
146
144
|
<td align="center"><a href="https://github.com/yukimotochern?ref=orpc" target="_blank" rel="noopener" title="Chen, Zhi-Yuan"><img src="https://avatars.githubusercontent.com/u/20896173?u=945c33fc21725e4d566a0d02afc54b136ca1d67a&v=4" width="139" alt="Chen, Zhi-Yuan"/><br />Chen, Zhi-Yuan</a></td>
|
|
147
145
|
<td align="center"><a href="https://github.com/Ryanjso?ref=orpc" target="_blank" rel="noopener" title="Ryan Soderberg"><img src="https://avatars.githubusercontent.com/u/39172778?u=5ed913c31d57e7221b75784abcad48c7ebddde27&v=4" width="139" alt="Ryan Soderberg"/><br />Ryan Soderberg</a></td>
|
|
@@ -166,8 +164,12 @@ If you find oRPC valuable and would like to support its development, you can do
|
|
|
166
164
|
<td align="center"><a href="https://github.com/Titoine?ref=orpc" target="_blank" rel="noopener" title="Titoine"><img src="https://avatars.githubusercontent.com/u/3514286?u=1bb1e86b0c99c8a1121372e56d51a177eea12191&v=4" width="119" alt="Titoine"/><br />Titoine</a></td>
|
|
167
165
|
<td align="center"><a href="https://github.com/Mnigos?ref=orpc" target="_blank" rel="noopener" title="Igor Makowski"><img src="https://avatars.githubusercontent.com/u/56691628?u=ee8c879478f7c151b9156aef6c74243fa3e247a8&v=4" width="119" alt="Igor Makowski"/><br />Igor Makowski</a></td>
|
|
168
166
|
<td align="center"><a href="https://github.com/steelbrain?ref=orpc" target="_blank" rel="noopener" title="Anees Iqbal"><img src="https://avatars.githubusercontent.com/u/4278113?u=22b80b5399eed68ac76cd58b02961b0481f1db11&v=4" width="119" alt="Anees Iqbal"/><br />Anees Iqbal</a></td>
|
|
167
|
+
<td align="center"><a href="https://github.com/hanayashiki?ref=orpc" target="_blank" rel="noopener" title="wang chenyu"><img src="https://avatars.githubusercontent.com/u/26056783?u=06c3b9205a16fd41a871e82da1cc2a09306d53f5&v=4" width="119" alt="wang chenyu"/><br />wang chenyu</a></td>
|
|
169
168
|
<td align="center"><a href="https://github.com/piscis?ref=orpc" target="_blank" rel="noopener" title="Alex"><img src="https://avatars.githubusercontent.com/u/326163?u=b245f368bd940cf51d08c0b6bf55f8257f359437&v=4" width="119" alt="Alex"/><br />Alex</a></td>
|
|
170
169
|
</tr>
|
|
170
|
+
<tr>
|
|
171
|
+
<td align="center"><a href="https://github.com/nattstack?ref=orpc" target="_blank" rel="noopener" title="nattstack"><img src="https://avatars.githubusercontent.com/u/31426677?u=fa9dbb8b3e66eb0ea3c88db5dc07f31c8c5418fe&v=4" width="119" alt="nattstack"/><br />nattstack</a></td>
|
|
172
|
+
</tr>
|
|
171
173
|
</table>
|
|
172
174
|
|
|
173
175
|
### Past Sponsors
|
|
@@ -175,6 +177,7 @@ If you find oRPC valuable and would like to support its development, you can do
|
|
|
175
177
|
<p>
|
|
176
178
|
<a href="https://github.com/MrMaxie?ref=orpc" target="_blank" rel="noopener" title="Maxie"><img src="https://avatars.githubusercontent.com/u/3857836?u=5e6b57973d4385d655663ffdd836e487856f2984&v=4" width="32" height="32" alt="Maxie" /></a>
|
|
177
179
|
<a href="https://github.com/Stijn-Timmer?ref=orpc" target="_blank" rel="noopener" title="Stijn Timmer"><img src="https://avatars.githubusercontent.com/u/100147665?u=106b2c18e9c98a61861b4ee7fc100f5b9906a6c9&v=4" width="32" height="32" alt="Stijn Timmer" /></a>
|
|
180
|
+
<a href="https://github.com/u1-liquid?ref=orpc" target="_blank" rel="noopener" title="あわわわとーにゅ"><img src="https://avatars.githubusercontent.com/u/17376330?u=de3353804be889f009f7e0a1582daf04d0ab292d&v=4" width="32" height="32" alt="あわわわとーにゅ" /></a>
|
|
178
181
|
<a href="https://github.com/zuplo?ref=orpc" target="_blank" rel="noopener" title="Zuplo"><img src="https://avatars.githubusercontent.com/u/85497839?v=4" width="32" height="32" alt="Zuplo" /></a>
|
|
179
182
|
<a href="https://github.com/motopods?ref=orpc" target="_blank" rel="noopener" title="motopods"><img src="https://avatars.githubusercontent.com/u/58200641?u=18833983d65b481ae90a4adec2373064ec58bcf3&v=4" width="32" height="32" alt="motopods" /></a>
|
|
180
183
|
<a href="https://github.com/franciscohermida?ref=orpc" target="_blank" rel="noopener" title="Francisco Hermida"><img src="https://avatars.githubusercontent.com/u/483242?u=bbcbc80eb9d8781ff401f7dafc3b59cd7bea0561&v=4" width="32" height="32" alt="Francisco Hermida" /></a>
|
|
@@ -183,13 +186,14 @@ If you find oRPC valuable and would like to support its development, you can do
|
|
|
183
186
|
<a href="https://github.com/shr-ink?ref=orpc" target="_blank" rel="noopener" title="shr.ink oü"><img src="https://avatars.githubusercontent.com/u/139700438?v=4" width="32" height="32" alt="shr.ink oü" /></a>
|
|
184
187
|
<a href="https://github.com/johngerome?ref=orpc" target="_blank" rel="noopener" title="0x4e32"><img src="https://avatars.githubusercontent.com/u/2002000?u=24e8dd943cfc862aa284d858a023532c75071ade&v=4" width="32" height="32" alt="0x4e32" /></a>
|
|
185
188
|
<a href="https://github.com/yzuyr?ref=orpc" target="_blank" rel="noopener" title="Ryuz"><img src="https://avatars.githubusercontent.com/u/196539378?u=d38374588d219b6748b16406982f6559411466d4&v=4" width="32" height="32" alt="Ryuz" /></a>
|
|
189
|
+
<a href="https://github.com/happyboy2022?ref=orpc" target="_blank" rel="noopener" title="happyboy"><img src="https://avatars.githubusercontent.com/u/103669586?u=65b49c4b893ed3703909fbb3a7a22313f3f9c121&v=4" width="32" height="32" alt="happyboy" /></a>
|
|
186
190
|
<a href="https://github.com/YiCChi?ref=orpc" target="_blank" rel="noopener" title="yicchi"><img src="https://avatars.githubusercontent.com/u/86967274?u=6c2756f09fe15dd94d572f560e979cd157982852&v=4" width="32" height="32" alt="yicchi" /></a>
|
|
187
191
|
<a href="https://github.com/cloudycotton?ref=orpc" target="_blank" rel="noopener" title="Saksham"><img src="https://avatars.githubusercontent.com/u/168998965?u=9b9634a5aed66a51c1b880663272725b00b92b14&v=4" width="32" height="32" alt="Saksham" /></a>
|
|
188
192
|
<a href="https://github.com/hrynevychroman?ref=orpc" target="_blank" rel="noopener" title="Roman Hrynevych"><img src="https://avatars.githubusercontent.com/u/82209198?u=1a1d111ab3d589855b9cc8a7fefb1b5c6a4fbbaf&v=4" width="32" height="32" alt="Roman Hrynevych" /></a>
|
|
189
193
|
<a href="https://github.com/rokitgg?ref=orpc" target="_blank" rel="noopener" title="rokitg"><img src="https://avatars.githubusercontent.com/u/125133357?u=06c74aefaa2236b06a2e5fba5a5c612339f45912&v=4" width="32" height="32" alt="rokitg" /></a>
|
|
190
194
|
<a href="https://github.com/omarkhatibgg?ref=orpc" target="_blank" rel="noopener" title="Omar Khatib"><img src="https://avatars.githubusercontent.com/u/9054278?u=afbba7331b85c51b8eee4130f5fd31b1017dc919&v=4" width="32" height="32" alt="Omar Khatib" /></a>
|
|
191
195
|
<a href="https://github.com/YuSabo90002?ref=orpc" target="_blank" rel="noopener" title="Yu-Sabo"><img src="https://avatars.githubusercontent.com/u/13120582?v=4" width="32" height="32" alt="Yu-Sabo" /></a>
|
|
192
|
-
<a href="https://github.com/bapspatil?ref=orpc" target="_blank" rel="noopener" title="Bapusaheb Patil"><img src="https://avatars.githubusercontent.com/u/16699418?v=4" width="32" height="32" alt="Bapusaheb Patil" /></a>
|
|
196
|
+
<a href="https://github.com/bapspatil?ref=orpc" target="_blank" rel="noopener" title="Bapusaheb Patil"><img src="https://avatars.githubusercontent.com/u/16699418?u=6d9d8e0a64a6f91ca1c4d559c72d931172bdcbbd&v=4" width="32" height="32" alt="Bapusaheb Patil" /></a>
|
|
193
197
|
<a href="https://github.com/ripgrim?ref=orpc" target="_blank" rel="noopener" title="grim"><img src="https://avatars.githubusercontent.com/u/75869731?u=b17c42ec2309552fdb822a86b25a2f99146a4d72&v=4" width="32" height="32" alt="grim" /></a>
|
|
194
198
|
<a href="https://github.com/nelsonlaidev?ref=orpc" target="_blank" rel="noopener" title="Nelson Lai"><img src="https://avatars.githubusercontent.com/u/75498339?u=2fc0e0b95dd184c5ffb744df977cb15a18b60672&v=4" width="32" height="32" alt="Nelson Lai" /></a>
|
|
195
199
|
<a href="https://github.com/nguyenlc1993?ref=orpc" target="_blank" rel="noopener" title="Lê Cao Nguyên"><img src="https://avatars.githubusercontent.com/u/13871971?u=83c8b69d9e35b589c4e1f066cc113b1d9461386f&v=4" width="32" height="32" alt="Lê Cao Nguyên" /></a>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AwsLambdaHandler } from '@orpc/server/aws-lambda';
|
|
2
|
+
import { a as StandardOpenAPIHandler } from '../../shared/openapi.BB-W-NKv.mjs';
|
|
3
|
+
import '@orpc/openapi-client/standard';
|
|
4
|
+
import '@orpc/server/standard';
|
|
2
5
|
import '@orpc/client';
|
|
3
6
|
import '@orpc/contract';
|
|
4
7
|
import '@orpc/shared';
|
|
5
|
-
import { a as StandardOpenAPIHandler } from '../../shared/openapi.DIt-Z9W1.mjs';
|
|
6
8
|
import '@orpc/client/standard';
|
|
7
9
|
import '@orpc/server';
|
|
8
10
|
import 'rou3';
|
|
9
|
-
import '@orpc/openapi-client/standard';
|
|
10
|
-
import '@orpc/server/standard';
|
|
11
11
|
|
|
12
12
|
class OpenAPIHandler extends AwsLambdaHandler {
|
|
13
13
|
constructor(router, options = {}) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FastifyHandler } from '@orpc/server/fastify';
|
|
2
|
+
import { a as StandardOpenAPIHandler } from '../../shared/openapi.BB-W-NKv.mjs';
|
|
3
|
+
import '@orpc/openapi-client/standard';
|
|
4
|
+
import '@orpc/server/standard';
|
|
2
5
|
import '@orpc/client';
|
|
3
6
|
import '@orpc/contract';
|
|
4
7
|
import '@orpc/shared';
|
|
5
|
-
import { a as StandardOpenAPIHandler } from '../../shared/openapi.DIt-Z9W1.mjs';
|
|
6
8
|
import '@orpc/client/standard';
|
|
7
9
|
import '@orpc/server';
|
|
8
10
|
import 'rou3';
|
|
9
|
-
import '@orpc/openapi-client/standard';
|
|
10
|
-
import '@orpc/server/standard';
|
|
11
11
|
|
|
12
12
|
class OpenAPIHandler extends FastifyHandler {
|
|
13
13
|
constructor(router, options = {}) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FetchHandler } from '@orpc/server/fetch';
|
|
2
|
+
import { a as StandardOpenAPIHandler } from '../../shared/openapi.BB-W-NKv.mjs';
|
|
3
|
+
import '@orpc/openapi-client/standard';
|
|
4
|
+
import '@orpc/server/standard';
|
|
2
5
|
import '@orpc/client';
|
|
3
6
|
import '@orpc/contract';
|
|
4
7
|
import '@orpc/shared';
|
|
5
|
-
import { a as StandardOpenAPIHandler } from '../../shared/openapi.DIt-Z9W1.mjs';
|
|
6
8
|
import '@orpc/client/standard';
|
|
7
9
|
import '@orpc/server';
|
|
8
10
|
import 'rou3';
|
|
9
|
-
import '@orpc/openapi-client/standard';
|
|
10
|
-
import '@orpc/server/standard';
|
|
11
11
|
|
|
12
12
|
class OpenAPIHandler extends FetchHandler {
|
|
13
13
|
constructor(router, options = {}) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { NodeHttpHandler } from '@orpc/server/node';
|
|
2
|
+
import { a as StandardOpenAPIHandler } from '../../shared/openapi.BB-W-NKv.mjs';
|
|
3
|
+
import '@orpc/openapi-client/standard';
|
|
4
|
+
import '@orpc/server/standard';
|
|
2
5
|
import '@orpc/client';
|
|
3
6
|
import '@orpc/contract';
|
|
4
7
|
import '@orpc/shared';
|
|
5
|
-
import { a as StandardOpenAPIHandler } from '../../shared/openapi.DIt-Z9W1.mjs';
|
|
6
8
|
import '@orpc/client/standard';
|
|
7
9
|
import '@orpc/server';
|
|
8
10
|
import 'rou3';
|
|
9
|
-
import '@orpc/openapi-client/standard';
|
|
10
|
-
import '@orpc/server/standard';
|
|
11
11
|
|
|
12
12
|
class OpenAPIHandler extends NodeHttpHandler {
|
|
13
13
|
constructor(router, options = {}) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { S as StandardOpenAPICodec, a as StandardOpenAPIHandler, b as StandardOpenAPIMatcher, d as decodeParams, t as toRou3Pattern } from '../../shared/openapi.
|
|
1
|
+
export { S as StandardOpenAPICodec, a as StandardOpenAPIHandler, b as StandardOpenAPIMatcher, d as decodeParams, t as toRou3Pattern } from '../../shared/openapi.BB-W-NKv.mjs';
|
|
2
2
|
import '@orpc/openapi-client/standard';
|
|
3
3
|
import '@orpc/server/standard';
|
|
4
4
|
import '@orpc/client';
|
package/dist/index.d.mts
CHANGED
|
@@ -87,6 +87,7 @@ declare function isObjectSchema(schema: JSONSchema): schema is ObjectSchema;
|
|
|
87
87
|
* @internal
|
|
88
88
|
*/
|
|
89
89
|
declare function isAnySchema(schema: JSONSchema): boolean;
|
|
90
|
+
declare function isNeverSchema(schema: JSONSchema): boolean;
|
|
90
91
|
/**
|
|
91
92
|
* @internal
|
|
92
93
|
*/
|
|
@@ -112,5 +113,5 @@ declare const oo: {
|
|
|
112
113
|
spec: typeof customOpenAPIOperation;
|
|
113
114
|
};
|
|
114
115
|
|
|
115
|
-
export { LOGIC_KEYWORDS, applyCustomOpenAPIOperation, applySchemaOptionality, checkParamsSchema, createJsonifiedRouterClient, customOpenAPIOperation, expandArrayableSchema, expandUnionSchema, filterSchemaBranches, getCustomOpenAPIOperation, isAnySchema, isFileSchema, isObjectSchema, isPrimitiveSchema, oo, resolveOpenAPIJsonSchemaRef, separateObjectSchema, simplifyComposedObjectJsonSchemasAndRefs, toOpenAPIContent, toOpenAPIEventIteratorContent, toOpenAPIMethod, toOpenAPIParameters, toOpenAPIPath, toOpenAPISchema };
|
|
116
|
+
export { LOGIC_KEYWORDS, applyCustomOpenAPIOperation, applySchemaOptionality, checkParamsSchema, createJsonifiedRouterClient, customOpenAPIOperation, expandArrayableSchema, expandUnionSchema, filterSchemaBranches, getCustomOpenAPIOperation, isAnySchema, isFileSchema, isNeverSchema, isObjectSchema, isPrimitiveSchema, oo, resolveOpenAPIJsonSchemaRef, separateObjectSchema, simplifyComposedObjectJsonSchemasAndRefs, toOpenAPIContent, toOpenAPIEventIteratorContent, toOpenAPIMethod, toOpenAPIParameters, toOpenAPIPath, toOpenAPISchema };
|
|
116
117
|
export type { FileSchema, ObjectSchema, OverrideOperationValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -87,6 +87,7 @@ declare function isObjectSchema(schema: JSONSchema): schema is ObjectSchema;
|
|
|
87
87
|
* @internal
|
|
88
88
|
*/
|
|
89
89
|
declare function isAnySchema(schema: JSONSchema): boolean;
|
|
90
|
+
declare function isNeverSchema(schema: JSONSchema): boolean;
|
|
90
91
|
/**
|
|
91
92
|
* @internal
|
|
92
93
|
*/
|
|
@@ -112,5 +113,5 @@ declare const oo: {
|
|
|
112
113
|
spec: typeof customOpenAPIOperation;
|
|
113
114
|
};
|
|
114
115
|
|
|
115
|
-
export { LOGIC_KEYWORDS, applyCustomOpenAPIOperation, applySchemaOptionality, checkParamsSchema, createJsonifiedRouterClient, customOpenAPIOperation, expandArrayableSchema, expandUnionSchema, filterSchemaBranches, getCustomOpenAPIOperation, isAnySchema, isFileSchema, isObjectSchema, isPrimitiveSchema, oo, resolveOpenAPIJsonSchemaRef, separateObjectSchema, simplifyComposedObjectJsonSchemasAndRefs, toOpenAPIContent, toOpenAPIEventIteratorContent, toOpenAPIMethod, toOpenAPIParameters, toOpenAPIPath, toOpenAPISchema };
|
|
116
|
+
export { LOGIC_KEYWORDS, applyCustomOpenAPIOperation, applySchemaOptionality, checkParamsSchema, createJsonifiedRouterClient, customOpenAPIOperation, expandArrayableSchema, expandUnionSchema, filterSchemaBranches, getCustomOpenAPIOperation, isAnySchema, isFileSchema, isNeverSchema, isObjectSchema, isPrimitiveSchema, oo, resolveOpenAPIJsonSchemaRef, separateObjectSchema, simplifyComposedObjectJsonSchemasAndRefs, toOpenAPIContent, toOpenAPIEventIteratorContent, toOpenAPIMethod, toOpenAPIParameters, toOpenAPIPath, toOpenAPISchema };
|
|
116
117
|
export type { FileSchema, ObjectSchema, OverrideOperationValue };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as customOpenAPIOperation } from './shared/openapi.
|
|
2
|
-
export { C as CompositeSchemaConverter, L as LOGIC_KEYWORDS, O as OpenAPIGenerator, a as applyCustomOpenAPIOperation,
|
|
1
|
+
import { c as customOpenAPIOperation } from './shared/openapi.BwdtJjDu.mjs';
|
|
2
|
+
export { C as CompositeSchemaConverter, L as LOGIC_KEYWORDS, O as OpenAPIGenerator, a as applyCustomOpenAPIOperation, p as applySchemaOptionality, h as checkParamsSchema, u as expandArrayableSchema, q as expandUnionSchema, o as filterSchemaBranches, g as getCustomOpenAPIOperation, l as isAnySchema, j as isFileSchema, m as isNeverSchema, k as isObjectSchema, v as isPrimitiveSchema, r as resolveOpenAPIJsonSchemaRef, n as separateObjectSchema, s as simplifyComposedObjectJsonSchemasAndRefs, d as toOpenAPIContent, e as toOpenAPIEventIteratorContent, b as toOpenAPIMethod, f as toOpenAPIParameters, t as toOpenAPIPath, i as toOpenAPISchema } from './shared/openapi.BwdtJjDu.mjs';
|
|
3
3
|
import { createORPCErrorFromJson } from '@orpc/client';
|
|
4
4
|
import { StandardOpenAPISerializer, StandardOpenAPIJsonSerializer, StandardBracketNotationSerializer } from '@orpc/openapi-client/standard';
|
|
5
5
|
import { ORPCError, createRouterClient } from '@orpc/server';
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stringifyJSON, once, value } from '@orpc/shared';
|
|
2
|
-
import { O as OpenAPIGenerator } from '../shared/openapi.
|
|
2
|
+
import { O as OpenAPIGenerator } from '../shared/openapi.BwdtJjDu.mjs';
|
|
3
3
|
import '@orpc/client';
|
|
4
4
|
import '@orpc/client/standard';
|
|
5
5
|
import '@orpc/contract';
|
|
@@ -49,6 +49,13 @@ class StandardOpenAPICodec {
|
|
|
49
49
|
const successStatus = fallbackContractConfig("defaultSuccessStatus", procedure["~orpc"].route.successStatus);
|
|
50
50
|
const outputStructure = fallbackContractConfig("defaultOutputStructure", procedure["~orpc"].route.outputStructure);
|
|
51
51
|
if (outputStructure === "compact") {
|
|
52
|
+
if (output instanceof ReadableStream) {
|
|
53
|
+
return {
|
|
54
|
+
status: successStatus,
|
|
55
|
+
headers: {},
|
|
56
|
+
body: output
|
|
57
|
+
};
|
|
58
|
+
}
|
|
52
59
|
return {
|
|
53
60
|
status: successStatus,
|
|
54
61
|
headers: {},
|
|
@@ -68,6 +75,13 @@ class StandardOpenAPICodec {
|
|
|
68
75
|
${stringifyJSON(output)}
|
|
69
76
|
`);
|
|
70
77
|
}
|
|
78
|
+
if (output.body instanceof ReadableStream) {
|
|
79
|
+
return {
|
|
80
|
+
status: output.status ?? successStatus,
|
|
81
|
+
headers: output.headers ?? {},
|
|
82
|
+
body: output.body
|
|
83
|
+
};
|
|
84
|
+
}
|
|
71
85
|
return {
|
|
72
86
|
status: output.status ?? successStatus,
|
|
73
87
|
headers: output.headers ?? {},
|
|
@@ -108,11 +108,25 @@ function isAnySchema(schema) {
|
|
|
108
108
|
if (schema === true) {
|
|
109
109
|
return true;
|
|
110
110
|
}
|
|
111
|
-
if (Object.keys(schema).every((k) => !LOGIC_KEYWORDS.includes(k))) {
|
|
111
|
+
if (Object.keys(schema).filter((v) => schema[v] !== void 0).every((k) => !LOGIC_KEYWORDS.includes(k))) {
|
|
112
112
|
return true;
|
|
113
113
|
}
|
|
114
114
|
return false;
|
|
115
115
|
}
|
|
116
|
+
function isNeverSchema(schema) {
|
|
117
|
+
if (schema === false) {
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
if (typeof schema === "object" && schema.not !== void 0) {
|
|
121
|
+
if (schema.not === true) {
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
116
130
|
function separateObjectSchema(schema, separatedProperties) {
|
|
117
131
|
if (Object.keys(schema).some(
|
|
118
132
|
(k) => !["type", "properties", "required", "additionalProperties"].includes(k) && LOGIC_KEYWORDS.includes(k) && schema[k] !== void 0
|
|
@@ -128,7 +142,13 @@ function separateObjectSchema(schema, separatedProperties) {
|
|
|
128
142
|
}
|
|
129
143
|
return acc;
|
|
130
144
|
}, {});
|
|
145
|
+
if (Object.keys(matched.properties).length === 0) {
|
|
146
|
+
matched.properties = void 0;
|
|
147
|
+
}
|
|
131
148
|
matched.required = schema.required?.filter((key) => separatedProperties.includes(key));
|
|
149
|
+
if (matched.required?.length === 0) {
|
|
150
|
+
matched.required = void 0;
|
|
151
|
+
}
|
|
132
152
|
matched.examples = schema.examples?.map((example) => {
|
|
133
153
|
if (!isObject(example)) {
|
|
134
154
|
return example;
|
|
@@ -140,11 +160,14 @@ function separateObjectSchema(schema, separatedProperties) {
|
|
|
140
160
|
return acc;
|
|
141
161
|
}, {});
|
|
142
162
|
});
|
|
143
|
-
rest.properties = schema.properties && Object.entries(schema.properties).filter(([key]) => !separatedProperties.includes(key)).reduce((acc, [key, value]) => {
|
|
163
|
+
rest.properties = schema.properties && Object.entries(schema.properties).filter(([key]) => !separatedProperties.includes(key)).reduce((acc = {}, [key, value]) => {
|
|
144
164
|
acc[key] = value;
|
|
145
165
|
return acc;
|
|
146
|
-
},
|
|
166
|
+
}, void 0);
|
|
147
167
|
rest.required = schema.required?.filter((key) => !separatedProperties.includes(key));
|
|
168
|
+
if (rest.required?.length === 0) {
|
|
169
|
+
rest.required = void 0;
|
|
170
|
+
}
|
|
148
171
|
rest.examples = schema.examples?.map((example) => {
|
|
149
172
|
if (!isObject(example)) {
|
|
150
173
|
return example;
|
|
@@ -255,7 +278,7 @@ function toOpenAPIContent(schema) {
|
|
|
255
278
|
schema: toOpenAPISchema(file)
|
|
256
279
|
};
|
|
257
280
|
}
|
|
258
|
-
if (restSchema !== void 0) {
|
|
281
|
+
if (restSchema !== void 0 && !isAnySchema(restSchema) && !isNeverSchema(restSchema)) {
|
|
259
282
|
content["application/json"] = {
|
|
260
283
|
schema: toOpenAPISchema(restSchema)
|
|
261
284
|
};
|
|
@@ -643,6 +666,7 @@ ${errors.join("\n\n")}`
|
|
|
643
666
|
strategy: "input"
|
|
644
667
|
}
|
|
645
668
|
);
|
|
669
|
+
let omitResponseBody = false;
|
|
646
670
|
if (isAnySchema(schema) && !dynamicParams?.length) {
|
|
647
671
|
return;
|
|
648
672
|
}
|
|
@@ -660,6 +684,7 @@ ${errors.join("\n\n")}`
|
|
|
660
684
|
const [paramsSchema, rest] = separateObjectSchema(schema, dynamicParams);
|
|
661
685
|
schema = rest;
|
|
662
686
|
required = rest.required ? rest.required.length !== 0 : false;
|
|
687
|
+
omitResponseBody = !required && !rest.properties;
|
|
663
688
|
if (!checkParamsSchema(paramsSchema, dynamicParams)) {
|
|
664
689
|
throw error2;
|
|
665
690
|
}
|
|
@@ -674,7 +699,7 @@ ${errors.join("\n\n")}`
|
|
|
674
699
|
}
|
|
675
700
|
ref.parameters ??= [];
|
|
676
701
|
ref.parameters.push(...toOpenAPIParameters(schema, "query"));
|
|
677
|
-
} else {
|
|
702
|
+
} else if (!omitResponseBody) {
|
|
678
703
|
ref.requestBody = {
|
|
679
704
|
required,
|
|
680
705
|
content: toOpenAPIContent(schema)
|
|
@@ -850,4 +875,4 @@ ${errors.join("\n\n")}`
|
|
|
850
875
|
}
|
|
851
876
|
}
|
|
852
877
|
|
|
853
|
-
export { CompositeSchemaConverter as C, LOGIC_KEYWORDS as L, OpenAPIGenerator as O, applyCustomOpenAPIOperation as a, toOpenAPIMethod as b, customOpenAPIOperation as c, toOpenAPIContent as d, toOpenAPIEventIteratorContent as e, toOpenAPIParameters as f, getCustomOpenAPIOperation as g, checkParamsSchema as h, toOpenAPISchema as i, isFileSchema as j, isObjectSchema as k, isAnySchema as l,
|
|
878
|
+
export { CompositeSchemaConverter as C, LOGIC_KEYWORDS as L, OpenAPIGenerator as O, applyCustomOpenAPIOperation as a, toOpenAPIMethod as b, customOpenAPIOperation as c, toOpenAPIContent as d, toOpenAPIEventIteratorContent as e, toOpenAPIParameters as f, getCustomOpenAPIOperation as g, checkParamsSchema as h, toOpenAPISchema as i, isFileSchema as j, isObjectSchema as k, isAnySchema as l, isNeverSchema as m, separateObjectSchema as n, filterSchemaBranches as o, applySchemaOptionality as p, expandUnionSchema as q, resolveOpenAPIJsonSchemaRef as r, simplifyComposedObjectJsonSchemasAndRefs as s, toOpenAPIPath as t, expandArrayableSchema as u, isPrimitiveSchema as v };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/openapi",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-next.
|
|
4
|
+
"version": "0.0.0-next.de2bec7",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.dev",
|
|
7
7
|
"repository": {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"keywords": [
|
|
13
13
|
"orpc"
|
|
14
14
|
],
|
|
15
|
+
"sideEffects": false,
|
|
15
16
|
"exports": {
|
|
16
17
|
".": {
|
|
17
18
|
"types": "./dist/index.d.mts",
|
|
@@ -55,13 +56,13 @@
|
|
|
55
56
|
"dependencies": {
|
|
56
57
|
"json-schema-typed": "^8.0.2",
|
|
57
58
|
"rou3": "^0.7.12",
|
|
58
|
-
"@orpc/client": "0.0.0-next.
|
|
59
|
-
"@orpc/contract": "0.0.0-next.
|
|
60
|
-
"@orpc/interop": "0.0.0-next.
|
|
61
|
-
"@orpc/
|
|
62
|
-
"@orpc/
|
|
63
|
-
"@orpc/
|
|
64
|
-
"@orpc/standard-server": "0.0.0-next.
|
|
59
|
+
"@orpc/client": "0.0.0-next.de2bec7",
|
|
60
|
+
"@orpc/contract": "0.0.0-next.de2bec7",
|
|
61
|
+
"@orpc/interop": "0.0.0-next.de2bec7",
|
|
62
|
+
"@orpc/server": "0.0.0-next.de2bec7",
|
|
63
|
+
"@orpc/shared": "0.0.0-next.de2bec7",
|
|
64
|
+
"@orpc/openapi-client": "0.0.0-next.de2bec7",
|
|
65
|
+
"@orpc/standard-server": "0.0.0-next.de2bec7"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|
|
67
68
|
"fastify": "^5.8.3",
|