Skip to content

Instantly share code, notes, and snippets.

@BolajiAyodeji
Created July 26, 2023 22:18
Show Gist options
  • Save BolajiAyodeji/e9787aef3789f3ca04feee5b2f397657 to your computer and use it in GitHub Desktop.
Save BolajiAyodeji/e9787aef3789f3ca04feee5b2f397657 to your computer and use it in GitHub Desktop.
A sample Contentful content type schema.
{
"name": "Country",
"description": "",
"displayField": "name",
"fields": [
{
"id": "name",
"name": "Name",
"type": "Symbol",
"localized": true,
"required": true,
"validations": [
{
"unique": true
}
],
"disabled": false,
"omitted": false
},
{
"id": "code",
"name": "Code",
"type": "Symbol",
"localized": false,
"required": true,
"validations": [
{
"unique": true
},
{
"size": {
"min": 2,
"max": 2
}
}
],
"disabled": false,
"omitted": false
},
{
"id": "catalog",
"name": "Catalog",
"type": "Link",
"localized": false,
"required": true,
"validations": [
{
"linkContentType": [
"catalog"
]
}
],
"disabled": false,
"omitted": false,
"linkType": "Entry"
},
{
"id": "marketId",
"name": "Market ID",
"type": "Symbol",
"localized": false,
"required": false,
"validations": [],
"disabled": false,
"omitted": false
},
{
"id": "image",
"name": "Image",
"type": "Link",
"localized": false,
"required": false,
"validations": [
{
"linkMimetypeGroup": [
"image"
]
},
{
"assetFileSize": {
"min": null,
"max": 5242880
}
}
],
"disabled": false,
"omitted": false,
"linkType": "Asset"
},
{
"id": "defaultLocale",
"name": "Default Locale",
"type": "Symbol",
"localized": false,
"required": false,
"validations": [],
"disabled": false,
"omitted": false
},
{
"id": "domain",
"name": "Domain",
"type": "Symbol",
"localized": false,
"required": false,
"validations": [],
"disabled": false,
"omitted": false
}
],
"sys": {
"space": {
"sys": {
"type": "Link",
"linkType": "Space",
"id": "5u4unghxyppg"
}
},
"id": "country",
"type": "ContentType",
"createdAt": "2023-05-16T10:59:47.471Z",
"updatedAt": "2023-07-09T12:58:24.548Z",
"environment": {
"sys": {
"id": "master",
"type": "Link",
"linkType": "Environment"
}
},
"publishedVersion": 3,
"publishedAt": "2023-07-09T12:58:24.548Z",
"firstPublishedAt": "2023-05-16T10:59:56.903Z",
"createdBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "3fNf373wzrxwX2fOXTqubM"
}
},
"updatedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "3fNf373wzrxwX2fOXTqubM"
}
},
"publishedCounter": 2,
"version": 4,
"publishedBy": {
"sys": {
"type": "Link",
"linkType": "User",
"id": "3fNf373wzrxwX2fOXTqubM"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment