Specify R6 data contracts and verify coupled REST migration

This commit is contained in:
2026-09-06 03:46:13 +03:00
parent 0b58107097
commit 959b83c78f
13 changed files with 1544 additions and 190 deletions
+652 -63
View File
@@ -3,7 +3,7 @@
"info": {
"title": "Arcadia Studio model API",
"version": "1.0.0",
"description": "Current schema-3 snapshots and conditional atomic writes. Request body limit: 8 MiB; at most 200 nested commands; no retained revisions, request receipts, automatic retries or persistent transition plans. See docs/api.rst. Fixed store capacity: 128 models / 256 MiB serialized envelopes. Stateless transition preview/apply. Artifact URI/revision strings remain opaque core fields. Model admission before structural validation: 5,000 graph objects, 20,000 total records and 50,000 ordered references. Preparation uses snapshots outside the catalog lock; final commits recheck the exact ETag. Each accepted envelope couples model and authored source under one revision. Source-only edits advance the shared ETag. Source bundles resolve logical paths only, preserve authored files/comments, and have a stabilized JSON cap of 8 MiB, 256 files, 32 include edges along a path and 1,024 include edges overall."
"description": "Current schema-4 snapshots and conditional atomic writes. Request body limit: 8 MiB; at most 200 nested commands; no retained revisions, request receipts, automatic retries or persistent transition plans. See docs/api.rst. Fixed store capacity: 128 models / 256 MiB serialized envelopes. Stateless transition preview/apply. Artifact URI/revision strings remain opaque core fields. Model admission before structural validation: 5,000 graph objects, 20,000 total records and 50,000 ordered references. Preparation uses snapshots outside the catalog lock; final commits recheck the exact ETag. Each accepted envelope couples model and authored source under one revision. Source-only edits advance the shared ETag. Source bundles resolve logical paths only, preserve authored files/comments, and have a stabilized JSON cap of 8 MiB, 256 files, 32 include edges along a path and 1,024 include edges overall."
},
"servers": [
{
@@ -389,7 +389,7 @@
}
}
},
"description": "Schema-3 native JSON is described below. Schema-1 and schema-2 JSON/source are accepted through explicit frozen readers and migration, also on replacement and candidate validation. Reports list preserved Legacy contracts, generated FE endpoint IDs/aliases and boundary orientation defaults. Export emits schema 3 / arcadia 3. See docs/language.rst."
"description": "Schema-4 native JSON is described below. Schema-1, schema-2 and schema-3 JSON/source are accepted through explicit frozen readers and migration, also on replacement and candidate validation. Reports list preserved Legacy contracts, generated FE endpoint IDs/aliases and boundary orientation defaults. Export emits schema 4 / arcadia 4. See docs/language.rst."
}
},
"/api/v1/projects/{id}": {
@@ -1902,7 +1902,9 @@
"CapabilityGeneralization",
"MissionInvolvement",
"SequenceLink",
"PortAllocation"
"PortAllocation",
"InterfaceItemAllocation",
"DataAssociation"
]
},
"Position": {
@@ -2004,40 +2006,185 @@
{
"type": "string",
"enum": [
"Boolean",
"Integer",
"Real",
"String",
"Record"
"Boolean"
]
},
{
"oneOf": [
{
"type": "object",
"properties": {
"Integer": {
"type": "object",
"properties": {
"Enumeration": {
"type": "object",
"properties": {
"literals": {
"type": "array",
"items": {
"type": "string"
}
"minimum": {
"anyOf": [
{
"type": "integer",
"format": "int64",
"minimum": -9223372036854775808,
"maximum": 9223372036854775807
},
{
"type": "null"
}
},
"required": [
"literals"
],
"additionalProperties": false
]
},
"maximum": {
"anyOf": [
{
"type": "integer",
"format": "int64",
"minimum": -9223372036854775808,
"maximum": 9223372036854775807
},
{
"type": "null"
}
]
}
},
"required": [
"Enumeration"
"minimum",
"maximum"
],
"additionalProperties": false
}
]
},
"required": [
"Integer"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"Real": {
"type": "object",
"properties": {
"minimum": {
"anyOf": [
{
"type": "number",
"format": "double",
"description": "Finite IEEE-754 binary64; no coercion from typed Integer values."
},
{
"type": "null"
}
]
},
"maximum": {
"anyOf": [
{
"type": "number",
"format": "double",
"description": "Finite IEEE-754 binary64; no coercion from typed Integer values."
},
{
"type": "null"
}
]
}
},
"required": [
"minimum",
"maximum"
],
"additionalProperties": false
}
},
"required": [
"Real"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"String": {
"type": "object",
"properties": {
"minimum_length": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295
},
"maximum_length": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 4294967295
},
{
"type": "null"
}
]
}
},
"required": [
"minimum_length",
"maximum_length"
],
"additionalProperties": false
}
},
"required": [
"String"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"Enumeration": {
"type": "object",
"properties": {
"literals": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"literals"
],
"additionalProperties": false
}
},
"required": [
"Enumeration"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"Record": {
"type": "object",
"properties": {
"supertype": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
}
},
"required": [
"supertype"
],
"additionalProperties": false
}
},
"required": [
"Record"
],
"additionalProperties": false
}
]
},
@@ -2402,17 +2549,27 @@
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"Information",
"Material",
"Energy",
"Event"
"$ref": "#/components/schemas/ExchangeItemKind"
},
"mechanism": {
"$ref": "#/components/schemas/ExchangeMechanism"
},
"supertype": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
}
},
"required": [
"kind"
"kind",
"mechanism",
"supertype"
],
"additionalProperties": false
}
@@ -2430,10 +2587,25 @@
"properties": {
"definition": {
"$ref": "#/components/schemas/DataTypeDefinition"
},
"default": {
"anyOf": [
{
"$ref": "#/components/schemas/DataValue"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string"
}
},
"required": [
"definition"
"definition",
"default",
"unit"
],
"additionalProperties": false
}
@@ -2454,13 +2626,15 @@
},
"minimum": {
"type": "integer",
"minimum": 0
"minimum": 0,
"maximum": 4294967295
},
"maximum": {
"anyOf": [
{
"type": "integer",
"minimum": 0
"minimum": 0,
"maximum": 4294967295
},
{
"type": "null"
@@ -2469,13 +2643,35 @@
},
"unit": {
"type": "string"
},
"direction": {
"$ref": "#/components/schemas/ParameterDirection"
},
"storage": {
"$ref": "#/components/schemas/FieldStorage"
},
"default": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/DataValue"
}
},
{
"type": "null"
}
]
}
},
"required": [
"type_ref",
"minimum",
"maximum",
"unit"
"unit",
"direction",
"storage",
"default"
],
"additionalProperties": false
}
@@ -2491,16 +2687,20 @@
"Interface": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
"supertype": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
}
},
"required": [
"items"
"supertype"
],
"additionalProperties": false
}
@@ -3581,6 +3781,128 @@
"PortAllocation"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"InterfaceItemAllocation": {
"type": "object",
"properties": {
"source": {
"type": "string",
"format": "uuid"
},
"target": {
"type": "string",
"format": "uuid"
},
"order": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295
},
"transmission": {
"$ref": "#/components/schemas/TransmissionProtocol"
},
"acquisition": {
"$ref": "#/components/schemas/AcquisitionProtocol"
}
},
"required": [
"source",
"target",
"order",
"transmission",
"acquisition"
],
"additionalProperties": false
}
},
"required": [
"InterfaceItemAllocation"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"DataAssociation": {
"type": "object",
"properties": {
"source": {
"type": "string",
"format": "uuid"
},
"target": {
"type": "string",
"format": "uuid"
},
"source_role": {
"type": "string"
},
"target_role": {
"type": "string"
},
"source_minimum": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295
},
"source_maximum": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 4294967295
},
{
"type": "null"
}
]
},
"target_minimum": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295
},
"target_maximum": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 4294967295
},
{
"type": "null"
}
]
},
"source_navigable": {
"type": "boolean"
},
"target_navigable": {
"type": "boolean"
}
},
"required": [
"source",
"target",
"source_role",
"target_role",
"source_minimum",
"source_maximum",
"target_minimum",
"target_maximum",
"source_navigable",
"target_navigable"
],
"additionalProperties": false
}
},
"required": [
"DataAssociation"
],
"additionalProperties": false
}
]
},
@@ -3617,7 +3939,12 @@
},
"PortAnchorSide": {
"type": "string",
"enum": ["Left", "Right", "Top", "Bottom"],
"enum": [
"Left",
"Right",
"Top",
"Bottom"
],
"description": "Presentation side of the owner placement; independent of semantic port direction."
},
"PortAnchor": {
@@ -3638,7 +3965,11 @@
"description": "Finite binary32 fraction of the complete owner edge, measured from top on Left/Right and from left on Top/Bottom."
}
},
"required": ["port", "side", "offset"],
"required": [
"port",
"side",
"offset"
],
"additionalProperties": false
},
"NodePlacement": {
@@ -3956,7 +4287,7 @@
"properties": {
"schema_version": {
"type": "integer",
"const": 3
"const": 4
},
"id": {
"type": "string",
@@ -4070,7 +4401,7 @@
"source_project"
],
"additionalProperties": false,
"description": "Accepted coupled model/source snapshot. Compiling source_project reproduces model; revision changes once if either representation changes. Old model-only envelopes acquire source in memory without a write or revision change."
"description": "Accepted coupled model/source snapshot. Compiling source_project reproduces model; revision changes once if either representation changes. Older model-only or schema3 coupled envelopes migrate in memory without a write or revision change; both representations must independently migrate to the same graph."
},
"ProjectSummary": {
"type": "object",
@@ -4814,15 +5145,29 @@
"type": "object",
"description": "Upsert manual port position by port identity on an existing owner placement, preserving unrelated entries. Port must be a direct child of the placement's semantic element.",
"properties": {
"diagram": { "type": "string", "format": "uuid" },
"node": { "type": "string", "format": "uuid" },
"anchor": { "$ref": "#/components/schemas/PortAnchor" }
"diagram": {
"type": "string",
"format": "uuid"
},
"node": {
"type": "string",
"format": "uuid"
},
"anchor": {
"$ref": "#/components/schemas/PortAnchor"
}
},
"required": ["diagram", "node", "anchor"],
"required": [
"diagram",
"node",
"anchor"
],
"additionalProperties": false
}
},
"required": ["SetPortAnchor"],
"required": [
"SetPortAnchor"
],
"additionalProperties": false
},
{
@@ -4832,15 +5177,30 @@
"type": "object",
"description": "Restore automatic positioning for an existing direct child Port. No-op when that valid owner placement has no manual anchor for the port; wrong or stale ownership is rejected.",
"properties": {
"diagram": { "type": "string", "format": "uuid" },
"node": { "type": "string", "format": "uuid" },
"port": { "type": "string", "format": "uuid" }
"diagram": {
"type": "string",
"format": "uuid"
},
"node": {
"type": "string",
"format": "uuid"
},
"port": {
"type": "string",
"format": "uuid"
}
},
"required": ["diagram", "node", "port"],
"required": [
"diagram",
"node",
"port"
],
"additionalProperties": false
}
},
"required": ["RemovePortAnchor"],
"required": [
"RemovePortAnchor"
],
"additionalProperties": false
},
{
@@ -5809,6 +6169,14 @@
"MessageValue": {
"type": "object",
"properties": {
"path": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"default": []
},
"field": {
"type": "string",
"format": "uuid"
@@ -5821,7 +6189,8 @@
"field",
"expression"
],
"additionalProperties": false
"additionalProperties": false,
"description": "Identity is (path, field). Path lists enclosing DataField UUIDs, excluding the terminal field. Value storage traverses named Records; Reference storage stops traversal. Operation Call accepts In/InOut and Reply accepts Out/InOut/Return. Unspecified direction and retained ambiguous legacy empty paths warn. Expressions are descriptive, never executed."
},
"LifelineBinding": {
"type": "object",
@@ -6083,12 +6452,13 @@
"type": "integer",
"enum": [
1,
2
2,
3
]
},
"to_schema": {
"type": "integer",
"const": 3
"const": 4
},
"preserved_ports": {
"type": "array",
@@ -6179,6 +6549,91 @@
"type": "string",
"format": "uuid"
}
},
"semantic_defaults": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"type": "string",
"format": "uuid"
},
"field": {
"type": "string"
},
"description": {
"type": "string"
}
},
"required": [
"object",
"field",
"description"
],
"additionalProperties": false
}
},
"generated_interface_allocations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"source": {
"type": "string",
"format": "uuid"
},
"target": {
"type": "string",
"format": "uuid"
},
"alias": {
"type": "string"
},
"order": {
"type": "integer",
"minimum": 0,
"maximum": 4294967295
}
},
"required": [
"id",
"source",
"target",
"alias",
"order"
],
"additionalProperties": false
}
},
"unresolved_message_values": {
"type": "array",
"items": {
"type": "object",
"properties": {
"occurrence": {
"type": "string",
"format": "uuid"
},
"field": {
"type": "string",
"format": "uuid"
},
"reason": {
"type": "string"
}
},
"required": [
"occurrence",
"field",
"reason"
],
"additionalProperties": false
}
}
},
"required": [
@@ -6190,11 +6645,11 @@
"required_resolutions"
],
"additionalProperties": false,
"description": "Transient observations from explicit V1→V2→V3 or V2→V3 migration. No save or revision increase occurs merely by reading an old envelope."
"description": "Transient observations from explicit V1/V2/V3 to V4 migration. New report lists default to empty when reading older responses. Reading an old envelope neither saves nor changes its revision. Allocation UUIDv5 uses project namespace and v2-interface-item:<interface>:<item>."
},
"SourceBundle": {
"type": "object",
"description": "Complete source3 workspace. The entry is a root filename. Files use canonical portable slash-separated relative .arcadia paths and all must be reachable. Includes resolve only against this map, never the service filesystem. Up to 256 files, 32 include edges along a path and 1,024 include edges overall. Serialized bundle JSON is at most 8 MiB, checked again after missing UUIDs are inserted. GET returns exact accepted stable text.",
"description": "Complete source4 workspace (source3 migrates explicitly). The entry is a root filename. Files use canonical portable slash-separated relative .arcadia paths and all must be reachable. Includes resolve only against this map, never the service filesystem. Up to 256 files, 32 include edges along a path and 1,024 include edges overall. Serialized bundle JSON is at most 8 MiB, checked again after missing UUIDs are inserted. GET returns exact accepted stable text.",
"properties": {
"entry": {
"type": "string"
@@ -6267,15 +6722,149 @@
},
"source_project": {
"$ref": "#/components/schemas/SourceBundle"
},
"migration": {
"anyOf": [
{
"$ref": "#/components/schemas/MigrationReport"
},
{
"type": "null"
}
]
}
},
"required": [
"revision",
"changed",
"issues",
"source_project"
"source_project",
"migration"
],
"additionalProperties": false
},
"ExchangeItemKind": {
"type": "string",
"enum": [
"Information",
"Material",
"Energy"
]
},
"ExchangeMechanism": {
"type": "string",
"enum": [
"Unspecified",
"Flow",
"Event",
"Operation",
"SharedData"
]
},
"ParameterDirection": {
"type": "string",
"enum": [
"Unspecified",
"In",
"Out",
"InOut",
"Return"
]
},
"FieldStorage": {
"type": "string",
"enum": [
"Value",
"Reference"
]
},
"TransmissionProtocol": {
"type": "string",
"enum": [
"Unspecified",
"Synchronous",
"Asynchronous",
"Unicast",
"Multicast",
"Broadcast"
]
},
"AcquisitionProtocol": {
"type": "string",
"enum": [
"Unspecified",
"Read",
"Accept"
]
},
"DataValue": {
"oneOf": [
{
"type": "object",
"properties": {
"Boolean": {
"type": "boolean"
}
},
"required": [
"Boolean"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"Integer": {
"type": "integer",
"format": "int64",
"minimum": -9223372036854775808,
"maximum": 9223372036854775807
}
},
"required": [
"Integer"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"Real": {
"type": "number",
"format": "double",
"description": "Finite IEEE-754 binary64; no coercion from typed Integer values."
}
},
"required": [
"Real"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"String": {
"type": "string"
}
},
"required": [
"String"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"Enumeration": {
"type": "string"
}
},
"required": [
"Enumeration"
],
"additionalProperties": false
}
]
}
}
}