Skip to content

Commit

Permalink
docs: 修改代码块
Browse files Browse the repository at this point in the history
  • Loading branch information
geekact committed Jan 1, 2025
1 parent 772e8b0 commit 7dd92c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ npx openapi

```typescript
// ./src/openapi/index.ts
import { OpenapiClient } from './openapi/openapi';
import { OpenapiClient } from './openapi';
import { fetchAdapter } from 'foca-openapi/adapters/fetch';

const adapter = fetchAdapter({ baseURL: 'http://api.com' });
export const client = new OpenapiClient(adapter);

export { OpenapiClient };
```

# 适配器
Expand Down Expand Up @@ -95,6 +97,8 @@ import { OpenapiClientBar } from './bar';

export const fooClient = new OpenapiClientFoo(adapter1);
export const barClient = new OpenapiClientBar(adapter2);

export { OpenapiClientFoo, OpenapiClientBar };
```

# CLI选项
Expand Down

0 comments on commit 7dd92c3

Please sign in to comment.