-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from lifeomic/router
feat: introduce OneSchemaRouter as a simpler approach
- Loading branch information
Showing
6 changed files
with
619 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`introspection introspecting + generating a client 1`] = ` | ||
"/* eslint-disable */ | ||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from \\"axios\\"; | ||
export type Endpoints = { | ||
\\"POST /items\\": { | ||
Request: { | ||
message: string; | ||
}; | ||
PathParams: {}; | ||
Response: { | ||
id: string; | ||
message: string; | ||
}; | ||
}; | ||
\\"GET /items/:id\\": { | ||
Request: { | ||
filter: string; | ||
}; | ||
PathParams: { | ||
id: string; | ||
}; | ||
Response: { | ||
id: string; | ||
message: string; | ||
}; | ||
}; | ||
}; | ||
export declare class Client { | ||
constructor(client: AxiosInstance); | ||
/** | ||
* Executes the \`POST /items\` endpoint. | ||
* | ||
* @param data The request data. | ||
* @param config The Axios request overrides for the request. | ||
* | ||
* @returns An AxiosResponse object representing the response. | ||
*/ | ||
createItem( | ||
data: Endpoints[\\"POST /items\\"][\\"Request\\"] & | ||
Endpoints[\\"POST /items\\"][\\"PathParams\\"], | ||
config?: AxiosRequestConfig | ||
): Promise<AxiosResponse<Endpoints[\\"POST /items\\"][\\"Response\\"]>>; | ||
/** | ||
* Executes the \`GET /items/:id\` endpoint. | ||
* | ||
* @param data The request data. | ||
* @param config The Axios request overrides for the request. | ||
* | ||
* @returns An AxiosResponse object representing the response. | ||
*/ | ||
getItem( | ||
data: Endpoints[\\"GET /items/:id\\"][\\"Request\\"] & | ||
Endpoints[\\"GET /items/:id\\"][\\"PathParams\\"], | ||
config?: AxiosRequestConfig | ||
): Promise<AxiosResponse<Endpoints[\\"GET /items/:id\\"][\\"Response\\"]>>; | ||
/** | ||
* Paginates exhaustively through the provided \`request\`, using the specified | ||
* \`data\`. A \`pageSize\` can be specified in the \`data\` to customize the | ||
* page size for pagination. | ||
*/ | ||
paginate<T extends { nextPageToken?: string; pageSize?: string }, Item>( | ||
request: ( | ||
data: T, | ||
config?: AxiosRequestConfig | ||
) => Promise< | ||
AxiosResponse<{ items: Item[]; links: { self: string; next?: string } }> | ||
>, | ||
data: T, | ||
config?: AxiosRequestConfig | ||
): Promise<Item[]>; | ||
} | ||
" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.