Clean up schema by simplifying version structure (#379)
## Summary Simplified the schema structure by: - Replacing `version_detail.version` with direct `version` field - Removing unused `release_date` field from seed data - Updating all API types, models, and tests to match new structure - Maintaining backwards compatibility in API responses This change makes the schema more intuitive and reduces nesting depth.
This commit is contained in:
parent
f51c187e52
commit
f975e68cf2
1 changed files with 540 additions and 1973 deletions
|
|
@ -163,7 +163,7 @@ func runPublisher(filePath string) (string, error) {
|
|||
|
||||
// Add a small delay to ensure database consistency
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
|
||||
// Find the server in the registry by name
|
||||
return findServerIDByName(serverName)
|
||||
}
|
||||
|
|
@ -315,17 +315,15 @@ func compareServerJSON(expected, actual *apiv0.ServerJSON) error {
|
|||
if expected.Status != actual.Status {
|
||||
return fmt.Errorf("status mismatch: expected %q, got %q", expected.Status, actual.Status)
|
||||
}
|
||||
if expected.Version != actual.Version {
|
||||
return fmt.Errorf("version mismatch: expected %+v, got %+v", expected.Version, actual.Version)
|
||||
}
|
||||
|
||||
// Compare repository
|
||||
if !reflect.DeepEqual(expected.Repository, actual.Repository) {
|
||||
return fmt.Errorf("repository mismatch: expected %+v, got %+v", expected.Repository, actual.Repository)
|
||||
}
|
||||
|
||||
// Compare version detail
|
||||
if !reflect.DeepEqual(expected.VersionDetail, actual.VersionDetail) {
|
||||
return fmt.Errorf("version detail mismatch: expected %+v, got %+v", expected.VersionDetail, actual.VersionDetail)
|
||||
}
|
||||
|
||||
// Compare packages
|
||||
if !reflect.DeepEqual(expected.Packages, actual.Packages) {
|
||||
return fmt.Errorf("packages mismatch: expected %+v, got %+v", expected.Packages, actual.Packages)
|
||||
|
|
|
|||
Loading…
Reference in a new issue