acacode / acacode/swagger-typescript-api
Can This Tool Generate a Single Angular File with Custom `HttpResponse` Types and No Additional Files?
- 主要语言
- TypeScript
- 星标
- 4.1k
- 派生
- 436
- PR 合并指标
- 30 天内没有已合并 PR
描述
Before I try this tool (it looks great!), I want to confirm: is it possible to generate a single file, like `users.service.ts` in Angular, with the following structure?
```typescript
@Injectable({ providedIn: 'root' })
export class UserApiService {
#http = inject(HttpClient);
getUsers() {
return this.#http.get(`/api/v1/users`);
}
user(id: number): Observable> {
return this.#http.post(`/api/v1/users/search`, { id }, { observe: 'response' });
}
}
```
Specifically:
1. Can I generate the `HttpResponse` type based on matching specific URLs I provide in a list?
2. Can the tool avoid generating additional files, keeping everything (like interfaces) in the same file?
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。