Skip to content

Commit

Permalink
Updated field names; more detail on frontend deprecation process
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielroseman committed May 17, 2017
1 parent 8181d77 commit 760bc33
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions rfc-041-separate-document-type-from-format.md
Expand Up @@ -16,18 +16,14 @@ Currently, specialist documents define a "document type" field in the details ha

We will deprecate the current `format` field, and replace it with two new fields:

- `schema` - determines which file in govuk-content-schemas is used to validate the item.
- `content_type` - used for frontend display and for filtering in publishing apps 

(Question: does the latter actually need to be two separate fields, eg "content\_type" and "display\_content\_type"? Is there a case when they will be different?)
- `schema_name` - determines which file in govuk-content-schemas is used to validate the item.
- `document_type` - used for frontend display and for filtering in publishing apps 

### Migration

We will support both naming types for a period to ease transition, and modify publishing-api to supply missing data where necessary. If only the old `format` field is supplied, its value will be copied to `schema` and `content_type`. If `format` is not supplied, its value will be copied from `schema`. It will be an error to supply only one of `schema` and `content_type`.

All three fields will be supplied to content-store.
We will support both naming types for a period to ease transition, and modify publishing-api to supply missing data where necessary. If only the old `format` field is supplied, its value will be copied to `schema_name` and document`_type`. If `format` is not supplied, its value will be copied from `schema`. It will be an error to supply only one of `schema` and `content_type`.

 
During the deprecation period, all three fields will be supplied to content-store, and both `document_type` and `format` will be passed from there to the frontends. There are only a small number of apps that the `format` field in the frontend; as soon as they is updated to use `document_type`, the deprecated field will be dropped from content-store and the frontend representation, and the schemas updated.

 

Expand Down

0 comments on commit 760bc33

Please sign in to comment.