Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alphagov/govuk-content-schemas
Definitions of the data formats used to represent content on GOV.UK
https://github.com/alphagov/govuk-content-schemas
container govuk
Last synced: 3 months ago
JSON representation
Definitions of the data formats used to represent content on GOV.UK
- Host: GitHub
- URL: https://github.com/alphagov/govuk-content-schemas
- Owner: alphagov
- License: mit
- Archived: true
- Created: 2014-12-02T16:20:33.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2022-11-24T16:09:53.000Z (almost 2 years ago)
- Last Synced: 2024-06-03T07:35:24.746Z (5 months ago)
- Topics: container, govuk
- Language: Jsonnet
- Homepage: https://govuk-content-store-examples.herokuapp.com/
- Size: 17.7 MB
- Stars: 26
- Watchers: 72
- Forks: 11
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GOV.UK content schemas
Content schemas have now been merged into [publishing api](https://github.com/alphagov/publishing-api) so this repository is archived.
## Background
This repo contains [JSON Schema](http://json-schema.org/) files and examples of the content that uses them on GOV.UK.
The actual JSON schema files live in `dist` and are generated from [Jsonnet templates](https://jsonnet.org) in `source`. Using templates makes it easier to duplicate common blocks across multiple schemas e.g. format and URL fields. **Do not edit files in `dist` manually**, as they will be overwritten.
## Nomenclature
Schemas and examples are divided into three categories:
* `publisher_v2` - for when a publishing application transmits data to the content store
* `frontend` - for data returned by the content store for a frontend application request
* `notification` - for broadcasting messages about content items on the message queue## Technical documentation
You can use the [GOV.UK Docker environment](https://github.com/alphagov/govuk-docker) to run the tests with all the necessary dependencies. Follow [the usage instructions](https://github.com/alphagov/govuk-docker#usage) to get started.
**Use GOV.UK Docker to run any commands that follow.**
### Running the tests
Run the full test suite and linting:
```
bundle exec rake
```Run the tests only:
```
bundle exec rake spec
```### Building the schemas
Use this to validate a change to the schemas, without having to run the tests.
```
bundle exec rake build
```### Further documentation
* [How to change an existing content schema](docs/changing-an-existing-content-schema.md)
* [How to add a new content schema](docs/adding-a-new-schema.md)
* [Working with JSON Schema keywords](docs/working-with-json-schema-keywords.md)
* [Contract testing against govuk-content-schemas](docs/contract-testing-against-schemas.md)
* [Running your frontend against the examples and random content (content-store not needed)](docs/running-frontend-against-examples.md)## Licence
[MIT Licence](LICENCE)