{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clarifymedical/json-schema/clarifymedical-create-resource-dto-schema.json",
  "title": "CreateResourceDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clarifymedical-resources-api-openapi.yml#/components/schemas/CreateResourceDto",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The resource type; matches the `object` path parameter."
        },
        "attributes": {
          "description": "Field values keyed by field name; available fields depend on the object’s schema. System fields (prefixed with a single `_`) cannot be set.",
          "type": "object",
          "properties": {},
          "additionalProperties": true
        },
        "relationships": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "data": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "description": "The type of the referenced resource."
                      },
                      "id": {
                        "type": "string",
                        "description": "The unique ID of the referenced resource."
                      }
                    },
                    "required": [
                      "type",
                      "id"
                    ]
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "The type of the referenced resource."
                        },
                        "id": {
                          "type": "string",
                          "description": "The unique ID of the referenced resource."
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ]
                    }
                  }
                ],
                "description": "The linked resource reference, or an array of references for a to-many relationship."
              }
            },
            "required": [
              "data"
            ]
          },
          "description": "Related resources to link on creation, keyed by relationship name."
        }
      },
      "required": [
        "type",
        "attributes"
      ],
      "additionalProperties": false,
      "description": "The resource to create."
    }
  },
  "required": [
    "data"
  ]
}