{ "$id": "common", "description": "Repository of definitions that are used throughout the application's schemas", "definitions": { "name": { "type": "string", "minLength": 1, "description": "The name of the document", "examples": [ "myCoolDocumentName" ] }, "description": { "type": "string", "description": "The description of the document", "examples": [ "Some helpful information about the document" ] }, "state-identifier": { "description": "The identifier of a resource model or resource instance state", "$ref": "#/definitions/hex-id" }, "ObjectIdLikeString": { "description": "A string which is formatted like an ObjectId, Distinct from an actual ObjectId.", "$comment": "The pattern from common-db#/definitions/MongoDB_ObjectId is used to identify fields which are actual MongoDB ObjectIds.", "type": "string", "pattern": "^[0-9a-f]{24}$" }, "ObjectId": { "title": "MongoDB.ObjectId", "description": "A MongoDB ObjectId", "type": "string", "pattern": "^[0-9a-fA-F]{24}$", "examples": [ "62a1f3d2ebedfc54e6e0065c" ] }, "uuid-v4": { "description": "A UUIDv4 identifier.", "type": "string", "pattern": "^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$", "examples": [ "6ffce28f-37f8-48a0-a026-5567120def79", "9f3a1fc3-5192-470e-bdcb-9a8ac978e1e5" ] }, "workflow-identifier": { "description": "The UUIDv4 identifying a workflow", "$ref": "#/definitions/uuid-v4" }, "hex-id": { "description": "A 4-digit hexadecimal id", "type": "string", "pattern": "^[0-9a-fA-F]{4}$", "examples": [ "0a2f", "5341", "0000" ] }, "iso-date-string": { "type": "string", "description": "An ISO 8601 date string", "format": "date-time" }, "lastAction": { "description": "The last action that was run against this document", "type": "object", "additionalProperties": false, "required": [ "_id", "executionId", "name", "type", "status" ], "properties": { "_id": { "$ref": "resource-model-common#/definitions/action-identifier" }, "executionId": { "$ref": "#/definitions/ObjectId" }, "name": { "$ref": "resource-model-common#/definitions/action-name" }, "type": { "$ref": "resource-model-common#/definitions/action-type" }, "status": { "$ref": "resource-action-execution-common#/definitions/status" } } }, "lastActionDereferenced": { "description": "The last action that was run against this document", "type": "object", "additionalProperties": false, "required": [ "_id", "executionId", "name", "type", "status" ], "properties": { "_id": { "$ref": "resource-model-common#/definitions/action-identifier" }, "executionId": { "$ref": "#/definitions/ObjectIdLikeString" }, "name": { "$ref": "resource-model-common#/definitions/action-name" }, "type": { "$ref": "resource-model-common#/definitions/action-type" }, "status": { "$ref": "resource-action-execution-common#/definitions/status" } } }, "account-identifier": { "oneOf": [ { "const": "Pronghorn" }, { "$ref": "#/definitions/ObjectId" }, { "$ref": "#/definitions/ObjectIdLikeString" } ] }, "accountDereferenced": { "type": "object", "properties": { "firstname": { "type": "string" }, "provenance": { "type": "string" }, "username": { "type": "string" }, "_id": { "$ref": "#/definitions/ObjectIdLikeString" } } }, "metadataFieldNames": { "enum": [ "createdBy", "created", "lastUpdatedBy", "lastUpdated" ] }, "metadataFieldsRequired": { "type": "object", "required": [ "createdBy", "created", "lastUpdatedBy", "lastUpdated" ] }, "metadataFields": { "type": "object", "properties": { "createdBy": { "$ref": "#/definitions/account-identifier" }, "created": { "$ref": "#/definitions/iso-date-string" }, "lastUpdatedBy": { "$ref": "#/definitions/account-identifier" }, "lastUpdated": { "$ref": "#/definitions/iso-date-string" } } }, "metadataFieldsDereferenced": { "type": "object", "properties": { "createdBy": { "oneOf": [ { "$ref": "#/definitions/accountDereferenced" }, { "type": "null" } ] }, "created": { "$ref": "#/definitions/iso-date-string" }, "lastUpdatedBy": { "oneOf": [ { "$ref": "#/definitions/accountDereferenced" }, { "type": "null" } ] }, "lastUpdated": { "$ref": "#/definitions/iso-date-string" } } }, "migrationVersion": { "description": "The current document version of this document.", "type": "integer" } } }