{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ptc/json-schema/ptc-project-in-stream-schema.json",
  "title": "ProjectInStream",
  "description": "Basic properties of a codebeamer project within a stream",
  "x-generated": "2026-12-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ptc-codebeamer-api-openapi.yml#/components/schemas/ProjectInStream",
  "type": "object",
  "properties": {
    "baselineDate": {
      "type": "string",
      "format": "date-time",
      "description": "Date of the baseline creation (if baselineId is present)"
    },
    "baselineId": {
      "type": "integer",
      "format": "int32",
      "description": "Baseline ID if it was not created from the head (current) version."
    },
    "category": {
      "type": "string",
      "description": "Category of a project"
    },
    "closed": {
      "type": "boolean",
      "description": "Closed status of a project"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date when the entity was created"
    },
    "createdBy": {
      "$ref": "#/$defs/UserReference"
    },
    "deleted": {
      "type": "boolean",
      "description": "Delete status of a project"
    },
    "description": {
      "type": "string",
      "description": "Description of the entity"
    },
    "descriptionFormat": {
      "type": "string",
      "description": "Description format of the entity",
      "enum": [
        "PlainText",
        "Html",
        "Wiki"
      ]
    },
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "Id of the entity",
      "minimum": 0
    },
    "keyName": {
      "type": "string",
      "description": "Key name of a project"
    },
    "modifiedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date when the entity was modified"
    },
    "modifiedBy": {
      "$ref": "#/$defs/UserReference"
    },
    "name": {
      "type": "string",
      "description": "Name of the entity"
    },
    "sourceStreamHidden": {
      "type": "boolean",
      "description": "Is the source stream hidden"
    },
    "sourceStreamId": {
      "type": "integer",
      "format": "int32",
      "description": "Source stream ID"
    },
    "sourceStreamName": {
      "type": "string",
      "description": "Source stream name"
    },
    "template": {
      "type": "boolean",
      "description": "Template status of a project"
    },
    "version": {
      "type": "integer",
      "format": "int32",
      "description": "Version of a project"
    },
    "workingSetId": {
      "type": "integer",
      "format": "int32",
      "description": "The working set of the project within the stream"
    }
  },
  "required": [
    "workingSetId"
  ],
  "$defs": {
    "AbstractReference": {
      "type": "object",
      "description": "Reference to an item",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32",
          "description": "Id of the entity",
          "minimum": 0
        },
        "name": {
          "type": "string",
          "description": "Name of the entity"
        },
        "type": {
          "type": "string",
          "description": "Type of a referenced object"
        }
      }
    },
    "UserReference": {
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/AbstractReference"
        },
        {
          "type": "object",
          "properties": {
            "displayName": {
              "type": "string",
              "description": "Display name of the user (formatted using the 'accountLink' application config)"
            },
            "email": {
              "type": "string",
              "description": "Email of a referenced user"
            }
          }
        }
      ],
      "description": "Reference to a user"
    }
  }
}