Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

assetValidator

Structure validator for asset folders. Delegates each asset to asset.validate — the engine primitive the world.push gate runs — and maps the result into the report's Problem records, so a world that validates clean here also passes the structural half of the publish gate.

Exports

  • M.validate(entry) -> { Problem } — validate one asset entry (as produced by vfsScanner). Returns an array of Problem records; empty means structurally clean.
  • M.validateBatch(assets) -> { Problem } — flatten validation across a list of assets.

Checks performed (via asset.validate)

CodeSeverityWhat it catches
structure.missing_required_fileerrorRequired file/folder declared in type.yaml::files.required is absent (including unsatisfied one_of_group).
structure.content_constrainterrorA declared file exists but violates its content: checks (e.g. empty README.md, .metadata without description/tags).
structure.unexpected_filewarningAn entry at the asset root is not listed in required/optional and allow_unlisted is false. Reported as a warning because the publish gate does not block on it — tightening the declared-child set is the assetType author's call.
validate.* / type-defined codesas reportedThe asset type's own semantic validate hook (from its behavior.luau).
schema.unknown_typewarningAsset folder has a suffix with no registered type.yaml.
schema.unresolved_assetwarningThe registry could not resolve the asset yet (e.g. written this frame, registration still draining).

Private subassets — assets nested inside a container whose type does not broadcast its subassets (e.g. a bundle's interior meshes / materials) — are exempt from the describe-this-asset requirements (README.md / .metadata presence and content). Their own primary file and structural rules still apply. Members of a broadcasting container (a .package) and top-level assets are fully gated.

Problem anchoring

Missing files anchor at the asset root (the message names the file); existing files — unexpected entries, content violations — anchor at the file itself.