openc_bot 0.0.27 → 0.0.46

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. checksums.yaml +5 -13
  2. data/.travis.yml +1 -0
  3. data/Gemfile +2 -0
  4. data/lib/openc_bot.rb +16 -1
  5. data/lib/openc_bot/company_fetcher_bot.rb +50 -0
  6. data/lib/openc_bot/helpers/register_methods.rb +59 -15
  7. data/lib/openc_bot/tasks.rb +15 -2
  8. data/lib/openc_bot/templates/spec/spec_helper.rb +4 -0
  9. data/lib/openc_bot/version.rb +1 -1
  10. data/openc_bot.gemspec +6 -3
  11. data/spec/lib/company_fetcher_bot_spec.rb +23 -0
  12. data/spec/lib/helpers/register_methods_spec.rb +120 -2
  13. data/spec/lib/openc_bot_spec.rb +14 -1
  14. data/spec/simple_openc_bot_spec.rb +1 -0
  15. data/spec/spec_helper.rb +3 -1
  16. metadata +43 -220
  17. data/schemas/.gitignore +0 -13
  18. data/schemas/.travis.yml +0 -5
  19. data/schemas/Gemfile +0 -9
  20. data/schemas/README.md +0 -2
  21. data/schemas/Rakefile +0 -46
  22. data/schemas/lib/base-statement.json +0 -22
  23. data/schemas/lib/snippets/financial-payment-base.json +0 -4
  24. data/schemas/lib/snippets/licence-base.json +0 -4
  25. data/schemas/schemas/company-schema.json +0 -183
  26. data/schemas/schemas/financial-payment-schema.json +0 -27
  27. data/schemas/schemas/includes/address.json +0 -23
  28. data/schemas/schemas/includes/alternative_name.json +0 -13
  29. data/schemas/schemas/includes/company.json +0 -16
  30. data/schemas/schemas/includes/filing.json +0 -20
  31. data/schemas/schemas/includes/financial-payment-data-object.json +0 -60
  32. data/schemas/schemas/includes/industry_code.json +0 -16
  33. data/schemas/schemas/includes/licence-data-object.json +0 -36
  34. data/schemas/schemas/includes/officer.json +0 -50
  35. data/schemas/schemas/includes/previous_name.json +0 -14
  36. data/schemas/schemas/includes/share-parcel-data.json +0 -67
  37. data/schemas/schemas/includes/share-parcel.json +0 -63
  38. data/schemas/schemas/includes/subsidiary-relationship-data.json +0 -47
  39. data/schemas/schemas/includes/total-shares.json +0 -10
  40. data/schemas/schemas/licence-schema.json +0 -27
  41. data/schemas/schemas/primary-data-schema.json +0 -17
  42. data/schemas/schemas/share-parcel-schema.json +0 -21
  43. data/schemas/schemas/simple-financial-payment-schema.json +0 -85
  44. data/schemas/schemas/simple-licence-schema.json +0 -59
  45. data/schemas/schemas/simple-subsidiary-schema.json +0 -68
  46. data/schemas/schemas/subsidiary-relationship-schema.json +0 -27
  47. data/schemas/spec/sample-data/invalid/company-01.json +0 -4
  48. data/schemas/spec/sample-data/invalid/company-02.json +0 -5
  49. data/schemas/spec/sample-data/invalid/company-03.json +0 -5
  50. data/schemas/spec/sample-data/invalid/company-04.json +0 -5
  51. data/schemas/spec/sample-data/invalid/company-05.json +0 -5
  52. data/schemas/spec/sample-data/invalid/company-06.json +0 -6
  53. data/schemas/spec/sample-data/invalid/company-07.json +0 -8
  54. data/schemas/spec/sample-data/invalid/company-08.json +0 -7
  55. data/schemas/spec/sample-data/invalid/company-09.json +0 -9
  56. data/schemas/spec/sample-data/invalid/company-10.json +0 -7
  57. data/schemas/spec/sample-data/invalid/company-11.json +0 -9
  58. data/schemas/spec/sample-data/invalid/company-12.json +0 -11
  59. data/schemas/spec/sample-data/invalid/company-13.json +0 -11
  60. data/schemas/spec/sample-data/invalid/company-14.json +0 -7
  61. data/schemas/spec/sample-data/invalid/company-15.json +0 -7
  62. data/schemas/spec/sample-data/invalid/company-16.json +0 -7
  63. data/schemas/spec/sample-data/invalid/company-17.json +0 -9
  64. data/schemas/spec/sample-data/invalid/company-18.json +0 -9
  65. data/schemas/spec/sample-data/invalid/company-19.json +0 -9
  66. data/schemas/spec/sample-data/invalid/company-20.json +0 -9
  67. data/schemas/spec/sample-data/invalid/company-21.json +0 -11
  68. data/schemas/spec/sample-data/invalid/company-22.json +0 -11
  69. data/schemas/spec/sample-data/invalid/company-23.json +0 -7
  70. data/schemas/spec/sample-data/invalid/company-24.json +0 -12
  71. data/schemas/spec/sample-data/invalid/company-25.json +0 -9
  72. data/schemas/spec/sample-data/invalid/company-26.json +0 -11
  73. data/schemas/spec/sample-data/invalid/company-27.json +0 -7
  74. data/schemas/spec/sample-data/invalid/company-28.json +0 -9
  75. data/schemas/spec/sample-data/invalid/company-29.json +0 -12
  76. data/schemas/spec/sample-data/invalid/company-30.json +0 -16
  77. data/schemas/spec/sample-data/invalid/company-31.json +0 -14
  78. data/schemas/spec/sample-data/invalid/company-32.json +0 -11
  79. data/schemas/spec/sample-data/invalid/company-33.json +0 -7
  80. data/schemas/spec/sample-data/invalid/company-34.json +0 -9
  81. data/schemas/spec/sample-data/invalid/company-35.json +0 -9
  82. data/schemas/spec/sample-data/invalid/company-36.json +0 -10
  83. data/schemas/spec/sample-data/invalid/company-37.json +0 -7
  84. data/schemas/spec/sample-data/invalid/company-38.json +0 -9
  85. data/schemas/spec/sample-data/invalid/company-39.json +0 -11
  86. data/schemas/spec/sample-data/invalid/company-40.json +0 -12
  87. data/schemas/spec/sample-data/invalid/company-41.json +0 -12
  88. data/schemas/spec/sample-data/invalid/company-42.json +0 -7
  89. data/schemas/spec/sample-data/invalid/company-43.json +0 -9
  90. data/schemas/spec/sample-data/invalid/company-44.json +0 -11
  91. data/schemas/spec/sample-data/invalid/company-45.json +0 -11
  92. data/schemas/spec/sample-data/invalid/company-46.json +0 -7
  93. data/schemas/spec/sample-data/invalid/company-47.json +0 -9
  94. data/schemas/spec/sample-data/invalid/company-48.json +0 -9
  95. data/schemas/spec/sample-data/invalid/company-49.json +0 -9
  96. data/schemas/spec/sample-data/invalid/company-50.json +0 -9
  97. data/schemas/spec/sample-data/invalid/company-51.json +0 -9
  98. data/schemas/spec/sample-data/invalid/company-52.json +0 -9
  99. data/schemas/spec/sample-data/invalid/company-53.json +0 -10
  100. data/schemas/spec/sample-data/invalid/company-54.json +0 -9
  101. data/schemas/spec/sample-data/invalid/company-55.json +0 -9
  102. data/schemas/spec/sample-data/invalid/company-56.json +0 -7
  103. data/schemas/spec/sample-data/invalid/company-57.json +0 -7
  104. data/schemas/spec/sample-data/invalid/company-58.json +0 -7
  105. data/schemas/spec/sample-data/invalid/company-59.json +0 -13
  106. data/schemas/spec/sample-data/invalid/company-60.json +0 -7
  107. data/schemas/spec/sample-data/invalid/company-61.json +0 -7
  108. data/schemas/spec/sample-data/invalid/company-62.json +0 -9
  109. data/schemas/spec/sample-data/invalid/company-63.json +0 -12
  110. data/schemas/spec/sample-data/invalid/company-64.json +0 -14
  111. data/schemas/spec/sample-data/invalid/company-65.json +0 -14
  112. data/schemas/spec/sample-data/invalid/company-66.json +0 -13
  113. data/schemas/spec/sample-data/invalid/company-67.json +0 -14
  114. data/schemas/spec/sample-data/invalid/company-68.json +0 -12
  115. data/schemas/spec/sample-data/invalid/company-69.json +0 -12
  116. data/schemas/spec/sample-data/invalid/company-70.json +0 -14
  117. data/schemas/spec/sample-data/invalid/financial-payment-01.json +0 -24
  118. data/schemas/spec/sample-data/invalid/licence-01.json +0 -18
  119. data/schemas/spec/sample-data/invalid/licence-02.json +0 -18
  120. data/schemas/spec/sample-data/invalid/licence-03.json +0 -12
  121. data/schemas/spec/sample-data/invalid/licence-04.json +0 -18
  122. data/schemas/spec/sample-data/invalid/licence-05.json +0 -18
  123. data/schemas/spec/sample-data/invalid/licence-06.json +0 -18
  124. data/schemas/spec/sample-data/invalid/licence-07.json +0 -20
  125. data/schemas/spec/sample-data/invalid/licence-08.json +0 -21
  126. data/schemas/spec/sample-data/invalid/primary-data-01.json +0 -4
  127. data/schemas/spec/sample-data/invalid/primary-data-02.json +0 -4
  128. data/schemas/spec/sample-data/invalid/simple-licence-01.json +0 -9
  129. data/schemas/spec/sample-data/invalid/simple-licence-02.json +0 -8
  130. data/schemas/spec/sample-data/invalid/simple-licence-03.json +0 -9
  131. data/schemas/spec/sample-data/invalid/simple-licence-04.json +0 -10
  132. data/schemas/spec/sample-data/invalid/simple-licence-05.json +0 -10
  133. data/schemas/spec/sample-data/invalid/simple-licence-06.json +0 -10
  134. data/schemas/spec/sample-data/invalid/simple-subsidiary-01.json +0 -13
  135. data/schemas/spec/sample-data/invalid/simple-subsidiary-02.json +0 -13
  136. data/schemas/spec/sample-data/licence-schema.json.old +0 -21
  137. data/schemas/spec/sample-data/valid/company-01.json +0 -6
  138. data/schemas/spec/sample-data/valid/company-02.json +0 -7
  139. data/schemas/spec/sample-data/valid/company-03.json +0 -8
  140. data/schemas/spec/sample-data/valid/company-04.json +0 -7
  141. data/schemas/spec/sample-data/valid/company-05.json +0 -7
  142. data/schemas/spec/sample-data/valid/company-06.json +0 -12
  143. data/schemas/spec/sample-data/valid/company-07.json +0 -9
  144. data/schemas/spec/sample-data/valid/company-08.json +0 -9
  145. data/schemas/spec/sample-data/valid/company-09.json +0 -20
  146. data/schemas/spec/sample-data/valid/company-10.json +0 -9
  147. data/schemas/spec/sample-data/valid/company-11.json +0 -7
  148. data/schemas/spec/sample-data/valid/company-12.json +0 -7
  149. data/schemas/spec/sample-data/valid/company-13.json +0 -7
  150. data/schemas/spec/sample-data/valid/company-14.json +0 -15
  151. data/schemas/spec/sample-data/valid/company-15.json +0 -8
  152. data/schemas/spec/sample-data/valid/company-16.json +0 -9
  153. data/schemas/spec/sample-data/valid/company-17.json +0 -9
  154. data/schemas/spec/sample-data/valid/company-18.json +0 -9
  155. data/schemas/spec/sample-data/valid/company-19.json +0 -37
  156. data/schemas/spec/sample-data/valid/company-20.json +0 -9
  157. data/schemas/spec/sample-data/valid/company-21.json +0 -26
  158. data/schemas/spec/sample-data/valid/company-22.json +0 -20
  159. data/schemas/spec/sample-data/valid/company-23.json +0 -9
  160. data/schemas/spec/sample-data/valid/company-24.json +0 -12
  161. data/schemas/spec/sample-data/valid/company-25.json +0 -12
  162. data/schemas/spec/sample-data/valid/company-26.json +0 -12
  163. data/schemas/spec/sample-data/valid/company-27.json +0 -28
  164. data/schemas/spec/sample-data/valid/company-28.json +0 -9
  165. data/schemas/spec/sample-data/valid/company-29.json +0 -10
  166. data/schemas/spec/sample-data/valid/company-30.json +0 -9
  167. data/schemas/spec/sample-data/valid/company-31.json +0 -17
  168. data/schemas/spec/sample-data/valid/company-32.json +0 -9
  169. data/schemas/spec/sample-data/valid/company-33.json +0 -29
  170. data/schemas/spec/sample-data/valid/company-34.json +0 -9
  171. data/schemas/spec/sample-data/valid/company-35.json +0 -9
  172. data/schemas/spec/sample-data/valid/company-36.json +0 -9
  173. data/schemas/spec/sample-data/valid/company-37.json +0 -9
  174. data/schemas/spec/sample-data/valid/company-38.json +0 -9
  175. data/schemas/spec/sample-data/valid/company-39.json +0 -9
  176. data/schemas/spec/sample-data/valid/company-40.json +0 -9
  177. data/schemas/spec/sample-data/valid/company-41.json +0 -9
  178. data/schemas/spec/sample-data/valid/company-42.json +0 -10
  179. data/schemas/spec/sample-data/valid/company-43.json +0 -7
  180. data/schemas/spec/sample-data/valid/company-44.json +0 -7
  181. data/schemas/spec/sample-data/valid/company-45.json +0 -23
  182. data/schemas/spec/sample-data/valid/company-46.json +0 -7
  183. data/schemas/spec/sample-data/valid/company-47.json +0 -12
  184. data/schemas/spec/sample-data/valid/company-48.json +0 -7
  185. data/schemas/spec/sample-data/valid/company-49.json +0 -14
  186. data/schemas/spec/sample-data/valid/company-50.json +0 -13
  187. data/schemas/spec/sample-data/valid/company-51.json +0 -14
  188. data/schemas/spec/sample-data/valid/company-52.json +0 -12
  189. data/schemas/spec/sample-data/valid/company-53.json +0 -9
  190. data/schemas/spec/sample-data/valid/financial-payment-01.json +0 -25
  191. data/schemas/spec/sample-data/valid/financial-payment-02.json +0 -29
  192. data/schemas/spec/sample-data/valid/licence-01.json +0 -19
  193. data/schemas/spec/sample-data/valid/licence-02.json +0 -21
  194. data/schemas/spec/sample-data/valid/licence-03.json +0 -21
  195. data/schemas/spec/sample-data/valid/licence-04.json +0 -26
  196. data/schemas/spec/sample-data/valid/primary-data-01.json +0 -4
  197. data/schemas/spec/sample-data/valid/primary-data-02.json +0 -5
  198. data/schemas/spec/sample-data/valid/simple-licence-01.json +0 -10
  199. data/schemas/spec/sample-data/valid/simple-licence-02.json +0 -10
  200. data/schemas/spec/sample-data/valid/simple-licence-03.json +0 -12
  201. data/schemas/spec/sample-data/valid/simple-subsidiary-01.json +0 -13
  202. data/schemas/spec/sample-data/valid/simple-subsidiary-02.json +0 -13
  203. data/schemas/spec/sample-data/valid/subsidiary-relationship-01.json +0 -23
  204. data/schemas/spec/spec_helper.rb +0 -78
  205. data/schemas/spec/validation_spec.rb +0 -39
