{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/SINOSHOP-OPEN/SINOPORT-Sandbox/schema/sandbox_submission_v1.0.schema.json",
  "title": "SINOPORT Sandbox Submission V1.0",
  "description": "Submission payload for the SINOPORT open hardware sandbox, per SINOPORT Modular Interface & Data Collaboration Specification V1.0 (B-level controlled open source, Apache-2.0).",
  "type": "object",
  "required": ["unit_id", "unit_type", "mass_kg", "center_of_gravity", "mechanical", "hydro", "submitter", "version"],
  "additionalProperties": false,
  "properties": {
    "unit_id": { "type": "string", "minLength": 1, "description": "Unique identifier of the mounting unit." },
    "unit_type": { "type": "string", "enum": ["material", "energy_device", "damper", "sensor"] },
    "mass_kg": { "type": "number", "exclusiveMinimum": 0, "maximum": 3500, "description": "Total mass in kg; station limit 3500 kg (spec section 2.2)." },
    "center_of_gravity": {
      "type": "object",
      "required": ["x", "y", "z"],
      "additionalProperties": false,
      "properties": {
        "x": { "type": "number", "description": "CG offset, m; horizontal limit 0.25 m." },
        "y": { "type": "number", "description": "CG offset, m; horizontal limit 0.25 m." },
        "z": { "type": "number", "description": "CG offset, m; vertical limit 0.30 m." }
      }
    },
    "mechanical": {
      "type": "object",
      "required": ["E", "nu", "rho"],
      "additionalProperties": false,
      "properties": {
        "E": { "type": "number", "exclusiveMinimum": 0, "description": "Elastic modulus, Pa." },
        "nu": { "type": "number", "minimum": 0, "maximum": 0.5, "description": "Poisson ratio." },
        "rho": { "type": "number", "exclusiveMinimum": 0, "description": "Density, kg/m3." },
        "sigma_y": { "type": "number", "description": "Yield strength, Pa; mandatory for structural members." }
      }
    },
    "hydro": {
      "type": "object",
      "required": ["Cd", "Cl", "natural_freq_hz"],
      "additionalProperties": false,
      "properties": {
        "Cd": { "type": "number", "description": "Drag coefficient." },
        "Cl": { "type": "number", "description": "Lift coefficient." },
        "natural_freq_hz": { "type": "number", "exclusiveMinimum": 0, "description": "Natural frequency, Hz; inside 0.12-0.45 Hz the script marks WARNING." }
      }
    },
    "functional_params": {
      "type": "object",
      "description": "Open extension area: power-vs-wave curve for energy devices, damping-vs-displacement curve for dampers, sampling time-series parameters for sensors."
    },
    "submitter": {
      "type": "object",
      "required": ["team", "cla_agreed"],
      "additionalProperties": false,
      "properties": {
        "team": { "type": "string", "minLength": 1 },
        "cla_agreed": { "type": "boolean", "const": true, "description": "Must be true; acceptance of CLA.md. Only the human representative of the team submits." }
      }
    },
    "version": { "type": "string", "const": "v1.0" },
    "submit_timestamp": { "type": "string", "description": "Auto-filled by the sandbox." },
    "sandbox_run_id": { "type": "string", "description": "Auto-filled by the sandbox." }
  }
}
