From 7d75abdf32b79ed204d6c2c25cc03c1275e9f83d Mon Sep 17 00:00:00 2001 From: James B Date: Wed, 4 Dec 2024 15:55:28 +0000 Subject: [PATCH] schema/service_capacity.json & schema/unit.json need capacity block set https://github.com/openreferral/specification/issues/528 --- datapackage.json | 117 ++++++++- schema/compiled/organization.json | 40 +++ schema/compiled/organization_package.json | 40 +++ schema/compiled/service.json | 40 +++ schema/compiled/service_at_location.json | 40 +++ .../compiled/service_at_location_package.json | 40 +++ schema/compiled/service_package.json | 40 +++ schema/compiled/service_with_definitions.json | 248 ++++++++++-------- schema/service_capacity.json | 20 ++ schema/unit.json | 20 ++ 10 files changed, 540 insertions(+), 105 deletions(-) diff --git a/datapackage.json b/datapackage.json index b91dadb..ed04835 100644 --- a/datapackage.json +++ b/datapackage.json @@ -2761,6 +2761,18 @@ "schema": { "primaryKey": "id", "fields": [ + { + "name": "id", + "title": "Identifier", + "type": "string", + "constraints": { + "required": true, + "unique": true + }, + "format": "uuid", + "description": "The identifier for the service_capacity object. Each service_capacity must have a unique identifier.", + "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" + }, { "name": "service_id", "title": "Service Identifier", @@ -2784,6 +2796,51 @@ "unique": false }, "example": "187a37a2-7b40-11ef-9790-dbf7623d4407" + }, + { + "name": "available", + "title": "Available", + "type": "number", + "constraints": { + "required": true, + "unique": false + }, + "description": "The number of units available as of the last update.", + "example": "12" + }, + { + "name": "maximum", + "title": "Maximum", + "type": "number", + "constraints": { + "required": false, + "unique": false + }, + "description": "The maximum number of units that can be available for this service, if applicable", + "example": "10" + }, + { + "name": "description", + "title": "Description", + "type": "string", + "constraints": { + "required": false, + "unique": false + }, + "description": "A Human-Friendly description of this service capacity e.g. \u201cBeds available for people experiencing homelessness\u201d", + "example": "Beds available for people experiencing homelessness." + }, + { + "name": "updated", + "title": "Date Updated", + "type": "string", + "constraints": { + "required": true, + "unique": false + }, + "format": "date-time", + "description": "The datetime when this service_capacit y object was last updated or changed. Should have millisecond accuracy. ", + "example": "2024-09-25T14:23:06.5+01:00" } ], "foreignKeys": [ @@ -2813,7 +2870,65 @@ "profile": "tabular-data-resource", "schema": { "primaryKey": "id", - "fields": [] + "fields": [ + { + "name": "id", + "type": "string", + "format": "uuid", + "constraints": { + "required": true, + "unique": true + }, + "title": "Identifier", + "description": "The identifier for the unit object. Each unit must have a unique identifier.", + "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" + }, + { + "name": "name", + "type": "string", + "constraints": { + "required": true, + "unique": false + }, + "title": "Name", + "description": "The human-readable name for this unit e.g. \u201cBed\u201d or \u201cHours\u201d", + "example": "Kilogram" + }, + { + "name": "scheme", + "type": "string", + "constraints": { + "required": false, + "unique": false + }, + "title": "Scheme", + "description": "The scheme which formalizes the unit, if applicable e.g. \u201cSI\u201d for Standard International Units such as Kilogram, Litre, etc.", + "example": "SI" + }, + { + "name": "identifier", + "type": "string", + "constraints": { + "required": false, + "unique": false + }, + "title": "Unit Identifier", + "description": "The identifier of the unit taken from the scheme if applicable e.g. `kgm` for Kilogram.", + "example": "kgm" + }, + { + "name": "uri", + "type": "string", + "constraints": { + "required": false, + "unique": false + }, + "format": "uri", + "title": "URI", + "description": "The URI to the definition of the unit, if applicable", + "example": "https://not-a-real-url.org/standard-international-units/kgm" + } + ] } }, { diff --git a/schema/compiled/organization.json b/schema/compiled/organization.json index 3b1a9f0..2375205 100644 --- a/schema/compiled/organization.json +++ b/schema/compiled/organization.json @@ -65913,6 +65913,10 @@ "name": "id", "title": "Identifier", "type": "string", + "constraints": { + "required": true, + "unique": true + }, "format": "uuid", "description": "The identifier for the service_capacity object. Each service_capacity must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -65944,6 +65948,10 @@ "name": "id", "type": "string", "format": "uuid", + "constraints": { + "required": true, + "unique": true + }, "title": "Identifier", "description": "The identifier for the unit object. Each unit must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -65951,6 +65959,10 @@ "name": { "name": "name", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "title": "Name", "description": "The human-readable name for this unit e.g. \u201cBed\u201d or \u201cHours\u201d", "example": "Kilogram" @@ -65958,6 +65970,10 @@ "scheme": { "name": "scheme", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Scheme", "description": "The scheme which formalizes the unit, if applicable e.g. \u201cSI\u201d for Standard International Units such as Kilogram, Litre, etc.", "example": "SI" @@ -65965,6 +65981,10 @@ "identifier": { "name": "identifier", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Unit Identifier", "description": "The identifier of the unit taken from the scheme if applicable e.g. `kgm` for Kilogram.", "example": "kgm" @@ -65972,6 +65992,10 @@ "uri": { "name": "uri", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "format": "uri", "title": "URI", "description": "The URI to the definition of the unit, if applicable", @@ -66799,6 +66823,10 @@ "name": "available", "title": "Available", "type": "number", + "constraints": { + "required": true, + "unique": false + }, "description": "The number of units available as of the last update.", "example": "12" }, @@ -66806,6 +66834,10 @@ "name": "maximum", "title": "Maximum", "type": "number", + "constraints": { + "required": false, + "unique": false + }, "description": "The maximum number of units that can be available for this service, if applicable", "example": "10" }, @@ -66813,6 +66845,10 @@ "name": "description", "title": "Description", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "description": "A Human-Friendly description of this service capacity e.g. \u201cBeds available for people experiencing homelessness\u201d", "example": "Beds available for people experiencing homelessness." }, @@ -66820,6 +66856,10 @@ "name": "updated", "title": "Date Updated", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "format": "date-time", "description": "The datetime when this service_capacit y object was last updated or changed. Should have millisecond accuracy. ", "example": "2024-09-25T14:23:06.5+01:00" diff --git a/schema/compiled/organization_package.json b/schema/compiled/organization_package.json index 60bd1dc..e31b9db 100644 --- a/schema/compiled/organization_package.json +++ b/schema/compiled/organization_package.json @@ -65915,6 +65915,10 @@ "name": "id", "title": "Identifier", "type": "string", + "constraints": { + "required": true, + "unique": true + }, "format": "uuid", "description": "The identifier for the service_capacity object. Each service_capacity must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -65946,6 +65950,10 @@ "name": "id", "type": "string", "format": "uuid", + "constraints": { + "required": true, + "unique": true + }, "title": "Identifier", "description": "The identifier for the unit object. Each unit must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -65953,6 +65961,10 @@ "name": { "name": "name", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "title": "Name", "description": "The human-readable name for this unit e.g. \u201cBed\u201d or \u201cHours\u201d", "example": "Kilogram" @@ -65960,6 +65972,10 @@ "scheme": { "name": "scheme", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Scheme", "description": "The scheme which formalizes the unit, if applicable e.g. \u201cSI\u201d for Standard International Units such as Kilogram, Litre, etc.", "example": "SI" @@ -65967,6 +65983,10 @@ "identifier": { "name": "identifier", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Unit Identifier", "description": "The identifier of the unit taken from the scheme if applicable e.g. `kgm` for Kilogram.", "example": "kgm" @@ -65974,6 +65994,10 @@ "uri": { "name": "uri", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "format": "uri", "title": "URI", "description": "The URI to the definition of the unit, if applicable", @@ -66801,6 +66825,10 @@ "name": "available", "title": "Available", "type": "number", + "constraints": { + "required": true, + "unique": false + }, "description": "The number of units available as of the last update.", "example": "12" }, @@ -66808,6 +66836,10 @@ "name": "maximum", "title": "Maximum", "type": "number", + "constraints": { + "required": false, + "unique": false + }, "description": "The maximum number of units that can be available for this service, if applicable", "example": "10" }, @@ -66815,6 +66847,10 @@ "name": "description", "title": "Description", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "description": "A Human-Friendly description of this service capacity e.g. \u201cBeds available for people experiencing homelessness\u201d", "example": "Beds available for people experiencing homelessness." }, @@ -66822,6 +66858,10 @@ "name": "updated", "title": "Date Updated", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "format": "date-time", "description": "The datetime when this service_capacit y object was last updated or changed. Should have millisecond accuracy. ", "example": "2024-09-25T14:23:06.5+01:00" diff --git a/schema/compiled/service.json b/schema/compiled/service.json index 70bf14a..d029bb6 100644 --- a/schema/compiled/service.json +++ b/schema/compiled/service.json @@ -47474,6 +47474,10 @@ "name": "id", "title": "Identifier", "type": "string", + "constraints": { + "required": true, + "unique": true + }, "format": "uuid", "description": "The identifier for the service_capacity object. Each service_capacity must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -47505,6 +47509,10 @@ "name": "id", "type": "string", "format": "uuid", + "constraints": { + "required": true, + "unique": true + }, "title": "Identifier", "description": "The identifier for the unit object. Each unit must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -47512,6 +47520,10 @@ "name": { "name": "name", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "title": "Name", "description": "The human-readable name for this unit e.g. \u201cBed\u201d or \u201cHours\u201d", "example": "Kilogram" @@ -47519,6 +47531,10 @@ "scheme": { "name": "scheme", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Scheme", "description": "The scheme which formalizes the unit, if applicable e.g. \u201cSI\u201d for Standard International Units such as Kilogram, Litre, etc.", "example": "SI" @@ -47526,6 +47542,10 @@ "identifier": { "name": "identifier", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Unit Identifier", "description": "The identifier of the unit taken from the scheme if applicable e.g. `kgm` for Kilogram.", "example": "kgm" @@ -47533,6 +47553,10 @@ "uri": { "name": "uri", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "format": "uri", "title": "URI", "description": "The URI to the definition of the unit, if applicable", @@ -48360,6 +48384,10 @@ "name": "available", "title": "Available", "type": "number", + "constraints": { + "required": true, + "unique": false + }, "description": "The number of units available as of the last update.", "example": "12" }, @@ -48367,6 +48395,10 @@ "name": "maximum", "title": "Maximum", "type": "number", + "constraints": { + "required": false, + "unique": false + }, "description": "The maximum number of units that can be available for this service, if applicable", "example": "10" }, @@ -48374,6 +48406,10 @@ "name": "description", "title": "Description", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "description": "A Human-Friendly description of this service capacity e.g. \u201cBeds available for people experiencing homelessness\u201d", "example": "Beds available for people experiencing homelessness." }, @@ -48381,6 +48417,10 @@ "name": "updated", "title": "Date Updated", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "format": "date-time", "description": "The datetime when this service_capacit y object was last updated or changed. Should have millisecond accuracy. ", "example": "2024-09-25T14:23:06.5+01:00" diff --git a/schema/compiled/service_at_location.json b/schema/compiled/service_at_location.json index d99d9e7..cfe92b9 100644 --- a/schema/compiled/service_at_location.json +++ b/schema/compiled/service_at_location.json @@ -47459,6 +47459,10 @@ "name": "id", "title": "Identifier", "type": "string", + "constraints": { + "required": true, + "unique": true + }, "format": "uuid", "description": "The identifier for the service_capacity object. Each service_capacity must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -47490,6 +47494,10 @@ "name": "id", "type": "string", "format": "uuid", + "constraints": { + "required": true, + "unique": true + }, "title": "Identifier", "description": "The identifier for the unit object. Each unit must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -47497,6 +47505,10 @@ "name": { "name": "name", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "title": "Name", "description": "The human-readable name for this unit e.g. \u201cBed\u201d or \u201cHours\u201d", "example": "Kilogram" @@ -47504,6 +47516,10 @@ "scheme": { "name": "scheme", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Scheme", "description": "The scheme which formalizes the unit, if applicable e.g. \u201cSI\u201d for Standard International Units such as Kilogram, Litre, etc.", "example": "SI" @@ -47511,6 +47527,10 @@ "identifier": { "name": "identifier", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Unit Identifier", "description": "The identifier of the unit taken from the scheme if applicable e.g. `kgm` for Kilogram.", "example": "kgm" @@ -47518,6 +47538,10 @@ "uri": { "name": "uri", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "format": "uri", "title": "URI", "description": "The URI to the definition of the unit, if applicable", @@ -48345,6 +48369,10 @@ "name": "available", "title": "Available", "type": "number", + "constraints": { + "required": true, + "unique": false + }, "description": "The number of units available as of the last update.", "example": "12" }, @@ -48352,6 +48380,10 @@ "name": "maximum", "title": "Maximum", "type": "number", + "constraints": { + "required": false, + "unique": false + }, "description": "The maximum number of units that can be available for this service, if applicable", "example": "10" }, @@ -48359,6 +48391,10 @@ "name": "description", "title": "Description", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "description": "A Human-Friendly description of this service capacity e.g. \u201cBeds available for people experiencing homelessness\u201d", "example": "Beds available for people experiencing homelessness." }, @@ -48366,6 +48402,10 @@ "name": "updated", "title": "Date Updated", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "format": "date-time", "description": "The datetime when this service_capacit y object was last updated or changed. Should have millisecond accuracy. ", "example": "2024-09-25T14:23:06.5+01:00" diff --git a/schema/compiled/service_at_location_package.json b/schema/compiled/service_at_location_package.json index 2f038d1..591d2ec 100644 --- a/schema/compiled/service_at_location_package.json +++ b/schema/compiled/service_at_location_package.json @@ -47461,6 +47461,10 @@ "name": "id", "title": "Identifier", "type": "string", + "constraints": { + "required": true, + "unique": true + }, "format": "uuid", "description": "The identifier for the service_capacity object. Each service_capacity must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -47492,6 +47496,10 @@ "name": "id", "type": "string", "format": "uuid", + "constraints": { + "required": true, + "unique": true + }, "title": "Identifier", "description": "The identifier for the unit object. Each unit must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -47499,6 +47507,10 @@ "name": { "name": "name", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "title": "Name", "description": "The human-readable name for this unit e.g. \u201cBed\u201d or \u201cHours\u201d", "example": "Kilogram" @@ -47506,6 +47518,10 @@ "scheme": { "name": "scheme", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Scheme", "description": "The scheme which formalizes the unit, if applicable e.g. \u201cSI\u201d for Standard International Units such as Kilogram, Litre, etc.", "example": "SI" @@ -47513,6 +47529,10 @@ "identifier": { "name": "identifier", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Unit Identifier", "description": "The identifier of the unit taken from the scheme if applicable e.g. `kgm` for Kilogram.", "example": "kgm" @@ -47520,6 +47540,10 @@ "uri": { "name": "uri", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "format": "uri", "title": "URI", "description": "The URI to the definition of the unit, if applicable", @@ -48347,6 +48371,10 @@ "name": "available", "title": "Available", "type": "number", + "constraints": { + "required": true, + "unique": false + }, "description": "The number of units available as of the last update.", "example": "12" }, @@ -48354,6 +48382,10 @@ "name": "maximum", "title": "Maximum", "type": "number", + "constraints": { + "required": false, + "unique": false + }, "description": "The maximum number of units that can be available for this service, if applicable", "example": "10" }, @@ -48361,6 +48393,10 @@ "name": "description", "title": "Description", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "description": "A Human-Friendly description of this service capacity e.g. \u201cBeds available for people experiencing homelessness\u201d", "example": "Beds available for people experiencing homelessness." }, @@ -48368,6 +48404,10 @@ "name": "updated", "title": "Date Updated", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "format": "date-time", "description": "The datetime when this service_capacit y object was last updated or changed. Should have millisecond accuracy. ", "example": "2024-09-25T14:23:06.5+01:00" diff --git a/schema/compiled/service_package.json b/schema/compiled/service_package.json index 9e0aacf..fd0161f 100644 --- a/schema/compiled/service_package.json +++ b/schema/compiled/service_package.json @@ -47476,6 +47476,10 @@ "name": "id", "title": "Identifier", "type": "string", + "constraints": { + "required": true, + "unique": true + }, "format": "uuid", "description": "The identifier for the service_capacity object. Each service_capacity must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -47507,6 +47511,10 @@ "name": "id", "type": "string", "format": "uuid", + "constraints": { + "required": true, + "unique": true + }, "title": "Identifier", "description": "The identifier for the unit object. Each unit must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -47514,6 +47522,10 @@ "name": { "name": "name", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "title": "Name", "description": "The human-readable name for this unit e.g. \u201cBed\u201d or \u201cHours\u201d", "example": "Kilogram" @@ -47521,6 +47533,10 @@ "scheme": { "name": "scheme", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Scheme", "description": "The scheme which formalizes the unit, if applicable e.g. \u201cSI\u201d for Standard International Units such as Kilogram, Litre, etc.", "example": "SI" @@ -47528,6 +47544,10 @@ "identifier": { "name": "identifier", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Unit Identifier", "description": "The identifier of the unit taken from the scheme if applicable e.g. `kgm` for Kilogram.", "example": "kgm" @@ -47535,6 +47555,10 @@ "uri": { "name": "uri", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "format": "uri", "title": "URI", "description": "The URI to the definition of the unit, if applicable", @@ -48362,6 +48386,10 @@ "name": "available", "title": "Available", "type": "number", + "constraints": { + "required": true, + "unique": false + }, "description": "The number of units available as of the last update.", "example": "12" }, @@ -48369,6 +48397,10 @@ "name": "maximum", "title": "Maximum", "type": "number", + "constraints": { + "required": false, + "unique": false + }, "description": "The maximum number of units that can be available for this service, if applicable", "example": "10" }, @@ -48376,6 +48408,10 @@ "name": "description", "title": "Description", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "description": "A Human-Friendly description of this service capacity e.g. \u201cBeds available for people experiencing homelessness\u201d", "example": "Beds available for people experiencing homelessness." }, @@ -48383,6 +48419,10 @@ "name": "updated", "title": "Date Updated", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "format": "date-time", "description": "The datetime when this service_capacit y object was last updated or changed. Should have millisecond accuracy. ", "example": "2024-09-25T14:23:06.5+01:00" diff --git a/schema/compiled/service_with_definitions.json b/schema/compiled/service_with_definitions.json index 35a9b7e..9929eaa 100644 --- a/schema/compiled/service_with_definitions.json +++ b/schema/compiled/service_with_definitions.json @@ -3075,110 +3075,6 @@ "description" ] }, - "service_capacity": { - "name": "service_capacity", - "path": "service_capacity.csv", - "description": "The details of service capacities for services.", - "datapackage_metadata": { - "format": "csv", - "mediatype": "text/csv", - "profile": "tabular-data-resource", - "order": 99 - }, - "type": "object", - "properties": { - "id": { - "name": "id", - "title": "Identifier", - "type": "string", - "format": "uuid", - "description": "The identifier for the service_capacity object. Each service_capacity must have a unique identifier.", - "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" - }, - "service_id": { - "name": "service_id", - "title": "Service Identifier", - "type": "string", - "format": "uuid", - "description": "The identifier for the Service object associated with this service capacity object. Only required in the tabular representation.", - "constraints": { - "unique": false - }, - "example": "f75b808e-7bdb-11ef-afaa-ab00a77dc5c4" - }, - "unit": { - "$ref": "#/definitions/unit" - }, - "unit_id": { - "name": "unit_id", - "title": "Unit ID", - "type": "string", - "format": "uuid", - "description": "The identifier for the unit object.", - "constraints": { - "unique": false - }, - "example": "187a37a2-7b40-11ef-9790-dbf7623d4407" - }, - "available": { - "name": "available", - "title": "Available", - "type": "number", - "description": "The number of units available as of the last update.", - "example": "12" - }, - "maximum": { - "name": "maximum", - "title": "Maximum", - "type": "number", - "description": "The maximum number of units that can be available for this service, if applicable", - "example": "10" - }, - "description": { - "name": "description", - "title": "Description", - "type": "string", - "description": "A Human-Friendly description of this service capacity e.g. \u201cBeds available for people experiencing homelessness\u201d", - "example": "Beds available for people experiencing homelessness." - }, - "updated": { - "name": "updated", - "title": "Date Updated", - "type": "string", - "format": "date-time", - "description": "The datetime when this service_capacit y object was last updated or changed. Should have millisecond accuracy. ", - "example": "2024-09-25T14:23:06.5+01:00" - }, - "attributes": { - "name": "attributes", - "type": "array", - "title": "Attributes", - "description": "A link between a service and one or more classifications that describe the nature of the service provided.", - "items": { - "$ref": "#/definitions/attribute" - } - }, - "metadata": { - "name": "metadata", - "type": "array", - "title": "Metadata", - "description": "A record of the changes that have been made to the data in order to maintain provenance information.", - "items": { - "$ref": "#/definitions/metadata" - } - } - }, - "required": [ - "id", - "unit", - "available", - "updated" - ], - "tabular_required": [ - "unit_id", - "service_id" - ] - }, "url": { "name": "url", "path": "url.csv", @@ -3283,6 +3179,10 @@ "name": "id", "type": "string", "format": "uuid", + "constraints": { + "required": true, + "unique": true + }, "title": "Identifier", "description": "The identifier for the unit object. Each unit must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -3290,6 +3190,10 @@ "name": { "name": "name", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "title": "Name", "description": "The human-readable name for this unit e.g. \u201cBed\u201d or \u201cHours\u201d", "example": "Kilogram" @@ -3297,6 +3201,10 @@ "scheme": { "name": "scheme", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Scheme", "description": "The scheme which formalizes the unit, if applicable e.g. \u201cSI\u201d for Standard International Units such as Kilogram, Litre, etc.", "example": "SI" @@ -3304,6 +3212,10 @@ "identifier": { "name": "identifier", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Unit Identifier", "description": "The identifier of the unit taken from the scheme if applicable e.g. `kgm` for Kilogram.", "example": "kgm" @@ -3311,6 +3223,10 @@ "uri": { "name": "uri", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "format": "uri", "title": "URI", "description": "The URI to the definition of the unit, if applicable", @@ -3339,6 +3255,130 @@ "id", "name" ] + }, + "service_capacity": { + "name": "service_capacity", + "path": "service_capacity.csv", + "description": "The details of service capacities for services.", + "datapackage_metadata": { + "format": "csv", + "mediatype": "text/csv", + "profile": "tabular-data-resource", + "order": 99 + }, + "type": "object", + "properties": { + "id": { + "name": "id", + "title": "Identifier", + "type": "string", + "constraints": { + "required": true, + "unique": true + }, + "format": "uuid", + "description": "The identifier for the service_capacity object. Each service_capacity must have a unique identifier.", + "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" + }, + "service_id": { + "name": "service_id", + "title": "Service Identifier", + "type": "string", + "format": "uuid", + "description": "The identifier for the Service object associated with this service capacity object. Only required in the tabular representation.", + "constraints": { + "unique": false + }, + "example": "f75b808e-7bdb-11ef-afaa-ab00a77dc5c4" + }, + "unit": { + "$ref": "#/definitions/unit" + }, + "unit_id": { + "name": "unit_id", + "title": "Unit ID", + "type": "string", + "format": "uuid", + "description": "The identifier for the unit object.", + "constraints": { + "unique": false + }, + "example": "187a37a2-7b40-11ef-9790-dbf7623d4407" + }, + "available": { + "name": "available", + "title": "Available", + "type": "number", + "constraints": { + "required": true, + "unique": false + }, + "description": "The number of units available as of the last update.", + "example": "12" + }, + "maximum": { + "name": "maximum", + "title": "Maximum", + "type": "number", + "constraints": { + "required": false, + "unique": false + }, + "description": "The maximum number of units that can be available for this service, if applicable", + "example": "10" + }, + "description": { + "name": "description", + "title": "Description", + "type": "string", + "constraints": { + "required": false, + "unique": false + }, + "description": "A Human-Friendly description of this service capacity e.g. \u201cBeds available for people experiencing homelessness\u201d", + "example": "Beds available for people experiencing homelessness." + }, + "updated": { + "name": "updated", + "title": "Date Updated", + "type": "string", + "constraints": { + "required": true, + "unique": false + }, + "format": "date-time", + "description": "The datetime when this service_capacit y object was last updated or changed. Should have millisecond accuracy. ", + "example": "2024-09-25T14:23:06.5+01:00" + }, + "attributes": { + "name": "attributes", + "type": "array", + "title": "Attributes", + "description": "A link between a service and one or more classifications that describe the nature of the service provided.", + "items": { + "$ref": "#/definitions/attribute" + } + }, + "metadata": { + "name": "metadata", + "type": "array", + "title": "Metadata", + "description": "A record of the changes that have been made to the data in order to maintain provenance information.", + "items": { + "$ref": "#/definitions/metadata" + } + } + }, + "required": [ + "id", + "unit", + "available", + "updated" + ], + "tabular_required": [ + "unit_id", + "service_id" + ] } } } \ No newline at end of file diff --git a/schema/service_capacity.json b/schema/service_capacity.json index eedb295..c74d045 100644 --- a/schema/service_capacity.json +++ b/schema/service_capacity.json @@ -14,6 +14,10 @@ "name": "id", "title": "Identifier", "type": "string", + "constraints": { + "required": true, + "unique": true + }, "format": "uuid", "description": "The identifier for the service_capacity object. Each service_capacity must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -47,6 +51,10 @@ "name": "available", "title": "Available", "type": "number", + "constraints": { + "required": true, + "unique": false + }, "description": "The number of units available as of the last update.", "example": "12" }, @@ -54,6 +62,10 @@ "name": "maximum", "title": "Maximum", "type": "number", + "constraints": { + "required": false, + "unique": false + }, "description": "The maximum number of units that can be available for this service, if applicable", "example": "10" }, @@ -61,6 +73,10 @@ "name": "description", "title": "Description", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "description": "A Human-Friendly description of this service capacity e.g. “Beds available for people experiencing homelessness”", "example": "Beds available for people experiencing homelessness." }, @@ -68,6 +84,10 @@ "name": "updated", "title": "Date Updated", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "format": "date-time", "description": "The datetime when this service_capacit y object was last updated or changed. Should have millisecond accuracy. ", "example": "2024-09-25T14:23:06.5+01:00" diff --git a/schema/unit.json b/schema/unit.json index 7632caf..bc03ce3 100644 --- a/schema/unit.json +++ b/schema/unit.json @@ -14,6 +14,10 @@ "name": "id", "type": "string", "format": "uuid", + "constraints": { + "required": true, + "unique": true + }, "title": "Identifier", "description": "The identifier for the unit object. Each unit must have a unique identifier.", "example": "8896b788-7b3e-11ef-8db9-7f3d040352b3" @@ -21,6 +25,10 @@ "name": { "name": "name", "type": "string", + "constraints": { + "required": true, + "unique": false + }, "title": "Name", "description": "The human-readable name for this unit e.g. “Bed” or “Hours”", "example": "Kilogram" @@ -28,6 +36,10 @@ "scheme": { "name": "scheme", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Scheme", "description": "The scheme which formalizes the unit, if applicable e.g. “SI” for Standard International Units such as Kilogram, Litre, etc.", "example": "SI" @@ -35,6 +47,10 @@ "identifier": { "name": "identifier", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "title": "Unit Identifier", "description": "The identifier of the unit taken from the scheme if applicable e.g. `kgm` for Kilogram.", "example": "kgm" @@ -42,6 +58,10 @@ "uri": { "name": "uri", "type": "string", + "constraints": { + "required": false, + "unique": false + }, "format": "uri", "title": "URI", "description": "The URI to the definition of the unit, if applicable",