@@ -1,16 +0,0 @@
1
- {
2
- "name": "IndustryCode",
3
- "description": "An industry code from a standard code list (e.g. NAICS 2007 or NACE 2)",
4
- "type": "object",
5
- "properties": { "name": { "type": "string" },
6
- "code": { "type": "string" },
7
- "code_scheme_id": {
8
- "type": "string",
9
- "description": "An identifier representing industry code scheme. At the moment these are eu_nace_2, uk_sic_2003, uk_sic_2007, us_naics_2002, us_naics_2007, be_nace_2008, dk_db_2007, nz_bic_2006, no_sic_2007, anz_sic_2006, nz_bic_2006, in_nic_2004_mca, ca_qc_cae, lu_nace_2. For other code schemes, or details of these, contact info@opencorporates.com"
10
- },
11
- "start_date": {"type":"string","format": "date"},
12
- "end_date": {"type":"string","format": "date"}
13
- },
14
- "required": [ "code", "code_scheme_id" ]
15
- }
16
-
@@ -1,36 +0,0 @@
1
- {
2
- "name": "Licence Data",
3
- "type": "object",
4
- "properties": {
5
- "data_type": { "enum": [ "licence" ] },
6
- "source_url": {
7
- "type": "string"},
8
- "confidence": {
9
- "type": "string"},
10
- "properties": {
11
- "type": "object",
12
- "properties": {
13
- "regulator": {
14
- "description": "The regulating body that issued the licence",
15
- "type": "string"},
16
- "category": {
17
- "description": "The category of licence. Current possible values are: 'Financial','Business'",
18
- "enum": [ "Financial", "Business" ]},
19
- "jurisdiction_code": {
20
- "description": "The jurisdiction for which licence was issued",
21
- "type": "string"},
22
- "licence_number": {
23
- "description": "Licence number or code (can be null)",
24
- "type": ["string",null]},
25
- "jurisdiction_classification": {
26
- "type": "array",
27
- "description": "The local classification given by the regulator",
28
- "minItems": 1},
29
- "oc_classification": {
30
- "type": "array"}
31
- },
32
- "required": [ "jurisdiction_code", "jurisdiction_classification", "category" ]
33
- }
34
- },
35
- "required": [ "data_type", "properties","source_url","confidence" ]
36
- }
@@ -1,50 +0,0 @@
1
- {
2
- "name": "Officer",
3
- "description": "An officer (director, senior executive) of a company",
4
- "type": "object",
5
- "properties": { "name": { "type": "string", "minLength": 1 },
6
- "start_date": {
7
- "anyOf": [
8
- {"type":"string","format": "date"},
9
- {"type":"null"}
10
- ]
11
- },
12
- "end_date": {
13
- "anyOf": [
14
- {"type":"string","format": "date"},
15
- {"type":"null"}
16
- ]
17
- },
18
- "position": { "type": "string" },
19
- "other_attributes": {
20
- "type": "object",
21
- "properties": {
22
- "date_of_birth": {
23
- "type": "string",
24
- "format": "date"
25
- },
26
- "nationality": {
27
- "type": "string"
28
- },
29
- "person_uid": {
30
- "type": "string",
31
- "description": "a unique identifier given to the individual (as opposed to the officership)"
32
- },
33
- "address": {
34
- "type": "string"
35
- },
36
- "type": {
37
- "type": "string",
38
- "enum": ["Person", "Company"],
39
- "description": "The type of entity that is the officer (either 'Person' or 'Company')"
40
- }
41
- }
42
- },
43
- "uid": {
44
- "type": "string",
45
- "description": "a unique identifier given to the officership"
46
- }
47
- },
48
- "required": [ "name" ]
49
- }
50
-
@@ -1,14 +0,0 @@
1
- {
2
- "name": "PreviousName",
3
- "description": "A previous name of a company",
4
- "type": "object",
5
- "properties": { "company_name": { "type": "string", "minLength": 1 },
6
- "con_date": {
7
- "type": "date",
8
- "description": "The end (conversion) date of the name"
9
- },
10
- "start_date": {"type":"string","format": "date"}
11
- },
12
- "required": [ "company_name" ]
13
- }
14
-
@@ -1,67 +0,0 @@
1
- {
2
- "name": "Share Parcel Data",
3
- "type": "object",
4
- "properties": {
5
- "data_type": { "enum": [ "share_parcel" ] },
6
- "properties": {
7
- "type": "object",
8
- "required": ["shareholders"],
9
- "properties": {
10
- "number_of_shares": {
11
- "description": "Number of shares, if known",
12
- "type": "integer"},
13
- "percentage_of_shares": {
14
- "description": "Percentage of shares, if known",
15
- "type": "number",
16
- "maximum": 100,
17
- "minimum": 0
18
- },
19
- "shareholders": {
20
- "description": "Legal persons who own this share parcel",
21
- "type": "array",
22
- "minItems": 1,
23
- "items": {
24
- "anyOf": [
25
- {"type": "object",
26
- "name": "person",
27
- "required": ["name"],
28
- "properties": {
29
- "name": {
30
- "description": "Name of natural person or company",
31
- "type": "string"
32
- },
33
- "jurisdiction": {
34
- "description": "Jurisdiction of registration, if company",
35
- "type": "string"
36
- },
37
- "company_number": {
38
- "description": "Company number, if company and known",
39
- "type": "string"
40
- },
41
- "identifier": {
42
- "description": "Unique identifier of person",
43
- "type": "string"
44
- },
45
- "type": {
46
- "description": "Type of person if known (company or natural person)",
47
- "enum" : ["Company", "Person"]
48
- },
49
- "address": {
50
- "description": "Address given for owner of parcel",
51
- "type": "string"
52
- },
53
- "address_country": {
54
- "description": "Country part of owner's address",
55
- "type": "string"
56
- }
57
-
58
- }
59
- }
60
- ]
61
- }
62
- }
63
- }
64
- }
65
- },
66
- "required": [ "data_type", "properties" ]
67
- }
@@ -1,63 +0,0 @@
1
- {
2
- "name": "Share Parcel",
3
- "type": "object",
4
- "description": "A parcel of shares in a company",
5
- "required": ["shareholders"],
6
- "properties": {
7
- "number_of_shares": {
8
- "description": "Number of shares, if known",
9
- "type": "integer"},
10
- "percentage_of_shares": {
11
- "description": "Percentage of shares, if known",
12
- "type": "number",
13
- "maximum": 100,
14
- "minimum": 0
15
- },
16
- "start_date": {"type":"string","format": "date"},
17
- "end_date": {"type":"string","format": "date"},
18
- "sample_date": {"type":"string","format": "date"},
19
- "shareholders": {
20
- "description": "Legal persons who own this share parcel",
21
- "type": "array",
22
- "minItems": 1,
23
- "items": {
24
- "type": "object",
25
- "name": "shareholder",
26
- "required": ["name"],
27
- "properties": {
28
- "name": {
29
- "description": "Name of natural person or company",
30
- "type": "string",
31
- "minLength": 1
32
- },
33
- "jurisdiction": {
34
- "description": "Jurisdiction of registration, if company",
35
- "type": "string"
36
- },
37
- "company_number": {
38
- "description": "Company number, if company and known",
39
- "type": "string"
40
- },
41
- "identifier": {
42
- "description": "Unique identifier of person",
43
- "type": "string"
44
- },
45
- "type": {
46
- "description": "Type of person if known (company or natural person)",
47
- "enum" : ["Company", "Person"]
48
- },
49
- "address": {
50
- "description": "Address given for owner of parcel",
51
- "type": "string"
52
- },
53
- "address_country": {
54
- "description": "Country part of owner's address",
55
- "type": "string"
56
- }
57
-
58
- }
59
- }
60
- }
61
- },
62
- "required": [ ]
63
- }
@@ -1,47 +0,0 @@
1
- {
2
- "name": "Share Parcel Data",
3
- "type": "object",
4
- "properties": {
5
- "data_type": { "enum": [ "subsidiary_relationship" ] },
6
- "properties": {
7
- "type": "object",
8
- "required": ["subsidiary"],
9
- "additionalProperties": false,
10
- "properties": {
11
- "direct": {
12
- "description": "If the control is direct (if via an intermediary, this value should be false; if unknown, left blank)",
13
- "type": "boolean"},
14
- "percentage_controlled": {
15
- "description": "Percentage controlled, either directly or indirectly",
16
- "type": "string"},
17
- "significant": {
18
- "description": "Does the source define the control as somehow significant?",
19
- "type": "boolean"},
20
- "subsidiary": {
21
- "description": "Company that is controlled",
22
- "type": "object",
23
- "required": ["name"],
24
- "additionalProperties": false,
25
- "properties": {
26
- "name": {
27
- "description": "Name of company",
28
- "type": "string"
29
- },
30
- "jurisdiction": {
31
- "description": "Jurisdiction of registration",
32
- "type": "string"
33
- },
34
- "company_number": {
35
- "description": "Company number, if company and known",
36
- "type": "string"
37
- },
38
- "identifier": {
39
- "description": "Unique identifier of company",
40
- "type": "string"
41
- }
42
- }
43
- }
44
- }
45
- }
46
- }
47
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "TotalShares",
3
- "description": "The total number of shares a company has issued",
4
- "type": "object",
5
- "properties": { "number": { "type": "integer" },
6
- "share_class": { "type": "string", "minLength": 1 }
7
- },
8
- "required": [ "number" ]
9
- }
10
-
@@ -1,27 +0,0 @@
1
- {
2
- "title": "Licence Schema",
3
- "description": "A Licence is a permission for an entity to do something that would otherwise not be permitted. An example is a 'Financial' licence to operate as a bank, or an financial advisor, for example, or a 'Business' Licence to sell alcohol, or operate an amusement arcade. Future licence types (extractives, pollution) will be added later",
4
- "$schema": "http://json-schema.org/draft-04/schema#",
5
- "type": "object",
6
- "properties": {
7
- "source_jurisdiction": {
8
- "description": "Jurisdiction of the source of the data",
9
- "type": "string"
10
- },
11
- "company": {
12
- "$ref": "includes/company.json"
13
- },
14
- "data": {
15
- "type": "array",
16
- "description": "This is an array of data objects, that is the objects which actually contain the data about the datum. Generally there will only be one element in this, although in for some types of data_types there may naturally be several releated to the same company, e.g. shareholders",
17
- "items": {
18
- "$ref": "includes/licence-data-object.json"
19
- },
20
- "additionalItems": false
21
- }
22
- },
23
- "required": [
24
- "company",
25
- "data"
26
- ]
27
- }
@@ -1,17 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-04/schema#",
3
- "title": "Primary Data Schema",
4
- "type": "object",
5
- "properties": {
6
- "source_url": {
7
- "description": "Place where this fact can be verified",
8
- "type": "string"
9
- },
10
- "sample_date": {
11
- "description": "Date on which this fact was known to be true",
12
- "type": "string"
13
- }
14
- },
15
- "required": ["source_url", "sample_date"],
16
- "additionalProperties": true
17
- }
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-04/schema#",
3
- "title": "Share Parcel Schema",
4
- "type": "object",
5
- "allOf" : [
6
- // The following is a basic statement with sample_date, etc
7
- { "$ref": "includes/base-statement.json" },
8
- // And this overrides it to provide data-type-specific information
9
- {
10
- "properties": {
11
- "data": {
12
- "items": {
13
- "allOf": [
14
- { "$ref": "includes/share-parcel-data.json" }
15
- ]
16
- }
17
- }
18
- }
19
- }
20
- ]
21
- }
@@ -1,85 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-04/schema#",
3
- "title": "Simple Financial Payment",
4
- "description": "A Financial Payment is a payment from government to a recipient",
5
- "type": "object",
6
- "properties": {
7
- "source_url": {
8
- "description": "Place where this fact can be verified",
9
- "type": "string"
10
- },
11
- "sample_date": {
12
- "description": "Date on which this fact was known to be true",
13
- "type": "string"
14
- },
15
- "confidence": {
16
- "description": "Confidence in accuracy of data",
17
- "type": "string",
18
- "enum": ["HIGH", "MEDIUM", "LOW"]
19
- },
20
- "company_name": {
21
- "description": "Name of the company that received the money",
22
- "type": "string"
23
- },
24
- "company_jurisdiction": {
25
- "description": "Jurisdiction where company is based",
26
- "type": "string"
27
- },
28
- "value": {
29
- "description": "The amount transacted (e.g. 19.95)",
30
- "type": "string"
31
- },
32
- "payee_name": {
33
- "description": "The name of the payee (the entity that received the money)",
34
- "type": "string"
35
- },
36
- "currency": {
37
- "description": "The currency of the payment (three letter symbol, e.g. USD, GBP, EUR)",
38
- "type": "string"
39
- },
40
- "date": {
41
- "description": "The date on which the payment was made",
42
- "type": "date"
43
- },
44
- "transaction_number": {
45
- "description": "The unique identifier for the transaction, scoped to this bot",
46
- "type": "string"
47
- },
48
- "jurisdiction": {
49
- "description": "The jurisdiction of the body that made the payment, eg. UK, France, Delaware, Manchester",
50
- "type": "string"
51
- },
52
- "more_details_url": {
53
- "description": "A url from which more details can be seen (may be the same as the source_url)",
54
- "type": ["string",null]
55
- },
56
- "description": {
57
- "description": "The description of the transaction as given in the raw data",
58
- "type": ["string",null]
59
- },
60
- "expense_type": {
61
- "description": "The type of expense -- can be either capital, revenue (i.e. current expenditure) or null",
62
- "enum": ["capital","revenue",null]
63
- },
64
- "expense_area": {
65
- "description": "category (in words) of the expenditure",
66
- "type": ["string",null]
67
- },
68
- "entity_name": {
69
- "description": "The name of the government entity that made the payment, e.g. Environment Agency",
70
- "type": "string"
71
- },
72
- "entity_uri": {
73
- "description": "A unique URL (ideally a dereferencable URI) for the government entity",
74
- "type": ["string",null]
75
- },
76
- "department_name": {
77
- "description": "The name of the government department which the entity belongs to (if relevant), e.g. Department of Health",
78
- "type": ["string",null]
79
- },
80
- "csv_line_number": {
81
- "description": "If the source for the data is a CSV file, you can optionally include the line number of the CSV from which this data was retrieved",
82
- "type": ["string",null]}
83
- },
84
- "required": ["source_url", "sample_date", "company_name", "company_jurisdiction", "value", "payee_name", "date", "currency"]
85
- }