acacode / acacode/swagger-typescript-api

Can This Tool Generate a Single Angular File with Custom `HttpResponse` Types and No Additional Files?

未關閉
#1,001 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement question
主要語言
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 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。