{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/immix/json-schema/immix-upsert-portfolio-body-schema.json",
  "title": "UpsertPortfolioBody",
  "description": "UpsertPortfolio with edge-stamped fields (userId) removed — the edge sets them and refuses a body value.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/immix-portfolios-api-openapi.yml#/components/schemas/UpsertPortfolioBody",
  "type": "object",
  "properties": {
    "portfolioId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "0 = create."
    },
    "expectedVersion": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+$",
      "description": "int64 as a decimal JSON string"
    },
    "name": {
      "type": "string"
    }
  },
  "required": [
    "name"
  ]
}