Skip to content

Commit

Permalink
Add new field to edition links
Browse files Browse the repository at this point in the history
In order for whitehall to publish document collections that contain
taxonomy_topic_email_override in their links, the schema.json needs to
contain the field, not just the links.json

Adding the field to base links and regenerating the schemas only added
it to links.json, so when trying to publish we are seeing schema validation
errors:
'#/links' contains additional properties [\"taxonomy_topic_email_override\"] outside of the schema when none are allowed

Follows original PR: #2440
  • Loading branch information
hannako committed Sep 1, 2023
1 parent 523922f commit 80258b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@
"related_policies": {
"$ref": "#/definitions/guid_list"
},
"taxonomy_topic_email_override": {
"description": "The taxonomy topic that email subscriptions for this document collection should go to - only for document collections converted from specialist topics",
"$ref": "#/definitions/guid_list",
"maxItems": 1
},
"topical_events": {
"$ref": "#/definitions/guid_list"
},
Expand Down
4 changes: 4 additions & 0 deletions content_schemas/formats/document_collection.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
},
edition_links: (import "shared/whitehall_edition_links.jsonnet") + {
documents: "",
taxonomy_topic_email_override: {
description: "The taxonomy topic that email subscriptions for this document collection should go to - only for document collections converted from specialist topics",
maxItems: 1
},
},
links: (import "shared/base_links.jsonnet") + {
government: {
Expand Down

0 comments on commit 80258b6

Please sign in to comment.