hdo-storting-importer 0.3.8 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/convert.feature +19 -19
- data/lib/hdo/storting_importer/category.rb +6 -6
- data/lib/hdo/storting_importer/committee.rb +4 -4
- data/lib/hdo/storting_importer/committee_membership.rb +7 -7
- data/lib/hdo/storting_importer/district.rb +4 -4
- data/lib/hdo/storting_importer/governing_period.rb +4 -4
- data/lib/hdo/storting_importer/parliament_issue.rb +6 -6
- data/lib/hdo/storting_importer/parliament_period.rb +6 -6
- data/lib/hdo/storting_importer/parliament_session.rb +7 -7
- data/lib/hdo/storting_importer/party.rb +6 -6
- data/lib/hdo/storting_importer/party_membership.rb +6 -6
- data/lib/hdo/storting_importer/promise.rb +10 -10
- data/lib/hdo/storting_importer/proposition.rb +9 -9
- data/lib/hdo/storting_importer/representative.rb +21 -21
- data/lib/hdo/storting_importer/schema/category.json +2 -2
- data/lib/hdo/storting_importer/schema/committee.json +1 -1
- data/lib/hdo/storting_importer/schema/committee_membership.json +6 -6
- data/lib/hdo/storting_importer/schema/district.json +1 -1
- data/lib/hdo/storting_importer/schema/governing_period.json +5 -5
- data/lib/hdo/storting_importer/schema/parliament_issue.json +6 -6
- data/lib/hdo/storting_importer/schema/parliament_period.json +5 -5
- data/lib/hdo/storting_importer/schema/parliament_session.json +5 -5
- data/lib/hdo/storting_importer/schema/party.json +4 -4
- data/lib/hdo/storting_importer/schema/party_membership.json +6 -6
- data/lib/hdo/storting_importer/schema/promise.json +1 -1
- data/lib/hdo/storting_importer/schema/proposition.json +3 -3
- data/lib/hdo/storting_importer/schema/representative.json +9 -9
- data/lib/hdo/storting_importer/schema/vote.json +4 -4
- data/lib/hdo/storting_importer/version.rb +1 -1
- data/lib/hdo/storting_importer/vote.rb +15 -15
- data/lib/hdo/storting_importer.rb +0 -2
- data/spec/hdo/storting_importer/category_spec.rb +3 -3
- data/spec/hdo/storting_importer/committee_membership_spec.rb +7 -7
- data/spec/hdo/storting_importer/committee_spec.rb +1 -1
- data/spec/hdo/storting_importer/district_spec.rb +1 -1
- data/spec/hdo/storting_importer/governing_period_spec.rb +3 -3
- data/spec/hdo/storting_importer/parliament_issue_spec.rb +4 -4
- data/spec/hdo/storting_importer/parliament_period_spec.rb +5 -5
- data/spec/hdo/storting_importer/parliament_session_spec.rb +5 -5
- data/spec/hdo/storting_importer/party_membership_spec.rb +6 -6
- data/spec/hdo/storting_importer/party_spec.rb +5 -5
- data/spec/hdo/storting_importer/promise_spec.rb +1 -1
- data/spec/hdo/storting_importer/representative_spec.rb +16 -16
- data/spec/hdo/storting_importer/vote_spec.rb +21 -21
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caec1b7f38dd610a7482f789ef4957f3d94e00c7
|
4
|
+
data.tar.gz: f4e44a467ad3c43852b15f2a691c6d2f0300898a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2d4698c08db85f21d58a8986e477f5478caaa1582ec2f057d4f6788950ab1181d00c6f5a78cdb54ab6be3e94361431541629ee133f04f8afd636e29f0a9ac6f
|
7
|
+
data.tar.gz: c59796448cefa43002fc12efc881aaae4e8e6e889c41c003cb8e7a54a7e4374f68ce552bc4018b33f3500546c9e9e279027fff9d3f44d7a75606172e5f2fc6af
|
data/features/convert.feature
CHANGED
@@ -110,97 +110,97 @@ Feature: Import data
|
|
110
110
|
[
|
111
111
|
{
|
112
112
|
"kind": "hdo#district",
|
113
|
-
"
|
113
|
+
"external_id": "AA",
|
114
114
|
"name": "Aust-Agder"
|
115
115
|
},
|
116
116
|
{
|
117
117
|
"kind": "hdo#district",
|
118
|
-
"
|
118
|
+
"external_id": "VA",
|
119
119
|
"name": "Vest-Agder"
|
120
120
|
},
|
121
121
|
{
|
122
122
|
"kind": "hdo#district",
|
123
|
-
"
|
123
|
+
"external_id": "Ak",
|
124
124
|
"name": "Akershus"
|
125
125
|
},
|
126
126
|
{
|
127
127
|
"kind": "hdo#district",
|
128
|
-
"
|
128
|
+
"external_id": "Bu",
|
129
129
|
"name": "Buskerud"
|
130
130
|
},
|
131
131
|
{
|
132
132
|
"kind": "hdo#district",
|
133
|
-
"
|
133
|
+
"external_id": "Fi",
|
134
134
|
"name": "Finnmark"
|
135
135
|
},
|
136
136
|
{
|
137
137
|
"kind": "hdo#district",
|
138
|
-
"
|
138
|
+
"external_id": "He",
|
139
139
|
"name": "Hedmark"
|
140
140
|
},
|
141
141
|
{
|
142
142
|
"kind": "hdo#district",
|
143
|
-
"
|
143
|
+
"external_id": "Ho",
|
144
144
|
"name": "Hordaland"
|
145
145
|
},
|
146
146
|
{
|
147
147
|
"kind": "hdo#district",
|
148
|
-
"
|
148
|
+
"external_id": "MR",
|
149
149
|
"name": "Møre og Romsdal"
|
150
150
|
},
|
151
151
|
{
|
152
152
|
"kind": "hdo#district",
|
153
|
-
"
|
153
|
+
"external_id": "No",
|
154
154
|
"name": "Nordland"
|
155
155
|
},
|
156
156
|
{
|
157
157
|
"kind": "hdo#district",
|
158
|
-
"
|
158
|
+
"external_id": "Op",
|
159
159
|
"name": "Oppland"
|
160
160
|
},
|
161
161
|
{
|
162
162
|
"kind": "hdo#district",
|
163
|
-
"
|
163
|
+
"external_id": "Os",
|
164
164
|
"name": "Oslo"
|
165
165
|
},
|
166
166
|
{
|
167
167
|
"kind": "hdo#district",
|
168
|
-
"
|
168
|
+
"external_id": "Ro",
|
169
169
|
"name": "Rogaland"
|
170
170
|
},
|
171
171
|
{
|
172
172
|
"kind": "hdo#district",
|
173
|
-
"
|
173
|
+
"external_id": "SF",
|
174
174
|
"name": "Sogn og Fjordane"
|
175
175
|
},
|
176
176
|
{
|
177
177
|
"kind": "hdo#district",
|
178
|
-
"
|
178
|
+
"external_id": "Te",
|
179
179
|
"name": "Telemark"
|
180
180
|
},
|
181
181
|
{
|
182
182
|
"kind": "hdo#district",
|
183
|
-
"
|
183
|
+
"external_id": "Tr",
|
184
184
|
"name": "Troms"
|
185
185
|
},
|
186
186
|
{
|
187
187
|
"kind": "hdo#district",
|
188
|
-
"
|
188
|
+
"external_id": "NT",
|
189
189
|
"name": "Nord-Trøndelag"
|
190
190
|
},
|
191
191
|
{
|
192
192
|
"kind": "hdo#district",
|
193
|
-
"
|
193
|
+
"external_id": "ST",
|
194
194
|
"name": "Sør-Trøndelag"
|
195
195
|
},
|
196
196
|
{
|
197
197
|
"kind": "hdo#district",
|
198
|
-
"
|
198
|
+
"external_id": "Ve",
|
199
199
|
"name": "Vestfold"
|
200
200
|
},
|
201
201
|
{
|
202
202
|
"kind": "hdo#district",
|
203
|
-
"
|
203
|
+
"external_id": "Øs",
|
204
204
|
"name": "Østfold"
|
205
205
|
}
|
206
206
|
]
|
@@ -49,8 +49,8 @@ module Hdo
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def self.from_hash(data)
|
52
|
-
obj = new data['
|
53
|
-
obj.children = Array(data['
|
52
|
+
obj = new data['external_id'], data['name']
|
53
|
+
obj.children = Array(data['sub_categories']).map { |e| from_hash(e) }
|
54
54
|
|
55
55
|
obj
|
56
56
|
end
|
@@ -67,12 +67,12 @@ module Hdo
|
|
67
67
|
|
68
68
|
def to_hash
|
69
69
|
h = {
|
70
|
-
'kind'
|
71
|
-
'
|
72
|
-
'name'
|
70
|
+
'kind' => self.class.kind,
|
71
|
+
'external_id' => @external_id,
|
72
|
+
'name' => @name
|
73
73
|
}
|
74
74
|
|
75
|
-
h['
|
75
|
+
h['sub_categories'] = @children.map { |e| e.to_hash } if @children.any?
|
76
76
|
|
77
77
|
h
|
78
78
|
end
|
@@ -31,7 +31,7 @@ module Hdo
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def self.from_hash(hash)
|
34
|
-
new hash['
|
34
|
+
new hash['external_id'], hash['name']
|
35
35
|
end
|
36
36
|
|
37
37
|
def initialize(external_id, name)
|
@@ -41,9 +41,9 @@ module Hdo
|
|
41
41
|
|
42
42
|
def to_hash
|
43
43
|
{
|
44
|
-
'kind'
|
45
|
-
'
|
46
|
-
'name'
|
44
|
+
'kind' => self.class.kind,
|
45
|
+
'external_id' => @external_id,
|
46
|
+
'name' => @name
|
47
47
|
}
|
48
48
|
end
|
49
49
|
|
@@ -20,9 +20,9 @@ module Hdo
|
|
20
20
|
def self.from_hash(hash)
|
21
21
|
binding.pry unless Hash === hash
|
22
22
|
|
23
|
-
new hash['
|
24
|
-
(Date.parse(hash['
|
25
|
-
(Date.parse(hash['
|
23
|
+
new hash['external_id'],
|
24
|
+
(Date.parse(hash['start_date']) if hash['start_date']),
|
25
|
+
(Date.parse(hash['end_date']) if hash['end_date'])
|
26
26
|
end
|
27
27
|
|
28
28
|
attr_reader :external_id, :start_date, :end_date
|
@@ -35,10 +35,10 @@ module Hdo
|
|
35
35
|
|
36
36
|
def to_hash
|
37
37
|
{
|
38
|
-
'kind'
|
39
|
-
'
|
40
|
-
'
|
41
|
-
'
|
38
|
+
'kind' => self.class.kind,
|
39
|
+
'external_id' => external_id,
|
40
|
+
'start_date' => (start_date.strftime("%Y-%m-%d") if start_date),
|
41
|
+
'end_date' => (end_date.strftime("%Y-%m-%d") if end_date)
|
42
42
|
}
|
43
43
|
end
|
44
44
|
|
@@ -31,7 +31,7 @@ module Hdo
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def self.from_hash(hash)
|
34
|
-
new hash['
|
34
|
+
new hash['external_id'], hash['name']
|
35
35
|
end
|
36
36
|
|
37
37
|
def initialize(external_id, name)
|
@@ -41,9 +41,9 @@ module Hdo
|
|
41
41
|
|
42
42
|
def to_hash
|
43
43
|
{
|
44
|
-
'kind'
|
45
|
-
'
|
46
|
-
'name'
|
44
|
+
'kind' => self.class.kind,
|
45
|
+
'external_id' => @external_id,
|
46
|
+
'name' => @name
|
47
47
|
}
|
48
48
|
end
|
49
49
|
|
@@ -32,7 +32,7 @@ module Hdo
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def self.from_hash(hash)
|
35
|
-
new hash['
|
35
|
+
new hash['start_date'], hash['end_date']
|
36
36
|
end
|
37
37
|
|
38
38
|
def initialize(start_date, end_date = nil)
|
@@ -42,9 +42,9 @@ module Hdo
|
|
42
42
|
|
43
43
|
def to_hash
|
44
44
|
{
|
45
|
-
'kind'
|
46
|
-
'
|
47
|
-
'
|
45
|
+
'kind' => self.class.kind,
|
46
|
+
'start_date' => @start_date && @start_date.iso8601,
|
47
|
+
'end_date' => @end_date && @end_date.iso8601
|
48
48
|
}
|
49
49
|
end
|
50
50
|
|
@@ -67,14 +67,14 @@ module Hdo
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def self.from_hash(hash)
|
70
|
-
new hash['
|
70
|
+
new hash['external_id'],
|
71
71
|
hash['summary'],
|
72
72
|
hash['description'],
|
73
73
|
hash['type'],
|
74
74
|
hash['status'],
|
75
|
-
hash['
|
75
|
+
hash['last_update'],
|
76
76
|
hash['reference'],
|
77
|
-
hash['
|
77
|
+
hash['document_group'],
|
78
78
|
hash['committee'],
|
79
79
|
hash['categories']
|
80
80
|
end
|
@@ -100,14 +100,14 @@ module Hdo
|
|
100
100
|
def to_hash
|
101
101
|
{
|
102
102
|
'kind' => self.class.kind,
|
103
|
-
'
|
103
|
+
'external_id' => @external_id,
|
104
104
|
'summary' => @summary,
|
105
105
|
'description' => @description,
|
106
106
|
'type' => @type,
|
107
107
|
'status' => @status,
|
108
|
-
'
|
108
|
+
'last_update' => @last_update,
|
109
109
|
'reference' => @reference,
|
110
|
-
'
|
110
|
+
'document_group' => @document_group,
|
111
111
|
'committee' => @committee,
|
112
112
|
'categories' => @categories
|
113
113
|
}
|
@@ -23,9 +23,9 @@ module Hdo
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def self.from_hash(hash)
|
26
|
-
new hash['
|
27
|
-
hash['
|
28
|
-
hash['
|
26
|
+
new hash['external_id'],
|
27
|
+
hash['start_date'] && Date.parse(hash['start_date']),
|
28
|
+
hash['end_date'] && Date.parse(hash['end_date'])
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.example(overrides = nil)
|
@@ -47,9 +47,9 @@ module Hdo
|
|
47
47
|
def to_hash
|
48
48
|
{
|
49
49
|
'kind' => self.class.kind,
|
50
|
-
'
|
51
|
-
'
|
52
|
-
'
|
50
|
+
'external_id' => @external_id,
|
51
|
+
'start_date' => @start_date && @start_date.iso8601,
|
52
|
+
'end_date' => @end_date && @end_date.iso8601
|
53
53
|
}
|
54
54
|
end
|
55
55
|
|
@@ -23,9 +23,9 @@ module Hdo
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def self.from_hash(hash)
|
26
|
-
new hash['
|
27
|
-
hash['
|
28
|
-
hash['
|
26
|
+
new hash['external_id'],
|
27
|
+
hash['start_date'] && Date.parse(hash['start_date']),
|
28
|
+
hash['end_date'] && Date.parse(hash['end_date'])
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.example(overrides = nil)
|
@@ -46,10 +46,10 @@ module Hdo
|
|
46
46
|
|
47
47
|
def to_hash
|
48
48
|
{
|
49
|
-
'kind'
|
50
|
-
'
|
51
|
-
'
|
52
|
-
'
|
49
|
+
'kind' => self.class.kind,
|
50
|
+
'external_id' => @external_id,
|
51
|
+
'start_date' => @start_date && @start_date.iso8601,
|
52
|
+
'end_date' => @end_date && @end_date.iso8601
|
53
53
|
}
|
54
54
|
end
|
55
55
|
|
@@ -33,10 +33,10 @@ module Hdo
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def self.from_hash(hash)
|
36
|
-
obj = new hash['
|
36
|
+
obj = new hash['external_id'],
|
37
37
|
hash['name']
|
38
38
|
|
39
|
-
obj.governing_periods = Array(hash['
|
39
|
+
obj.governing_periods = Array(hash['governing_periods']).map do |gp|
|
40
40
|
GoverningPeriod.from_hash gp
|
41
41
|
end
|
42
42
|
|
@@ -55,13 +55,13 @@ module Hdo
|
|
55
55
|
|
56
56
|
def to_hash
|
57
57
|
h = {
|
58
|
-
'kind'
|
59
|
-
'
|
60
|
-
'name'
|
58
|
+
'kind' => self.class.kind,
|
59
|
+
'external_id' => @external_id,
|
60
|
+
'name' => @name,
|
61
61
|
}
|
62
62
|
|
63
63
|
if @governing_periods
|
64
|
-
h['
|
64
|
+
h['governing_periods'] = @governing_periods.map { |e| e.to_hash }
|
65
65
|
end
|
66
66
|
|
67
67
|
h
|
@@ -18,9 +18,9 @@ module Hdo
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.from_hash(hash)
|
21
|
-
new hash['
|
22
|
-
(Date.parse(hash['
|
23
|
-
(Date.parse(hash['
|
21
|
+
new hash['external_id'],
|
22
|
+
(Date.parse(hash['start_date']) if hash['start_date']),
|
23
|
+
(Date.parse(hash['end_date']) if hash['end_date'])
|
24
24
|
end
|
25
25
|
|
26
26
|
attr_reader :external_id, :start_date, :end_date
|
@@ -34,9 +34,9 @@ module Hdo
|
|
34
34
|
def to_hash
|
35
35
|
{
|
36
36
|
'kind' => self.class.kind,
|
37
|
-
'
|
38
|
-
'
|
39
|
-
'
|
37
|
+
'external_id' => external_id,
|
38
|
+
'start_date' => (start_date.strftime("%Y-%m-%d") if start_date),
|
39
|
+
'end_date' => (end_date.strftime("%Y-%m-%d") if end_date)
|
40
40
|
}
|
41
41
|
end
|
42
42
|
|
@@ -125,7 +125,7 @@ module Hdo
|
|
125
125
|
end
|
126
126
|
|
127
127
|
def self.from_hash(hash)
|
128
|
-
pr = new hash['
|
128
|
+
pr = new hash['external_id'],
|
129
129
|
hash['parties'],
|
130
130
|
hash['body'],
|
131
131
|
hash['general'],
|
@@ -150,15 +150,15 @@ module Hdo
|
|
150
150
|
|
151
151
|
def to_hash
|
152
152
|
{
|
153
|
-
'kind'
|
154
|
-
'
|
155
|
-
'parties'
|
156
|
-
'general'
|
157
|
-
'categories'
|
158
|
-
'source'
|
159
|
-
'page'
|
160
|
-
'body'
|
161
|
-
'period'
|
153
|
+
'kind' => self.class.kind,
|
154
|
+
'external_id' => @external_id,
|
155
|
+
'parties' => @parties,
|
156
|
+
'general' => @general,
|
157
|
+
'categories' => @categories,
|
158
|
+
'source' => @source,
|
159
|
+
'page' => @page,
|
160
|
+
'body' => @body,
|
161
|
+
'period' => @period
|
162
162
|
}
|
163
163
|
end
|
164
164
|
|
@@ -25,11 +25,11 @@ module Hdo
|
|
25
25
|
|
26
26
|
def self.from_hash(hash)
|
27
27
|
arr = [
|
28
|
-
hash['
|
28
|
+
hash['external_id'],
|
29
29
|
hash['description'],
|
30
|
-
hash['
|
30
|
+
hash['on_behalf_of'],
|
31
31
|
hash['body'],
|
32
|
-
hash['
|
32
|
+
hash['delivered_by'] && Representative.from_hash(hash['delivered_by']),
|
33
33
|
]
|
34
34
|
|
35
35
|
new(*arr)
|
@@ -67,14 +67,14 @@ module Hdo
|
|
67
67
|
|
68
68
|
def to_hash
|
69
69
|
h = {
|
70
|
-
'kind'
|
71
|
-
'
|
72
|
-
'description'
|
73
|
-
'
|
74
|
-
'body'
|
70
|
+
'kind' => self.class.kind,
|
71
|
+
'external_id' => @external_id,
|
72
|
+
'description' => @description,
|
73
|
+
'on_behalf_of' => @on_behalf_of,
|
74
|
+
'body' => @body
|
75
75
|
}
|
76
76
|
|
77
|
-
h['
|
77
|
+
h['delivered_by'] = @delivered_by.to_hash if @delivered_by
|
78
78
|
|
79
79
|
h
|
80
80
|
end
|
@@ -23,8 +23,8 @@ module Hdo
|
|
23
23
|
'1975-07-07T00:00:00',
|
24
24
|
'0001-01-01T00:00:00',
|
25
25
|
'Akershus',
|
26
|
-
[PartyMembership.from_hash("
|
27
|
-
[CommitteeMembership.from_hash('
|
26
|
+
[PartyMembership.from_hash("external_id" => 'H', 'start_date' => '2011-10-01', 'end_date' => nil)],
|
27
|
+
[CommitteeMembership.from_hash('external_id' => 'JUSTIS', 'start_date' => '2011-10-01', 'end_date' => nil)]
|
28
28
|
)
|
29
29
|
|
30
30
|
if overrides
|
@@ -85,18 +85,18 @@ module Hdo
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def self.from_hash(hash)
|
88
|
-
v = new hash['
|
89
|
-
hash['
|
90
|
-
hash['
|
88
|
+
v = new hash['external_id'],
|
89
|
+
hash['first_name'],
|
90
|
+
hash['last_name'],
|
91
91
|
hash['gender'],
|
92
|
-
hash['
|
93
|
-
hash['
|
92
|
+
hash['date_of_birth'],
|
93
|
+
hash['date_of_death'],
|
94
94
|
hash['district'],
|
95
95
|
Array(hash['parties']).map { |e| PartyMembership.from_hash(e) },
|
96
96
|
Array(hash['committees']).map { |e| CommitteeMembership.from_hash(e) }
|
97
97
|
|
98
|
-
v.vote_result = hash['
|
99
|
-
v.permanent_substitute_for = hash['
|
98
|
+
v.vote_result = hash['vote_result']
|
99
|
+
v.permanent_substitute_for = hash['permanent_substitute_for']
|
100
100
|
|
101
101
|
v
|
102
102
|
end
|
@@ -126,20 +126,20 @@ module Hdo
|
|
126
126
|
|
127
127
|
def to_hash
|
128
128
|
h = {
|
129
|
-
'kind'
|
130
|
-
'
|
131
|
-
'
|
132
|
-
'
|
133
|
-
'gender'
|
134
|
-
'
|
135
|
-
'
|
136
|
-
'district'
|
137
|
-
'parties'
|
138
|
-
'committees'
|
129
|
+
'kind' => self.class.kind,
|
130
|
+
'external_id' => @external_id,
|
131
|
+
'first_name' => @first_name,
|
132
|
+
'last_name' => @last_name,
|
133
|
+
'gender' => @gender,
|
134
|
+
'date_of_birth' => @date_of_birth,
|
135
|
+
'date_of_death' => @date_of_death,
|
136
|
+
'district' => @district,
|
137
|
+
'parties' => @parties.map { |e| e.to_hash },
|
138
|
+
'committees' => @committees.map { |e| e.to_hash }
|
139
139
|
}
|
140
140
|
|
141
|
-
h['
|
142
|
-
h['
|
141
|
+
h['vote_result'] = @vote_result if @vote_result
|
142
|
+
h['permanent_substitute_for'] = @permanent_substitute_for if @permanent_substitute_for
|
143
143
|
|
144
144
|
h
|
145
145
|
end
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"default": "hdo#category",
|
10
10
|
"required": true
|
11
11
|
},
|
12
|
-
"
|
12
|
+
"external_id": {
|
13
13
|
"type": "string",
|
14
14
|
"description": "A unique identifier for the category.",
|
15
15
|
"required": true
|
@@ -19,7 +19,7 @@
|
|
19
19
|
"type": "string",
|
20
20
|
"required": true
|
21
21
|
},
|
22
|
-
"
|
22
|
+
"sub_categories": {
|
23
23
|
"description": "A list of subcategories.",
|
24
24
|
"type":"array",
|
25
25
|
"items":{
|
@@ -1,26 +1,26 @@
|
|
1
1
|
{
|
2
|
-
"id": "hdo#
|
2
|
+
"id": "hdo#committee_membership",
|
3
3
|
"description": "a representative's committee associations for the given dates",
|
4
4
|
"type":"object",
|
5
5
|
"properties": {
|
6
6
|
"kind": {
|
7
7
|
"type": "string",
|
8
|
-
"description": "This is always 'hdo#
|
9
|
-
"default": "hdo#
|
8
|
+
"description": "This is always 'hdo#committee_membership'",
|
9
|
+
"default": "hdo#committee_membership",
|
10
10
|
"required": true
|
11
11
|
},
|
12
|
-
"
|
12
|
+
"external_id": {
|
13
13
|
"type": "string",
|
14
14
|
"description": "An ID uniquely identifying the committee (matching externalId of hdo#committee)",
|
15
15
|
"required": true
|
16
16
|
},
|
17
|
-
"
|
17
|
+
"start_date": {
|
18
18
|
"type": "string",
|
19
19
|
"description": "The date the association started.",
|
20
20
|
"format": "date",
|
21
21
|
"required": true
|
22
22
|
},
|
23
|
-
"
|
23
|
+
"end_date": {
|
24
24
|
"type": "string",
|
25
25
|
"description": "The date the association ended. Can be null if the association is current.",
|
26
26
|
"format": "date",
|
@@ -1,21 +1,21 @@
|
|
1
1
|
{
|
2
|
-
"id": "hdo#
|
2
|
+
"id": "hdo#governing_period",
|
3
3
|
"description": "a period where a party is in government",
|
4
4
|
"type":"object",
|
5
5
|
"properties": {
|
6
6
|
"kind": {
|
7
7
|
"type": "string",
|
8
|
-
"description": "This is always 'hdo#
|
9
|
-
"default": "hdo#
|
8
|
+
"description": "This is always 'hdo#governing_period'",
|
9
|
+
"default": "hdo#governing_period",
|
10
10
|
"required": true
|
11
11
|
},
|
12
|
-
"
|
12
|
+
"start_date": {
|
13
13
|
"type": "string",
|
14
14
|
"description": "The date the period started.",
|
15
15
|
"format": "date",
|
16
16
|
"required": true
|
17
17
|
},
|
18
|
-
"
|
18
|
+
"end_date": {
|
19
19
|
"type": "string",
|
20
20
|
"description": "The date the period ended. Can be null if the period is current.",
|
21
21
|
"format": "date",
|