refactor: consolidate server list response types (#387)
## Summary - Consolidate ServerListResponse and Metadata types into pkg/api/v0 - Remove duplication between handler and API types - Change metadata from optional pointer to required value - Remove unused Total field from Metadata
This commit is contained in:
parent
d43d0bfeef
commit
0eada9b3b4
1 changed files with 19 additions and 47 deletions
|
|
@ -17,7 +17,7 @@ type RegistryExtensions struct {
|
|||
// ServerListResponse represents the paginated server list response
|
||||
type ServerListResponse struct {
|
||||
Servers []ServerJSON `json:"servers"`
|
||||
Metadata *Metadata `json:"metadata,omitempty"`
|
||||
Metadata Metadata `json:"metadata"`
|
||||
}
|
||||
|
||||
// ServerMeta represents the structured metadata with known extension fields
|
||||
|
|
@ -42,6 +42,5 @@ type ServerJSON struct {
|
|||
// Metadata represents pagination metadata
|
||||
type Metadata struct {
|
||||
NextCursor string `json:"next_cursor,omitempty"`
|
||||
Count int `json:"count,omitempty"`
|
||||
Total int `json:"total,omitempty"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue