Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

III-4595 Shared models for common property schemas #102

Merged
merged 64 commits into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
a05caac
Extract address property schema to shared files
bertramakers Feb 21, 2022
18c8a88
Extract name property schema to shared files
bertramakers Feb 21, 2022
f234fcb
Use shared name schema in organizer-name-put.json
bertramakers Feb 21, 2022
c6d8db7
Use shared name and address schemas in organizer-post-deprecated.json
bertramakers Feb 21, 2022
6cbb556
Add required fields to common-address-localized
bertramakers Feb 21, 2022
190469b
Extract description property schema to shared files
bertramakers Feb 21, 2022
d1b21d4
Extract mainLanguage property schema to shared file
bertramakers Feb 21, 2022
af16268
Fix incorrect $ref
bertramakers Feb 21, 2022
3bd861d
Extract uri format property schemas to shared files
bertramakers Feb 22, 2022
4e2cf43
Make touched schemas for request bodies internal
bertramakers Feb 22, 2022
9376427
Move newsArticle.post examples from properties to object
bertramakers Feb 22, 2022
1b6910b
Fix organizer-reference.json example and format
bertramakers Feb 22, 2022
2b16386
Add example to newsArticle.json
bertramakers Feb 22, 2022
90d3a4b
Fix syntax errors
bertramakers Feb 22, 2022
e0472be
Fix readOnly / required on uri properties
bertramakers Feb 22, 2022
9bbe909
Make sure readOnly: true works for read-only URIs
bertramakers Feb 22, 2022
8de2c3a
Don't make read-only mediaObject/images properties required
bertramakers Feb 22, 2022
d855491
Extract completedLanguages and languages property schemas to shared file
bertramakers Feb 23, 2022
0d83dc7
Reword description to make it clearer that this schema is a legacy fo…
bertramakers Feb 23, 2022
6e08209
Extract contactPoint property schemas to shared files
bertramakers Feb 23, 2022
81cd7ce
Extracted created/modified property schemas to shared files
bertramakers Feb 23, 2022
fb1e5bf
Extract creator property schema to shared file
bertramakers Feb 23, 2022
f57e86b
Extract label properties schemas to shared files
bertramakers Feb 23, 2022
3e0b18f
Use common-uri.json in organizer-mainImage.json
bertramakers Feb 23, 2022
1cae9f9
Extract workflowStatus property schema for offers to shared file
bertramakers Feb 23, 2022
32a3ca9
Remove singular "example" from @id properties
bertramakers Feb 23, 2022
cf0e0eb
Extract availableFrom/To property schemas to shared files
bertramakers Feb 24, 2022
11af605
Extract bookingAvailability property schema to shared file
bertramakers Feb 25, 2022
2c6848b
Extract bookingInfo property schema to shared file
bertramakers Feb 25, 2022
544f18c
Extract startDate/endDate property schema to shared file
bertramakers Feb 25, 2022
2dbf01f
Refactored datetime properties to use datetime / datetime-readOnly sh…
bertramakers Feb 25, 2022
05a0030
Remove empty description
bertramakers Feb 25, 2022
1abac9e
Extract place geo property schema to shared file
bertramakers Feb 25, 2022
08ecfc9
Add organizer geo property
bertramakers Feb 25, 2022
8904c32
Extract mediaObject property schema to shared file
bertramakers Feb 25, 2022
9fd6166
Fix mediaObject copyrightHolder min/maxLength
bertramakers Feb 25, 2022
49300cd
Fix organizer.images property title
bertramakers Feb 25, 2022
5da06a2
Extract organizer images property schema to shared file
bertramakers Feb 25, 2022
395974d
Remove empty examples array
bertramakers Feb 25, 2022
b6d6aae
Extract openingHours property schema to shared file
bertramakers Feb 25, 2022
f82d979
Fix broken link in $ref
bertramakers Mar 1, 2022
8a93d60
Extract priceInfo property schema to shared file
bertramakers Mar 1, 2022
478b495
Also make $.priceInfo[*].name required
bertramakers Mar 1, 2022
02af61c
Use shared priceInfo schema
bertramakers Mar 1, 2022
3cf5a41
Fix other broken $ref
bertramakers Mar 1, 2022
069b952
Only make name required for tariff category
bertramakers Mar 1, 2022
fc7c6dc
Fix priceInfo name property schema
bertramakers Mar 1, 2022
87c82d1
Remove trailing comma
bertramakers Mar 1, 2022
93b885f
Extract sameAs property schema to shared file
bertramakers Mar 1, 2022
74c2413
Extract status property schema to shared file
bertramakers Mar 1, 2022
3384025
Extract typicalAgeRange property schema to shared file
bertramakers Mar 1, 2022
0a589ba
Extracted video schemas to shared files
bertramakers Mar 1, 2022
fada3eb
Re-use common schemas
bertramakers Mar 1, 2022
c54113b
Replace usages of format: uuid
bertramakers Mar 1, 2022
95d1fc4
Small optimizations
bertramakers Mar 1, 2022
0a669e3
Fix broken $ref
bertramakers Mar 1, 2022
76c9af9
Improve place.organizer documentation
bertramakers Mar 1, 2022
0fd361d
Improve event.organizer documentation
bertramakers Mar 1, 2022
90fe6e6
Improve event location to use a reference
bertramakers Mar 1, 2022
92f70e1
Merge branch 'unreleased' into III-4595-models-for-properties
bertramakers Mar 2, 2022
208fbcb
Use existing $refs in place-post-deprecated
bertramakers Mar 2, 2022
424553c
Remove type.label and type.domain in place-post-deprecated.json
bertramakers Mar 2, 2022
7e3a3db
Remove test link to other endpoint from older PR
bertramakers Mar 2, 2022
6579c45
Replace f.e. with e.g.
bertramakers Mar 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions models/common-address-localized.json
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"
}
]
}
41 changes: 41 additions & 0 deletions models/common-address.json
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"
}
}
]
}
19 changes: 19 additions & 0 deletions models/common-bookingAvailability.json
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"
]
}
103 changes: 103 additions & 0 deletions models/common-bookingInfo.json
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"
}
]
}
56 changes: 56 additions & 0 deletions models/common-contactPoint-required.json
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"
]
}
]
}
51 changes: 51 additions & 0 deletions models/common-contactPoint.json
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"
]
}
]
}
30 changes: 30 additions & 0 deletions models/common-coordinates.json
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
}
]
}
9 changes: 9 additions & 0 deletions models/common-copyrightHolder.json
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"
}
15 changes: 15 additions & 0 deletions models/common-creator.json
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
}
11 changes: 11 additions & 0 deletions models/common-description-localized.json
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."
]
}
Loading