fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore(docs): add information about available clients

authored by

Jordan Shatford and committed by
Jordan Shatford
6c63b6c3 4cab0be8

+15 -1
+12
README.md
··· 9 9 - [Quick Start](#quick-start) 10 10 - [Installation](#installation) 11 11 - [Configuration](#configuration) 12 + - [Clients](#clients) 12 13 - [Formatting](#formatting) 13 14 - [Linting](#linting) 14 15 - [Enums](#enums) ··· 95 96 ``` 96 97 97 98 Alternatively, you can use `openapi-ts.config.js` and configure the export statement depending on your project setup. 99 + 100 + ### Clients 101 + 102 + We provide a variety of possible clients to use when generating your `openapi-ts` client. The following are available: 103 + 104 + - `angular`: An [Angular](https://angular.io/) client using [RxJS](https://rxjs.dev/). 105 + - `axios`: An [Axios](https://axios-http.com/docs/intro) client. 106 + - `fetch`: A [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) client. 107 + > NOTE: The Fetch API is experimental in Node.js 18+ and was stabilized in [Node.js v21](https://nodejs.org/docs/latest-v21.x/api/globals.html#fetch) 108 + - `node`: A [Node.js](https://nodejs.org/) client using [node-fetch](https://www.npmjs.com/package/node-fetch). 109 + - `xhr`: A [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) client. 98 110 99 111 ### Formatting 100 112
+1
test/bin.spec.ts
··· 60 60 expect(result.stdout.toString()).toContain(''); 61 61 expect(result.stderr.toString()).toBe(''); 62 62 }); 63 + 63 64 it('generates node client', async () => { 64 65 const result = sync('node', [ 65 66 './bin/index.js',
+2 -1
test/e2e/scripts/generateClient.ts
··· 1 1 import { createClient } from '../../../'; 2 + import type { Config } from '../../../src/types/config'; 2 3 3 4 export const generateClient = async ( 4 5 dir: string, 5 6 version: string, 6 - client: 'fetch' | 'xhr' | 'node' | 'axios' | 'angular', 7 + client: Config['client'], 7 8 useOptions: boolean = false, 8 9 name?: string 9 10 ) => {