generated from ioggstream/draft-polli-foo-media-type
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathschemas.oas3.yaml
210 lines (209 loc) · 6.27 KB
/
schemas.oas3.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
#
# ## Welcome!
# Edit the following schema examples in this semantic editor
# based on Swagger Editor.
#
openapi: 3.0.3
components:
schemas:
EducationLevel:
x-jsonld-context:
"@vocab": "https://w3id.org/italia/onto/CPV/"
education_level:
"@id": "hasLevelOfEducation"
"@type": "@id"
"@context":
"@base": "https://w3id.org/italia/controlled-vocabulary/classifications-for-people/education-level/"
type: object
additionalProperties: false
properties:
education_level:
$ref: "https://onto.robertopolli.it/vocabularies/v1/vocabularies-schema/education-level?schema_type=anyOfenum#/SchemaVocabulary"
example:
education_level: NED
Parent:
x-jsonld-context:
"@vocab": "https://w3id.org/italia/onto/CPV/"
parent_id: taxCode
type: object
x-jsonld-type: https://w3id.org/italia/onto/CPV/Person
description: |-
Uno schema semplificato per associare una sola chiave
che identifica un genitore.
additionalProperties: false
required:
- parent_id
properties:
parent_id:
$ref: "#/components/schemas/TaxCode"
BirthPlace:
type: object
additionalProperties: false
required:
- city
- province
- country
x-jsonld-context: &BirthPlaceContext
"@vocab": "https://w3id.org/italia/onto/CLV/"
city: hasCity
country:
"@id": "hasCountry"
"@type": "@id"
"@context":
"@base": "http://publications.europa.eu/resource/authority/country/"
province:
"@id": "hasProvince"
"@type": "@id"
"@context":
"@base": "https://w3id.org/italia/data/identifiers/provinces-identifiers/vehicle-code/"
interno: null
properties:
city:
type: string
description: The city where the person was born.
example: Roma
province:
type: string
description: The province where the person was born.
example: RM
country:
type: string
description: The iso alpha-3 code of the country where the person was born.
example: ITA
postCode:
type: string
description: The post code (zip code)
example: "00100"
interno:
type: string
maxLength: 32
example:
city: Roma
province: RM
country: ITA
postCode: "00100"
interno: "Interno 8"
Person:
type: object
x-jsonld-type: https://w3id.org/italia/onto/CPV/Person
# This custom property defines the associated json-ld
# context that can be used to semantically describe
# the instances.
x-jsonld-context:
"@vocab": "https://w3id.org/italia/onto/CPV/"
RPO: "https://w3id.org/italia/onto/RPO/"
tax_code: taxCode
date_of_birth: dateOfBirth
given_name: givenName
family_name: familyName
education_level:
"@id": hasLevelOfEducation
"@type": "@id"
"@context":
"@base": "https://w3id.org/italia/controlled-vocabulary/classifications-for-people/education-level/"
resident_in:
"@id": "RPO:currentlyHasRegisteredResidenceIn"
"@type": "@id"
"@context":
"@base": "https://w3id.org/italia/onto/RPO/"
birth_place:
"@id": "hasBirthPlace"
"@context":
<<: *BirthPlaceContext
children:
"@id": isParentOf
parents:
"@id": isChildOf
additionalProperties: false
description: |-
Questo schema rappresenta una persona fisica.
required:
- given_name
- family_name
- tax_code
properties:
tax_code:
$ref: "#/components/schemas/TaxCode"
family_name:
maxLength: 255
type: string
given_name:
maxLength: 255
type: string
date_of_birth:
format: date
type: string
education_level:
type: string
maxLength: 3
description: |-
Il livello di istruzione della persona.
I valori ammessi sono indicati nel [vocabolario](https://w3id.org/italia/controlled-vocabulary/classifications-for-people/education-level)
birth_place:
$ref: "#/components/schemas/BirthPlace"
resident_in:
type: string
description: >-
Comune di residenza.
maxLength: 32
children:
type: array
items:
$ref: "#/components/schemas/Person"
minItems: 0
maxItems: 50
parents:
type: array
items:
$ref: "#/components/schemas/Parent"
maxItems: 2
minItems: 0
example:
tax_code: RSSMRA75L01H501A
family_name: Rossi
given_name: Mario
date_of_birth: "1961-01-01"
education_level: "NED"
birth_place:
city: Roma
province: RM
country: ITA
children:
- tax_code: RSSMRA75L01H501A
- tax_code: RSSMRA76L01H501A
- tax_code: RSSMRA77L01H501A
TaxCode:
type: string
# Since jsonld does not support to attach a @context
# to a primitive type, we reference the semantic
# context using `x-jsonld-type.`
x-jsonld-type: https://w3id.org/italia/onto/CPV/taxCode
description: Il codice fiscale.
example: RSSMRA75L01H501A
maxLength: 16
minLength: 11
pattern: >-
[A-Z0-9]{16}
ExportedSchemas:
anyOf:
- $ref: "#/components/schemas/Person"
- $ref: "#/components/schemas/EducationLevel"
paths: {}
servers: []
tags: []
info:
title: A schema collection
version: 202108.01.00
x-summary: A schema collection with CPV ontology.
license:
name: BSD3
url: https://opensource.org/licenses/BSD-3-Clause
termsOfService: https://opensource.org/licenses/BSD-3-Clause
contact:
name: Roberto Polli
email: [email protected]
url: http://spcdata.digitpa.gov.it/Amministrazione/agid
description: |-
## Welcome!
Edit the following schema examples in this semantic editor
based on Swagger Editor.