Refactor package types to use dedicated schema types per package type (NPM, PyPI, NuGet, OCI, MCPB) (#634)
This commit is contained in:
parent
5055c79531
commit
632cbce815
1 changed files with 883 additions and 146 deletions
|
|
@ -39,6 +39,11 @@ func ValidatePyPI(ctx context.Context, pkg model.Package, serverName string) err
|
|||
return ErrMissingVersionForPyPi
|
||||
}
|
||||
|
||||
// Validate that MCPB-specific fields are not present
|
||||
if pkg.FileSHA256 != "" {
|
||||
return fmt.Errorf("PyPI packages must not have 'fileSha256' field - this is only for MCPB packages")
|
||||
}
|
||||
|
||||
// Validate that the registry base URL matches PyPI exactly
|
||||
if pkg.RegistryBaseURL != model.RegistryURLPyPI {
|
||||
return fmt.Errorf("registry type and base URL do not match: '%s' is not valid for registry type '%s'. Expected: %s",
|
||||
|
|
|
|||
Loading…
Reference in a new issue