Skip to content

Commit

Permalink
fix: Ownership should include interest plus updated example paylo…
Browse files Browse the repository at this point in the history
…ads (#168)
  • Loading branch information
jessicamcinchak authored May 6, 2024
1 parent 93ccd19 commit 579db95
Show file tree
Hide file tree
Showing 10 changed files with 202 additions and 93 deletions.
9 changes: 4 additions & 5 deletions examples/data/ldcE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,21 @@ export const validLDCE: Schema = {
siteContact: {
role: 'applicant',
},
interest: 'owner.co',
ownership: {
certificate: 'b',
noticeGiven: true,
interest: 'occupier',
owners: [
{
interest: 'owner',
name: 'Matilda Wormwood',
address: {
town: 'Reading',
line1: '9, Library Way',
line2: '',
county: '',
country: '',
country: 'UK',
postcode: 'L1T3R8Y',
},
noticeDate: '1988-04-01',
noticeGiven: true,
},
],
},
Expand Down
3 changes: 1 addition & 2 deletions examples/data/ldcP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ export const validLDCP: Schema = {
siteContact: {
role: 'applicant',
},
interest: 'owner.sole',
ownership: {
certificate: 'a',
interest: 'owner',
},
},
property: {
Expand Down
2 changes: 1 addition & 1 deletion examples/data/listedBuildingConsent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export const validListedBuildingConsent: Schema = {
email: '[email protected]',
phone: '987654321',
},
interest: 'owner.sole',
ownership: {
interest: 'owner.sole',
certificate: 'b',
noticeGiven: true,
agriculturalTenants: true,
Expand Down
6 changes: 5 additions & 1 deletion examples/data/planningPermission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ export const validPlanningPermission: Schema = {
siteContact: {
role: 'proxy',
},
interest: 'owner.sole',
ownership: {
interest: 'owner.sole',
certificate: 'a',
agriculturalTenants: false,
declaration: {
accurate: true,
},
},
agent: {
name: {
Expand Down
9 changes: 4 additions & 5 deletions examples/validLawfulDevelopmentCertificateExisting.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,21 @@
"siteContact": {
"role": "applicant"
},
"interest": "owner.co",
"ownership": {
"certificate": "b",
"noticeGiven": true,
"interest": "occupier",
"owners": [
{
"interest": "owner",
"name": "Matilda Wormwood",
"address": {
"town": "Reading",
"line1": "9, Library Way",
"line2": "",
"county": "",
"country": "",
"country": "UK",
"postcode": "L1T3R8Y"
},
"noticeDate": "1988-04-01"
"noticeGiven": true
}
]
},
Expand Down
3 changes: 1 addition & 2 deletions examples/validLawfulDevelopmentCertificateProposed.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@
"siteContact": {
"role": "applicant"
},
"interest": "owner.sole",
"ownership": {
"certificate": "a"
"interest": "owner"
}
},
"property": {
Expand Down
2 changes: 1 addition & 1 deletion examples/validListedBuildingConsent.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"email": "[email protected]",
"phone": "987654321"
},
"interest": "owner.sole",
"ownership": {
"interest": "owner.sole",
"certificate": "b",
"noticeGiven": true,
"agriculturalTenants": true,
Expand Down
8 changes: 6 additions & 2 deletions examples/validPlanningPermission.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@
"siteContact": {
"role": "proxy"
},
"interest": "owner.sole",
"ownership": {
"certificate": "a"
"interest": "owner.sole",
"certificate": "a",
"agriculturalTenants": false,
"declaration": {
"accurate": true
}
},
"agent": {
"name": {
Expand Down
195 changes: 142 additions & 53 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,6 @@
"email": {
"$ref": "#/definitions/Email"
},
"interest": {
"enum": [
"owner",
"owner.sole",
"owner.co",
"tenant",
"occupier",
"other"
],
"type": "string"
},
"name": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -1774,17 +1763,6 @@
"email": {
"$ref": "#/definitions/Email"
},
"interest": {
"enum": [
"owner",
"owner.sole",
"owner.co",
"tenant",
"occupier",
"other"
],
"type": "string"
},
"name": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -5397,6 +5375,135 @@
],
"description": "Types of natural open spaces"
},
"Owners": {
"$id": "#Owners",
"anyOf": [
{
"$ref": "#/definitions/OwnersNoticeGiven"
},
{
"$ref": "#/definitions/OwnersNoNoticeGiven"
},
{
"$ref": "#/definitions/OwnersNoticeDate"
}
],
"description": "Names and addresses of all known owners and agricultural tenants, including confirmation or date of notice, or reason requisite notice has not been given if applicable"
},
"OwnersNoNoticeGiven": {
"additionalProperties": false,
"properties": {
"address": {
"anyOf": [
{
"$ref": "#/definitions/Address"
},
{
"type": "string"
}
]
},
"interest": {
"enum": [
"owner",
"tenant",
"occupier",
"other"
],
"type": "string"
},
"name": {
"type": "string"
},
"noNoticeReason": {
"type": "string"
},
"noticeGiven": {
"const": false,
"type": "boolean"
}
},
"required": [
"address",
"name",
"noNoticeReason",
"noticeGiven"
],
"type": "object"
},
"OwnersNoticeDate": {
"additionalProperties": false,
"properties": {
"address": {
"anyOf": [
{
"$ref": "#/definitions/Address"
},
{
"type": "string"
}
]
},
"interest": {
"enum": [
"owner",
"tenant",
"occupier",
"other"
],
"type": "string"
},
"name": {
"type": "string"
},
"noticeDate": {
"$ref": "#/definitions/Date"
}
},
"required": [
"address",
"name",
"noticeDate"
],
"type": "object"
},
"OwnersNoticeGiven": {
"additionalProperties": false,
"properties": {
"address": {
"anyOf": [
{
"$ref": "#/definitions/Address"
},
{
"type": "string"
}
]
},
"interest": {
"enum": [
"owner",
"tenant",
"occupier",
"other"
],
"type": "string"
},
"name": {
"type": "string"
},
"noticeGiven": {
"const": true,
"type": "boolean"
}
},
"required": [
"address",
"name",
"noticeGiven"
],
"type": "object"
},
"Ownership": {
"$id": "#Ownership",
"additionalProperties": false,
Expand All @@ -5420,6 +5527,7 @@
"description": "Declaration of the accuracy of the ownership certificate, including reasonable steps taken to find all owners and publish notice",
"properties": {
"accurate": {
"const": true,
"type": "boolean"
}
},
Expand All @@ -5428,6 +5536,17 @@
],
"type": "object"
},
"interest": {
"enum": [
"owner",
"owner.sole",
"owner.co",
"tenant",
"occupier",
"other"
],
"type": "string"
},
"noticeGiven": {
"description": "Has requisite notice been given to all the known owners and agricultural tenants?",
"type": "boolean"
Expand All @@ -5451,36 +5570,9 @@
],
"type": "object"
},
"noticeReason": {
"type": "string"
},
"owners": {
"description": "Names and addresses of all known owners and agricultural tenants",
"items": {
"additionalProperties": false,
"properties": {
"address": {
"anyOf": [
{
"$ref": "#/definitions/Address"
},
{
"type": "string"
}
]
},
"name": {
"type": "string"
},
"noticeDate": {
"$ref": "#/definitions/Date"
}
},
"required": [
"name",
"address"
],
"type": "object"
"$ref": "#/definitions/Owners"
},
"type": "array"
},
Expand All @@ -5494,9 +5586,6 @@
"type": "string"
}
},
"required": [
"certificate"
],
"type": "object"
},
"PlanXMetadata": {
Expand Down
Loading

0 comments on commit 579db95

Please sign in to comment.