merge: T005 listing.schema.json v1
This commit is contained in:
commit
297258d644
1 changed files with 129 additions and 0 deletions
129
schemas/listing.schema.json
Normal file
129
schemas/listing.schema.json
Normal file
|
|
@ -0,0 +1,129 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.machinemachine.ai/m2/market-registry/schemas/listing.schema.json",
|
||||||
|
"title": "Listing",
|
||||||
|
"description": "Catalog-facing record for a marketplace listing. Truth lives in m2/market-registry; derived copy indexed into market:catalog.",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"schema_version": {
|
||||||
|
"const": "m2.listing.v1"
|
||||||
|
},
|
||||||
|
"listing_id": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^lst_[a-z0-9-]+$"
|
||||||
|
},
|
||||||
|
"solution_id": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^sol_[a-z0-9-]+$"
|
||||||
|
},
|
||||||
|
"solution_version": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"inventory_type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["solution", "capability", "resource", "service"]
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"summary": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"category": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"keywords": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"icon": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"price": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "Denormalized from solution at listing time.",
|
||||||
|
"properties": {
|
||||||
|
"amount": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"currency": {
|
||||||
|
"const": "m2cr"
|
||||||
|
},
|
||||||
|
"model": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["amount", "currency", "model"],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
"seller": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "operator_id"
|
||||||
|
},
|
||||||
|
"evidence_summary": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tenant_visibility": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"minItems": 1
|
||||||
|
},
|
||||||
|
"stats": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "Conversion signals (FR-012), updated by telemetry, start zeroed.",
|
||||||
|
"properties": {
|
||||||
|
"installs": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"default": 0
|
||||||
|
},
|
||||||
|
"rating": {
|
||||||
|
"type": "number",
|
||||||
|
"minimum": 0,
|
||||||
|
"maximum": 5
|
||||||
|
},
|
||||||
|
"proposals_shown": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"default": 0
|
||||||
|
},
|
||||||
|
"proposals_accepted": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"default": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["installs", "proposals_shown", "proposals_accepted"],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["draft", "in_review", "published", "delisted"]
|
||||||
|
},
|
||||||
|
"install_ref": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^lst_[a-z0-9-]+-v\\d+\\.\\d+\\.\\d+$"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"schema_version",
|
||||||
|
"listing_id",
|
||||||
|
"solution_id",
|
||||||
|
"solution_version",
|
||||||
|
"inventory_type",
|
||||||
|
"name",
|
||||||
|
"summary",
|
||||||
|
"category",
|
||||||
|
"price",
|
||||||
|
"seller",
|
||||||
|
"tenant_visibility",
|
||||||
|
"status",
|
||||||
|
"install_ref"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue