{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/optum/json-schema/optum-attachment-response-schema.json",
  "title": "AttachmentResponse",
  "description": "FHIR OperationOutcome response",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/optum-submitattachment-api-openapi.yml#/components/schemas/AttachmentResponse",
  "type": "object",
  "properties": {
    "resourceType": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "meta": {
      "$ref": "#/$defs/Meta"
    },
    "issue": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Issue"
      }
    },
    "text": {
      "$ref": "#/$defs/Narrative"
    }
  },
  "$defs": {
    "Issue": {
      "type": "object",
      "description": "OperationOutcome issue details",
      "properties": {
        "severity": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "details": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            }
          }
        },
        "diagnostics": {
          "type": "string"
        },
        "location": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Meta": {
      "type": "object",
      "description": "FHIR metadata",
      "properties": {
        "profile": {
          "type": "array",
          "description": "FHIR profile URLs",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Narrative": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string"
        },
        "div": {
          "type": "string"
        }
      }
    }
  }
}