Portal Community

Validation Layers

Layer 1 — ZIP Structure Validation

CheckFailure
File is a valid ZIP archiveInvalidZip
manifest.json exists at rootManifestMissing
README.md exists at rootReadmeMissing
No forbidden file types (.exe, .dll, .sh, .bat)ForbiddenContent
No path traversal patterns (../)PathTraversalDetected
No nested ZIP filesNestedArchiveDetected
All artifact paths declared in manifest are present in ZIPArtifactFileMissing
No extra files in artifacts/ not declared in manifestUndeclaredArtifact

Layer 2 — Manifest Schema Validation

CheckFailure
manifestVersion is a supported valueUnsupportedManifestVersion
All required fields are present and non-emptyManifestFieldMissing
version is valid SemVerInvalidVersion
packageType is a valid enum valueInvalidPackageType
exportedAt is a valid ISO 8601 datetimeInvalidDatetime
artifacts array has at least 1 itemEmptyArtifactList
installOrder contains all artifact IDsIncompleteInstallOrder
Every artifacts[].type is a valid artifact typeUnknownArtifactType

Layer 3 — Checksum Integrity

CheckFailure
Per-artifact hash matches each file's bytesArtifactHashMismatch
Bundle checksum matches all artifact bytes in install orderBundleChecksumMismatch

Platform Version Check

After schema validation, the import engine compares the manifest's platformVersion to the target platform:

// manifest.platformVersion = "4.2.0"
// target platform = "4.1.5"

// Result: Warning (not blocking)
{
  "warning": "PlatformVersionMismatch",
  "message": "This package was created on platform 4.2.0 but the target is 4.1.5. Some features may not be available.",
  "packagePlatformVersion": "4.2.0",
  "targetPlatformVersion":  "4.1.5"
}

Package Dependency Check

The engine checks that every package listed in packageDependencies is installed in the target tenant at a compatible version. Missing or incompatible dependencies block the import:

{
  "error":   "MissingPackageDependency",
  "missing": [
    { "packageName": "BizFirstGO.HRBase", "requiredMinVersion": "1.0.0", "installedVersion": null }
  ]
}

Validation Error Format

HTTP 400 Bad Request
{
  "error":   "ValidationFailed",
  "message": "Package validation failed. Fix the errors below and retry.",
  "errors": [
    {
      "layer":   "ZipStructure",
      "code":    "ArtifactFileMissing",
      "message": "File 'artifacts/forms/form-2005.json' declared in manifest but not found in ZIP"
    },
    {
      "layer":   "ManifestSchema",
      "code":    "InvalidVersion",
      "message": "version '2.1' is not valid SemVer — expected major.minor.patch"
    }
  ]
}
All Errors Returned Together The engine runs all validation layers before returning. You get a complete list of all issues at once rather than discovering them one by one.