refactor(api): standardize DTOs and update swagger

Decouple API contract from internal models by introducing dedicated DTOs for requests and responses.
- Add Response DTOs for all resources (API Keys, Bindings, Models, Namespaces, etc.)
- Update Swagger annotations to use DTOs with field examples instead of internal models
- Refactor handlers to bind and return DTO structures
- Consolidate request/response definitions in the dto package
This commit is contained in:
zenfun
2026-01-10 02:05:55 +08:00
parent f52c7acbe6
commit 2098bc4abe
20 changed files with 4156 additions and 3760 deletions

7
internal/dto/common.go Normal file
View File

@@ -0,0 +1,7 @@
package dto
// DeleteResponse represents a successful delete operation response.
// @Description Delete operation response
type DeleteResponse struct {
Status string `json:"status" example:"deleted"`
}