Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MHR API add home history schemas. #64

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions src/registry_schemas/schemas/mhr/historyBase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyBase",
"type": "object",
"title": "The MH History View Base Information Schema",
"definitions": {},
"properties": {
"createDateTime": {
"type": "string",
"format": "date-time",
"description": "Generated by the system, the date and time of the registration that created the change."
},
"registrationDescription": {
"type": "string",
"maxLength": 100,
"description": "Description of the registration that created the change."
},
"endDateTime": {
"type": "string",
"format": "date-time",
"description": "Generated by the system, the date and time of the registration that ended the change. Not included if the record is active."
},
"endRegistrationDescription": {
"type": "string",
"maxLength": 100,
"description": "Description of the registration that ended the change. Not included if the record is active."
},
"documentId": {
"type": [ "string", "null" ],
"maxLength": 8,
"minLength": 8,
"description": "Unique registration document ID/number assigned by the Manufactured Home Registry."
},
"documentRegistrationNumber": {
"type": [ "string", "null" ],
"maxLength": 8,
"description": "The document registration number that uniquely identifies a registration."
},
"changeType": {
"type": "string",
"maxLength": 20,
"enum": ["BASE", "ADDED", "DELETED", "MODIFIED"],
"description": "Optional, describes the change to associated information by the registration. One of BASE - initial home registration, ADDED, or DELETED."
},
"attentionReference": {
"type": "string",
"maxLength": 100,
"description": "Conditionally included in a a registration summary if non-empty, the registration document attention or reference information."
},
"affirmByName": {
"type": "string",
"maxLength": 150,
"description": "Conditionally included in a registration summary if non-empty."
},
"ownLand": {
"type": "boolean",
"description": "Conditionally included in a registration summary if non-empty and the registration type is a transfer of ownership. True if the manufactured home is located on land that the owners own or have a registered lease of not less than 3 years."
},
"declaredValue": {
"type": [ "integer", "null" ],
"description": "Conditionally included if non-empty and the registration type is a transfer of ownership. The declared value of the manufactured home as a number. Required for qualified users."
},
"consideration": {
"type": [ "string", "null" ],
"maxLength": 80,
"description": "Conditionally included if non-empty and the registration type is a transfer of ownership. The consideration description or amount in Canadian dollars for the transfer. Required for qualified users."
},
"transferDate": {
"type": [ "string", "null" ],
"format": "date-time",
"description": "Conditionally included if non-empty and the registration type is a transfer of ownership. The date of the transfer execution in the ISO 8601 format YYYY-MM-DDThh:mm:ssTZD. The default value is the date of the request submission. Required for qualified users."
}
},
"required": [
"createDateTime",
"registrationDescription"
]
}
9 changes: 9 additions & 0 deletions src/registry_schemas/schemas/mhr/historyDescription.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyDescription",
"type": "object",
"title": "The MH History View Description Schema",
"definitions": {},
"allOf": [{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyBase" },
{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/description" }]
}
9 changes: 9 additions & 0 deletions src/registry_schemas/schemas/mhr/historyLocation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyLocation",
"type": "object",
"title": "The MH History View Location Schema",
"definitions": {},
"allOf": [{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyBase" },
{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/location" }]
}
9 changes: 9 additions & 0 deletions src/registry_schemas/schemas/mhr/historyNote.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyNote",
"type": "object",
"title": "The MH History View Note Schema",
"definitions": {},
"allOf": [{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyBase" },
{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/note" }]
}
46 changes: 46 additions & 0 deletions src/registry_schemas/schemas/mhr/historyOwner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyOwner",
"type": "object",
"title": "The MH History View Owner Schema",
"definitions": {},
"allOf": [{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyBase" },
{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/owner" }],
"properties": {
"groupId": {
"type": "integer",
"mimimum": 1,
"description": "The active group ID for the owner at the point in time of the registration that added the owner."
},
"groupCount": {
"type": "integer",
"mimimum": 1,
"description": "The number of active owner groups at the point in time of the registration that added the owner."
},
"groupTenancyType": {
"type": "string",
"maxLength": 20,
"description": "Conditionally added if the owner belongs to a tenants in common owner group structure and the type is COMMON. GroupTenancyType represents the tenancy type of the group this owner belongs to."
},
"ownerCount": {
"type": "integer",
"mimimum": 1,
"description": "The number of owners in the owner group that this owner belongs to. The ownerId starts with 1 and represents the owner's relative ID in the group."
},
"interest": {
"type": "string",
"maxLength": 20,
"description": "Describes the group ownership portion as a fraction. Does not apply and may be omitted for the Sole Ownership (SOLE) type."
},
"interestNumerator": {
"type": "integer",
"mimimum": 0,
"description": "Represents the group ownership portion as the numerator of a fraction. Does not apply and may be omitted for the Sole Ownership (SOLE) type."
},
"interestDenominator": {
"type": "integer",
"mimimum": 0,
"description": "Represents the group ownership portion as the denominator of a fraction. Does not apply and may be omitted for the Sole Ownership (SOLE) type."
}
}
}
14 changes: 14 additions & 0 deletions src/registry_schemas/schemas/mhr/historyRegistration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyRegistration",
"type": "object",
"title": "The MH History View Registration Schema",
"definitions": {},
"anyOf": [{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyBase" },
{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/registration" },
{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/adminRegistration" },
{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/noteRegistration" },
{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/exemption" },
{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/transfer" },
{ "$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/permit" }]
}
55 changes: 55 additions & 0 deletions src/registry_schemas/schemas/mhr/homeHistory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/homeHistory",
"type": "object",
"title": "The MHR Manufactured Home History Schema",
"properties": {
"mhrNumber": {
"type": [ "string", "null" ],
"maxLength": 6,
"description": "The MHR Number that uniquely identifies the manufactured home."
},
"statusType": {
"type": [ "string", "null" ],
"maxLength": 20,
"description": "The current status of the home."
},
"registrations": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyRegistration"
}
},
"descriptions": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyDescription"
}
},
"locations": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyLocation"
}
},
"owners": {
"type": "array",
"items": {
"$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyOwner"
}
},
"notes": {
"type": "array",
"items": {
"$ref": "https://bcrs.gov.bc.ca/.well_known/schemas/mhr/historyNote"
}
}
},
"required": [
"registrations"
]
}
2 changes: 1 addition & 1 deletion src/registry_schemas/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
Development release segment: .devN
"""

__version__ = '1.8.10' # pylint: disable=invalid-name
__version__ = '1.8.11' # pylint: disable=invalid-name
Loading