diff --git a/schema/schema.json b/schema/schema.json index 9bfb8dc6..8392ee9d 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -2857,14 +2857,7 @@ "description": "Details of the digital planning service which sent the application", "properties": { "flowId": { - "anyOf": [ - { - "$ref": "#/definitions/UUID" - }, - { - "type": "string" - } - ] + "$ref": "#/definitions/UUID" }, "name": { "type": "string" @@ -2891,14 +2884,7 @@ "$ref": "#/definitions/DateTime" }, "id": { - "anyOf": [ - { - "$ref": "#/definitions/UUID" - }, - { - "type": "string" - } - ] + "$ref": "#/definitions/UUID" }, "source": { "const": "PlanX", @@ -17507,9 +17493,12 @@ "type": "string" }, "url": { - "type": "string" + "$ref": "#/definitions/URL" } }, + "required": [ + "text" + ], "type": "object" }, "type": "array" diff --git a/types/schema/Responses.ts b/types/schema/Responses.ts index 604f74e7..dfaa426a 100644 --- a/types/schema/Responses.ts +++ b/types/schema/Responses.ts @@ -1,3 +1,5 @@ +import {URL} from './../utils'; + /** * @id #Responses * @description The ordered list of questions, answers, and their metadata for the application @@ -7,14 +9,14 @@ export type Responses = QuestionAndResponses[]; export interface QuestionMetaData { autoAnswered?: boolean; policyRefs?: Array<{ - url?: string; - text?: string; + text: string; + url?: URL; }>; sectionName?: string; } export interface ResponseMetaData { - flags?: Array; // @todo connect to result/flags enum + flags?: Array; // @todo connect to result/flags enum, is this actually a list? options?: Array | Array; }