acacode / acacode/swagger-typescript-api

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

Đang mở
#1,001 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
enhancement question
Ngôn ngữ chính
TypeScript
Star
4.1k
Fork
436
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.