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
|
|
@ -29,9 +29,7 @@ func TestImportService_LocalFile(t *testing.T) {
|
|||
Source: "github",
|
||||
ID: "123",
|
||||
},
|
||||
VersionDetail: model.VersionDetail{
|
||||
Version: "1.0.0",
|
||||
},
|
||||
Version: "1.0.0",
|
||||
Meta: &apiv0.ServerMeta{
|
||||
Official: &apiv0.RegistryExtensions{
|
||||
ID: "test-id-1",
|
||||
|
|
@ -75,9 +73,7 @@ func TestImportService_HTTPFile(t *testing.T) {
|
|||
Source: "github",
|
||||
ID: "123",
|
||||
},
|
||||
VersionDetail: model.VersionDetail{
|
||||
Version: "2.0.0",
|
||||
},
|
||||
Version: "2.0.0",
|
||||
Meta: &apiv0.ServerMeta{
|
||||
Official: &apiv0.RegistryExtensions{
|
||||
ID: "test-id-2",
|
||||
|
|
@ -120,9 +116,7 @@ func TestImportService_RegistryAPI(t *testing.T) {
|
|||
Source: "github",
|
||||
ID: "123",
|
||||
},
|
||||
VersionDetail: model.VersionDetail{
|
||||
Version: "1.0.0",
|
||||
},
|
||||
Version: "1.0.0",
|
||||
Meta: &apiv0.ServerMeta{
|
||||
Official: &apiv0.RegistryExtensions{
|
||||
ID: "api-test-id-1",
|
||||
|
|
@ -140,9 +134,7 @@ func TestImportService_RegistryAPI(t *testing.T) {
|
|||
Source: "github",
|
||||
ID: "456",
|
||||
},
|
||||
VersionDetail: model.VersionDetail{
|
||||
Version: "2.0.0",
|
||||
},
|
||||
Version: "2.0.0",
|
||||
Meta: &apiv0.ServerMeta{
|
||||
Official: &apiv0.RegistryExtensions{
|
||||
ID: "api-test-id-2",
|
||||
|
|
|
|||
Loading…
Reference in a new issue