Skip to content

Commit

Permalink
Merge pull request #2750 from alphagov/schema_for_popular_links
Browse files Browse the repository at this point in the history
Schema for popular links
  • Loading branch information
syed-ali-tw authored Jun 4, 2024
2 parents 84b2852 + ea265eb commit c510f46
Show file tree
Hide file tree
Showing 18 changed files with 2,010 additions and 3 deletions.
1 change: 1 addition & 0 deletions content_schemas/allowed_document_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
- licence
- license_finder
- licence_transaction
- link_collection
- local_transaction
- maib_report
- mainstream_browse_page
Expand Down
1 change: 1 addition & 0 deletions content_schemas/dist/formats/generic/frontend/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
"licence",
"license_finder",
"licence_transaction",
"link_collection",
"local_transaction",
"maib_report",
"mainstream_browse_page",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
"licence",
"license_finder",
"licence_transaction",
"link_collection",
"local_transaction",
"maib_report",
"mainstream_browse_page",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
"licence",
"license_finder",
"licence_transaction",
"link_collection",
"local_transaction",
"maib_report",
"mainstream_browse_page",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
"licence",
"license_finder",
"licence_transaction",
"link_collection",
"local_transaction",
"maib_report",
"mainstream_browse_page",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
"licence",
"license_finder",
"licence_transaction",
"link_collection",
"local_transaction",
"maib_report",
"mainstream_browse_page",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
"licence",
"license_finder",
"licence_transaction",
"link_collection",
"local_transaction",
"maib_report",
"mainstream_browse_page",
Expand Down
4 changes: 4 additions & 0 deletions content_schemas/dist/formats/homepage/frontend/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
"description": "A largely deprecated tag currently only used to power email alerts.",
"$ref": "#/definitions/frontend_links_with_base_path"
},
"popular_links": {
"description": "Collection of links to be used to display popular links on homepage",
"$ref": "#/definitions/frontend_links_with_base_path"
},
"related_to_step_navs": {
"description": "Link type automatically added by Publishing API",
"$ref": "#/definitions/frontend_links_with_base_path"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@
"description": "A largely deprecated tag currently only used to power email alerts.",
"$ref": "#/definitions/frontend_links_with_base_path"
},
"popular_links": {
"description": "Collection of links to be used to display popular links on homepage",
"$ref": "#/definitions/frontend_links_with_base_path"
},
"related_to_step_navs": {
"description": "Link type automatically added by Publishing API",
"$ref": "#/definitions/frontend_links_with_base_path"
Expand Down Expand Up @@ -137,6 +141,10 @@
"policy_areas": {
"description": "A largely deprecated tag currently only used to power email alerts.",
"$ref": "#/definitions/guid_list"
},
"popular_links": {
"description": "Collection of links to be used to display popular links on homepage",
"$ref": "#/definitions/guid_list"
}
}
},
Expand Down
21 changes: 19 additions & 2 deletions content_schemas/dist/formats/homepage/publisher_v2/links.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,28 @@
"links": {
"type": "object",
"additionalProperties": false,
"properties": {}
"properties": {
"popular_links": {
"description": "Collection of links to be used to display popular links on homepage",
"$ref": "#/definitions/guid_list"
}
}
},
"previous_version": {
"type": "string"
}
},
"definitions": {}
"definitions": {
"guid": {
"type": "string",
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$"
},
"guid_list": {
"type": "array",
"items": {
"$ref": "#/definitions/guid"
},
"uniqueItems": true
}
}
}
Loading

0 comments on commit c510f46

Please sign in to comment.