adiwg-mdjson_schemas 2.0.0.pre.alpha.3 → 2.0.0.pre.alpha.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/address.json +1 -5
- data/examples/contact.json +6 -2
- data/examples/mdJson.json +4 -0
- data/examples/metadataRepository.json +7 -0
- data/lib/adiwg/mdjson_schemas/version.rb +1 -1
- data/schema/contact.json +22 -22
- data/schema/metadataRepository.json +22 -0
- data/schema/schema.json +8 -0
- data/test/tc_metadataRepository.rb +8 -0
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad1c6be709dfa258c73c063aa7ed9671f2cf47b3
|
4
|
+
data.tar.gz: 168b1ce853a75c4f89f91c31ffb9767772226af9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 138a3c4e7d46403e952090c2e96350d77f14cb837c3c830bea0fed4044a9f8bbd2361faef164d31f2aeb0abba22d5151146656368252fb0085bbf6e49f3dbb12
|
7
|
+
data.tar.gz: 5ad98b1028f5fb4c2b18a3a2ffbac0b8938fe45e1efb138669eb54208f89893e8a8c3689b92897bb13ed4cd204b870a28f8f3e91b6382592a69fa737cca29370
|
data/examples/address.json
CHANGED
data/examples/contact.json
CHANGED
@@ -22,10 +22,14 @@
|
|
22
22
|
"service": ["service0", "service1", "service2"]
|
23
23
|
}],
|
24
24
|
"address": [{
|
25
|
-
"
|
25
|
+
"addressType": ["mailing", "physical"]
|
26
26
|
}, {
|
27
|
-
"
|
27
|
+
"addressType": ["mailing", "physical"]
|
28
28
|
}],
|
29
|
+
"electronicMailAddress": [
|
30
|
+
"email0@example.com",
|
31
|
+
"email1@example.com"
|
32
|
+
],
|
29
33
|
"onlineResource": [{
|
30
34
|
"uri": "urn:uri"
|
31
35
|
}, {
|
data/examples/mdJson.json
CHANGED
data/schema/contact.json
CHANGED
@@ -76,6 +76,19 @@
|
|
76
76
|
"$ref": "#/definitions/address"
|
77
77
|
}
|
78
78
|
},
|
79
|
+
"electronicMailAddress": {
|
80
|
+
"type": "array",
|
81
|
+
"description": "E-mail or electronic mailbox address.",
|
82
|
+
"translation": {
|
83
|
+
"ISO 19115-2": ["CI_Address > electronicMailAddress"],
|
84
|
+
"FGDC CSDGM": ["cntinfo > cntemail"]
|
85
|
+
},
|
86
|
+
"items": {
|
87
|
+
"type": "string",
|
88
|
+
"pattern": "^.+@.+\\..+$"
|
89
|
+
},
|
90
|
+
"uniqueItems": true
|
91
|
+
},
|
79
92
|
"onlineResource": {
|
80
93
|
"type": "array",
|
81
94
|
"description": "Information about accessing on-line resources and services. This may be a website, profile page, GitHub page, etc. related to the contact.",
|
@@ -123,7 +136,7 @@
|
|
123
136
|
"definitions": {
|
124
137
|
"phone": {
|
125
138
|
"type": "object",
|
126
|
-
"example":"../examples/phone.json",
|
139
|
+
"example": "../examples/phone.json",
|
127
140
|
"required": ["phoneNumber"],
|
128
141
|
"properties": {
|
129
142
|
"phoneName": {
|
@@ -152,7 +165,7 @@
|
|
152
165
|
},
|
153
166
|
"address": {
|
154
167
|
"type": "object",
|
155
|
-
"example":"../examples/address.json",
|
168
|
+
"example": "../examples/address.json",
|
156
169
|
"description": "Physical and email address at which the organization or individual may be contacted.",
|
157
170
|
"translation": {
|
158
171
|
"ISO 19115-2": [
|
@@ -161,13 +174,13 @@
|
|
161
174
|
"FGDC CSDGM": ["cntinfo > cntaddr"]
|
162
175
|
},
|
163
176
|
"properties": {
|
164
|
-
"addressType":{
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
177
|
+
"addressType": {
|
178
|
+
"type": "array",
|
179
|
+
"description": "The type of address, usually mailing and/or physical.",
|
180
|
+
"translation": {},
|
181
|
+
"items": {
|
182
|
+
"type": "string"
|
183
|
+
}
|
171
184
|
},
|
172
185
|
"deliveryPoint": {
|
173
186
|
"type": "array",
|
@@ -212,19 +225,6 @@
|
|
212
225
|
"ISO 19115-2": ["CI_Address > postalCode"],
|
213
226
|
"FGDC CSDGM": ["cntinfo > cntaddr > postal"]
|
214
227
|
}
|
215
|
-
},
|
216
|
-
"electronicMailAddress": {
|
217
|
-
"type": "array",
|
218
|
-
"description": "E-mail or electronic mailbox address.",
|
219
|
-
"translation": {
|
220
|
-
"ISO 19115-2": ["CI_Address > electronicMailAddress"],
|
221
|
-
"FGDC CSDGM": ["cntinfo > cntemail"]
|
222
|
-
},
|
223
|
-
"items": {
|
224
|
-
"type": "string",
|
225
|
-
"pattern": "^.+@.+\\..+$"
|
226
|
-
},
|
227
|
-
"uniqueItems": true
|
228
228
|
}
|
229
229
|
},
|
230
230
|
"additionalProperties": true
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"id" : "metadataRepository.json#",
|
4
|
+
"type" : "object",
|
5
|
+
"title" : "metadataRepository",
|
6
|
+
"description" : "",
|
7
|
+
"example":"../examples/metadataRepository.json",
|
8
|
+
"required" : ["repository"],
|
9
|
+
"additionalProperties" : true,
|
10
|
+
"properties" : {
|
11
|
+
"repository": {
|
12
|
+
"type" : "string",
|
13
|
+
"description" : "Identifier for the metadata repository to which the metadata record is to be pushed.",
|
14
|
+
"minLength" : 1
|
15
|
+
},
|
16
|
+
"metadataFormat": {
|
17
|
+
"type" : "string",
|
18
|
+
"description" : "Indicates in what format the metadata record should be delivered to the repository.",
|
19
|
+
"minLength" : 1
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
data/schema/schema.json
CHANGED
@@ -36,6 +36,14 @@
|
|
36
36
|
"metadata": {
|
37
37
|
"$ref": "metadata.json"
|
38
38
|
},
|
39
|
+
"metadataRepository": {
|
40
|
+
"type": "array",
|
41
|
+
"description": "Identifies repositories for distribution of the resource metadata.",
|
42
|
+
"uniqueItems": true,
|
43
|
+
"items": {
|
44
|
+
"$ref": "metadataRepository.json"
|
45
|
+
}
|
46
|
+
},
|
39
47
|
"dataDictionary": {
|
40
48
|
"type": "array",
|
41
49
|
"description": "A description of the contents, format and structure of the physical objects in a data resource.",
|
@@ -0,0 +1,8 @@
|
|
1
|
+
require 'helper.rb'
|
2
|
+
|
3
|
+
class TestmetadataRepository < TestHelper
|
4
|
+
def test_MetadataRepository
|
5
|
+
errors = JSON::Validator.fully_validate('metadataRepository.json', @@example + 'metadataRepository.json', strict: @@strict, list: true)
|
6
|
+
assert(errors.empty?, errors.join("\n"))
|
7
|
+
end
|
8
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adiwg-mdjson_schemas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.pre.alpha.
|
4
|
+
version: 2.0.0.pre.alpha.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Bradley, Stan Smith
|
@@ -133,6 +133,7 @@ files:
|
|
133
133
|
- examples/medium.json
|
134
134
|
- examples/metadata.json
|
135
135
|
- examples/metadataInfo.json
|
136
|
+
- examples/metadataRepository.json
|
136
137
|
- examples/onlineResource.json
|
137
138
|
- examples/orderProcess.json
|
138
139
|
- examples/party.json
|
@@ -202,6 +203,7 @@ files:
|
|
202
203
|
- schema/medium.json
|
203
204
|
- schema/metadata.json
|
204
205
|
- schema/metadataInfo.json
|
206
|
+
- schema/metadataRepository.json
|
205
207
|
- schema/onlineResource.json
|
206
208
|
- schema/orderProcess.json
|
207
209
|
- schema/releasability.json
|
@@ -268,6 +270,7 @@ files:
|
|
268
270
|
- test/tc_medium.rb
|
269
271
|
- test/tc_metadata.rb
|
270
272
|
- test/tc_metadataInfo.rb
|
273
|
+
- test/tc_metadataRepository.rb
|
271
274
|
- test/tc_onlineResource.rb
|
272
275
|
- test/tc_orderProcess.rb
|
273
276
|
- test/tc_party.rb
|
@@ -369,6 +372,7 @@ test_files:
|
|
369
372
|
- test/tc_medium.rb
|
370
373
|
- test/tc_metadata.rb
|
371
374
|
- test/tc_metadataInfo.rb
|
375
|
+
- test/tc_metadataRepository.rb
|
372
376
|
- test/tc_onlineResource.rb
|
373
377
|
- test/tc_orderProcess.rb
|
374
378
|
- test/tc_party.rb
|