This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from cultuurnet/III-4595-models-for-properties
III-4595 Shared models for common property schemas
- Loading branch information
Showing
144 changed files
with
1,620 additions
and
3,039 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"x-internal": true, | ||
"type": "object", | ||
"title": "address.localized", | ||
"description": "An address localized in a single language.", | ||
"properties": { | ||
"addressCountry": { | ||
"type": "string", | ||
"minLength": 1, | ||
"description": "Country code in the ISO-3166 format. For example `BE`.", | ||
"maxLength": 2, | ||
"pattern": "^[A-Z][A-Z]$" | ||
}, | ||
"addressLocality": { | ||
"type": "string", | ||
"minLength": 1, | ||
"pattern": "\\S", | ||
"description": "Municipality of the address in the relevant locale, for example `Brussel` for `nl` or `Bruxelles` for `fr`." | ||
}, | ||
"postalCode": { | ||
"type": "string", | ||
"description": "Postal code of the municipality, for example `1000`. Formatted as a string because some international postal codes use letters.", | ||
"minLength": 1, | ||
"pattern": "\\S" | ||
}, | ||
"streetAddress": { | ||
"type": "string", | ||
"minLength": 1, | ||
"pattern": "\\S", | ||
"description": "Street address in the relevant locale, for example `Wetstraat 1` for `nl` or `Rue de la Loi 1` for `fr`." | ||
} | ||
}, | ||
"required": [ | ||
"addressCountry", | ||
"addressLocality", | ||
"postalCode", | ||
"streetAddress" | ||
], | ||
"examples": [ | ||
{ | ||
"addressCountry": "BE", | ||
"addressLocality": "Brussel", | ||
"postalCode": "1000", | ||
"streetAddress": "Wetstraat 1" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"x-internal": true, | ||
"type": "object", | ||
"title": "address", | ||
"description": "An internationalized address with one or more localized addresses.\n\nImportant: Only add a localized address if it's an official variant!", | ||
"minProperties": 1, | ||
"properties": { | ||
"nl": { | ||
"$ref": "./common-address-localized.json", | ||
"description": "An address in the `nl` (Dutch) language." | ||
}, | ||
"fr": { | ||
"$ref": "./common-address-localized.json", | ||
"description": "An address in the `fr` (French) language." | ||
}, | ||
"de": { | ||
"$ref": "./common-address-localized.json", | ||
"description": "An address in the `de` (German) language." | ||
}, | ||
"en": { | ||
"$ref": "./common-address-localized.json", | ||
"description": "An address in the `en` (English) language." | ||
} | ||
}, | ||
"examples": [ | ||
{ | ||
"nl": { | ||
"addressCountry": "BE", | ||
"addressLocality": "Brussel", | ||
"postalCode": "1000", | ||
"streetAddress": "Wetstraat 1" | ||
}, | ||
"fr": { | ||
"addressCountry": "BE", | ||
"addressLocality": "Bruxelles", | ||
"postalCode": "1000", | ||
"streetAddress": "Rue de la Loi 1" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"x-internal": true, | ||
"title": "bookingAvailability", | ||
"type": "object", | ||
"description": "Indicates whether the there are tickets or reservations available. Currently only contains a `type` that can be `Available` or `Unavailable`, but can later be expanded with more detailed info.", | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"Available", | ||
"Unavailable" | ||
], | ||
"description": "One of two possible types.\n\n- `Available`:Tickets or reservations available\n- `Unavailable`: No more tickets or reservations available." | ||
} | ||
}, | ||
"required": [ | ||
"type" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{ | ||
"x-internal": true, | ||
"title": "bookingInfo", | ||
"type": "object", | ||
"description": "Booking info to buy tickets or reserve a place, containing one or more phone numbers, email addresses, and/or website URLs.", | ||
"properties": { | ||
"phone": { | ||
"type": "string", | ||
"description": "Phone number for booking purposes.", | ||
"minLength": 1, | ||
"pattern": "\\S" | ||
}, | ||
"email": { | ||
"type": "string", | ||
"description": "Email address for booking purposes.", | ||
"format": "email", | ||
"example": "[email protected]" | ||
}, | ||
"url": { | ||
"$ref": "./common-string-uri.json", | ||
"description": "URL to a website for booking purposes." | ||
}, | ||
"urlLabel": { | ||
"type": "object", | ||
"description": "Call-to-action text to show for the link to the booking url", | ||
"minProperties": 1, | ||
"examples": [ | ||
{ | ||
"nl": "Nederlandse tekst", | ||
"fr": "Texte français", | ||
"de": "Deutscher Text", | ||
"en": "English text" | ||
} | ||
], | ||
"properties": { | ||
"nl": { | ||
"type": "string", | ||
"description": "Dutch description", | ||
"example": "Nederlandse beschrijving", | ||
"pattern": "\\S", | ||
"minLength": 1 | ||
}, | ||
"fr": { | ||
"type": "string", | ||
"description": "French description", | ||
"example": "Description français", | ||
"pattern": "\\S", | ||
"minLength": 1 | ||
}, | ||
"de": { | ||
"type": "string", | ||
"description": "German description", | ||
"example": "Deutscher Beschreibung", | ||
"pattern": "\\S", | ||
"minLength": 1 | ||
}, | ||
"en": { | ||
"type": "string", | ||
"description": "English description", | ||
"example": "English description", | ||
"pattern": "\\S", | ||
"minLength": 1 | ||
} | ||
} | ||
}, | ||
"availabilityStarts": { | ||
"description": "The date & time when the booking period starts", | ||
"type": "string", | ||
"format": "date-time", | ||
"example": "2021-05-17T22:00:00+00:00", | ||
"examples": [ | ||
"2021-05-17T22:00:00+00:00" | ||
] | ||
}, | ||
"availabilityEnds": { | ||
"description": "The date & time when the booking period ends", | ||
"type": "string", | ||
"format": "date-time", | ||
"example": "2021-05-17T22:00:00+00:00", | ||
"examples": [ | ||
"2021-05-17T22:00:00+00:00" | ||
] | ||
} | ||
}, | ||
"dependentRequired": { | ||
"url": ["urlLabel"] | ||
}, | ||
"examples": [ | ||
{ | ||
"phone": "+32/01234567890", | ||
"email": "[email protected]", | ||
"url": "https://www.example.com", | ||
"urlLabel": { | ||
"nl": "Nederlandse tekst", | ||
"fr": "Texte français", | ||
"de": "Deutscher Text", | ||
"en": "English text" | ||
}, | ||
"availabilityStarts": "2021-05-17T22:00:00+00:00", | ||
"availabilityEnds": "2021-05-17T22:00:00+00:00" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"title": "contactPoint", | ||
"type": "object", | ||
"description": "Contact info containing one or more phone numbers, email addresses and/or website URLs.", | ||
"properties": { | ||
"phone": { | ||
"type": "array", | ||
"description": "List of phone numbers for contact purposes (can be empty)", | ||
"minItems": 0, | ||
"items": { | ||
"type": "string", | ||
"description": "Phone number for contact purposes.", | ||
"minLength": 1, | ||
"pattern": "\\S" | ||
} | ||
}, | ||
"email": { | ||
"type": "array", | ||
"description": "List of email addresses for contact purposes (can be empty)", | ||
"minItems": 0, | ||
"items": { | ||
"type": "string", | ||
"description": "Email address for contact purposes.", | ||
"format": "email", | ||
"example": "[email protected]" | ||
} | ||
}, | ||
"url": { | ||
"type": "array", | ||
"description": "List of URLs for contact purposes (can be empty)", | ||
"minItems": 0, | ||
"items": { | ||
"$ref": "./common-string-uri.json", | ||
"description": "URL to a website for contact purposes." | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"phone", | ||
"email", | ||
"url" | ||
], | ||
"examples": [ | ||
{ | ||
"phone": [ | ||
"+32/1234567890" | ||
], | ||
"email": [ | ||
"[email protected]" | ||
], | ||
"url": [ | ||
"https://www.example.com" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"title": "contactPoint", | ||
"type": "object", | ||
"description": "Contact info containing one or more phone numbers, email addresses and/or website URLs.", | ||
"properties": { | ||
"phone": { | ||
"type": "array", | ||
"description": "List of phone numbers for contact purposes (can be empty)", | ||
"minItems": 0, | ||
"items": { | ||
"type": "string", | ||
"description": "Phone number for contact purposes.", | ||
"minLength": 1, | ||
"pattern": "\\S" | ||
} | ||
}, | ||
"email": { | ||
"type": "array", | ||
"description": "List of email addresses for contact purposes (can be empty)", | ||
"minItems": 0, | ||
"items": { | ||
"type": "string", | ||
"description": "Email address for contact purposes.", | ||
"format": "email", | ||
"example": "[email protected]" | ||
} | ||
}, | ||
"url": { | ||
"type": "array", | ||
"description": "List of URLs for contact purposes (can be empty)", | ||
"minItems": 0, | ||
"items": { | ||
"$ref": "./common-string-uri.json", | ||
"description": "URL to a website for contact purposes." | ||
} | ||
} | ||
}, | ||
"examples": [ | ||
{ | ||
"phone": [ | ||
"+32/1234567890" | ||
], | ||
"email": [ | ||
"[email protected]" | ||
], | ||
"url": [ | ||
"https://www.example.com" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"x-internal": true, | ||
"title": "coordinates", | ||
"type": "object", | ||
"properties": { | ||
"latitude": { | ||
"type": "number", | ||
"format": "float", | ||
"minimum": -90, | ||
"maximum": 90 | ||
}, | ||
"longitude": { | ||
"type": "number", | ||
"format": "float", | ||
"minimum": -180, | ||
"maximum": 180 | ||
} | ||
}, | ||
"required": [ | ||
"latitude", | ||
"longitude" | ||
], | ||
"readOnly": true, | ||
"examples": [ | ||
{ | ||
"latitude": 50.8816177, | ||
"longitude": 4.7137986 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"x-internal": true, | ||
"title": "copyrightHolder", | ||
"type": "string", | ||
"example": "publiq", | ||
"minLength": 2, | ||
"maxLength": 250, | ||
"pattern": "\\S" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"x-internal": true, | ||
"title": "creator", | ||
"description": "The unique identifier of the user or API client that created the document.", | ||
"examples": [ | ||
"auth0|45c0d021-c78f-445f-adef-be3355b23e4f", | ||
"rLlc90TSFBDRQbZwzP5vm2niDXI1CZef@clients", | ||
"a9363e98-8a24-46a9-ad29-f175d7181138", | ||
"google-oauth2|108326107941662286958", | ||
"[email protected]" | ||
], | ||
"minLength": 1, | ||
"pattern": "\\S", | ||
"readOnly": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"x-internal": true, | ||
"type": "string", | ||
"title": "description.localized", | ||
"description": "A human-readable description localized in a single value.", | ||
"minLength": 1, | ||
"pattern": "\\S", | ||
"examples": [ | ||
"Example description. Lorem ipsum dolor sit amet." | ||
] | ||
} |
Oops, something went wrong.