File tree Expand file tree Collapse file tree
openapi-ts-tests/main/test/__snapshots__
custom-contract-name/@orpc
custom-contract-name/@orpc
custom-contract-name/@orpc
openapi-ts/src/plugins/@orpc/contract Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,14 +47,10 @@ export const fooBarPutRpc = base.route({
4747} ) . output ( zFooBarPutResponse ) ;
4848
4949export const router = {
50- foo : {
51- get : getFooRpc ,
52- fooPost : fooPostRpc ,
53- fooPut : fooPutRpc ,
54- getBar : getFooBarRpc ,
55- fooBarPost : fooBarPostRpc ,
56- fooBarPut : fooBarPutRpc
57- }
50+ getFoo : getFooRpc ,
51+ post : fooBarPostRpc ,
52+ put : fooBarPutRpc ,
53+ getFooBar : getFooBarRpc
5854} ;
5955
6056export type Router = typeof router ;
Original file line number Diff line number Diff line change @@ -47,9 +47,10 @@ export const fooBarPutContract = base.route({
4747} ) . output ( zFooBarPutResponse ) ;
4848
4949export const router = {
50- get : { getFoo : getFooContract , getFooBar : getFooBarContract } ,
51- post : { foo : fooPostContract , fooBar : fooBarPostContract } ,
52- put : { foo : fooPutContract , fooBar : fooBarPutContract }
50+ getFoo : getFooContract ,
51+ post : fooBarPostContract ,
52+ put : fooBarPutContract ,
53+ getFooBar : getFooBarContract
5354} ;
5455
5556export type Router = typeof router ;
Original file line number Diff line number Diff line change @@ -47,14 +47,10 @@ export const fooBarPutContract = base.route({
4747} ) . output ( zFooBarPutResponse ) ;
4848
4949export const contract = {
50- foo : {
51- get : getFooContract ,
52- fooPost : fooPostContract ,
53- fooPut : fooPutContract ,
54- getBar : getFooBarContract ,
55- fooBarPost : fooBarPostContract ,
56- fooBarPut : fooBarPutContract
57- }
50+ getFoo : getFooContract ,
51+ post : fooBarPostContract ,
52+ put : fooBarPutContract ,
53+ getFooBar : getFooBarContract
5854} ;
5955
6056export type Contract = typeof contract ;
Original file line number Diff line number Diff line change @@ -47,14 +47,10 @@ export const fooBarPutContract = base.route({
4747} ) . output ( zFooBarPutResponse ) ;
4848
4949export const router = {
50- foo : {
51- get : getFooContract ,
52- fooPost : fooPostContract ,
53- fooPut : fooPutContract ,
54- getBar : getFooBarContract ,
55- fooBarPost : fooBarPostContract ,
56- fooBarPut : fooBarPutContract
57- }
50+ getFoo : getFooContract ,
51+ post : fooBarPostContract ,
52+ put : fooBarPutContract ,
53+ getFooBar : getFooBarContract
5854} ;
5955
6056export type Router = typeof router ;
Original file line number Diff line number Diff line change @@ -97,18 +97,14 @@ export const getPostByIdRpc = base.route({
9797} ) . input ( zGetPostByIdData ) . output ( zGetPostByIdResponse ) ;
9898
9999export const router = {
100- users : {
101- get : getUsersRpc ,
102- create : createUserRpc ,
103- delete : deleteUserRpc ,
104- getById : getUserByIdRpc ,
105- update : updateUserRpc
106- } ,
107- posts : {
108- get : getPostsRpc ,
109- create : createPostRpc ,
110- getById : getPostByIdRpc
111- }
100+ getUsers : getUsersRpc ,
101+ createUser : createUserRpc ,
102+ deleteUser : deleteUserRpc ,
103+ getUserById : getUserByIdRpc ,
104+ updateUser : updateUserRpc ,
105+ getPosts : getPostsRpc ,
106+ createPost : createPostRpc ,
107+ getPostById : getPostByIdRpc
112108} ;
113109
114110export type Router = typeof router ;
Original file line number Diff line number Diff line change @@ -97,15 +97,14 @@ export const getPostByIdContract = base.route({
9797} ) . input ( zGetPostByIdData ) . output ( zGetPostByIdResponse ) ;
9898
9999export const router = {
100- get : {
101- getUsers : getUsersContract ,
102- getUserById : getUserByIdContract ,
103- getPosts : getPostsContract ,
104- getPostById : getPostByIdContract
105- } ,
106- post : { createUser : createUserContract , create : createPostContract } ,
107- delete : { deleteUser : deleteUserContract } ,
108- put : { updateUser : updateUserContract }
100+ getUsers : getUsersContract ,
101+ createUser : createUserContract ,
102+ deleteUser : deleteUserContract ,
103+ getUserById : getUserByIdContract ,
104+ updateUser : updateUserContract ,
105+ getPosts : getPostsContract ,
106+ createPost : createPostContract ,
107+ getPostById : getPostByIdContract
109108} ;
110109
111110export type Router = typeof router ;
Original file line number Diff line number Diff line change @@ -97,18 +97,14 @@ export const getPostByIdContract = base.route({
9797} ) . input ( zGetPostByIdData ) . output ( zGetPostByIdResponse ) ;
9898
9999export const contract = {
100- users : {
101- get : getUsersContract ,
102- create : createUserContract ,
103- delete : deleteUserContract ,
104- getById : getUserByIdContract ,
105- update : updateUserContract
106- } ,
107- posts : {
108- get : getPostsContract ,
109- create : createPostContract ,
110- getById : getPostByIdContract
111- }
100+ getUsers : getUsersContract ,
101+ createUser : createUserContract ,
102+ deleteUser : deleteUserContract ,
103+ getUserById : getUserByIdContract ,
104+ updateUser : updateUserContract ,
105+ getPosts : getPostsContract ,
106+ createPost : createPostContract ,
107+ getPostById : getPostByIdContract
112108} ;
113109
114110export type Contract = typeof contract ;
Original file line number Diff line number Diff line change @@ -97,18 +97,14 @@ export const getPostByIdContract = base.route({
9797} ) . input ( zGetPostByIdData ) . output ( zGetPostByIdResponse ) ;
9898
9999export const router = {
100- users : {
101- get : getUsersContract ,
102- create : createUserContract ,
103- delete : deleteUserContract ,
104- getById : getUserByIdContract ,
105- update : updateUserContract
106- } ,
107- posts : {
108- get : getPostsContract ,
109- create : createPostContract ,
110- getById : getPostByIdContract
111- }
100+ getUsers : getUsersContract ,
101+ createUser : createUserContract ,
102+ deleteUser : deleteUserContract ,
103+ getUserById : getUserByIdContract ,
104+ updateUser : updateUserContract ,
105+ getPosts : getPostsContract ,
106+ createPost : createPostContract ,
107+ getPostById : getPostByIdContract
112108} ;
113109
114110export type Router = typeof router ;
Original file line number Diff line number Diff line change @@ -97,18 +97,14 @@ export const getPostByIdRpc = base.route({
9797} ) . input ( zGetPostByIdData ) . output ( zGetPostByIdResponse ) ;
9898
9999export const router = {
100- users : {
101- get : getUsersRpc ,
102- create : createUserRpc ,
103- delete : deleteUserRpc ,
104- getById : getUserByIdRpc ,
105- update : updateUserRpc
106- } ,
107- posts : {
108- get : getPostsRpc ,
109- create : createPostRpc ,
110- getById : getPostByIdRpc
111- }
100+ getUsers : getUsersRpc ,
101+ createUser : createUserRpc ,
102+ deleteUser : deleteUserRpc ,
103+ getUserById : getUserByIdRpc ,
104+ updateUser : updateUserRpc ,
105+ getPosts : getPostsRpc ,
106+ createPost : createPostRpc ,
107+ getPostById : getPostByIdRpc
112108} ;
113109
114110export type Router = typeof router ;
Original file line number Diff line number Diff line change @@ -97,15 +97,14 @@ export const getPostByIdContract = base.route({
9797} ) . input ( zGetPostByIdData ) . output ( zGetPostByIdResponse ) ;
9898
9999export const router = {
100- get : {
101- getUsers : getUsersContract ,
102- getUserById : getUserByIdContract ,
103- getPosts : getPostsContract ,
104- getPostById : getPostByIdContract
105- } ,
106- post : { createUser : createUserContract , create : createPostContract } ,
107- delete : { deleteUser : deleteUserContract } ,
108- put : { updateUser : updateUserContract }
100+ getUsers : getUsersContract ,
101+ createUser : createUserContract ,
102+ deleteUser : deleteUserContract ,
103+ getUserById : getUserByIdContract ,
104+ updateUser : updateUserContract ,
105+ getPosts : getPostsContract ,
106+ createPost : createPostContract ,
107+ getPostById : getPostByIdContract
109108} ;
110109
111110export type Router = typeof router ;
You can’t perform that action at this time.
0 commit comments