Skip to content

Commit d42897f

Browse files
docs: fix json schema definitions (#140)
1 parent 121bf02 commit d42897f

4 files changed

Lines changed: 38 additions & 36 deletions

File tree

docs/advanced_guidance/json_schemas/contract/components/field_specification.schema.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,6 @@
184184
}
185185
}
186186
},
187-
{
188-
"properties": {
189-
"callable": {
190-
"const": "postcode"
191-
},
192-
"constraints": {
193-
"$ref": "type_constraints/postcode.schema.json"
194-
}
195-
}
196-
},
197187
{
198188
"properties": {
199189
"callable": {

docs/advanced_guidance/json_schemas/contract/components/readable_entity.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"type": "object",
121121
"properties": {
122122
"reader": {
123-
"const": "DuckDBXMLReader"
123+
"const": "DuckDBXMLStreamReader"
124124
},
125125
"kwargs": {
126126
"$ref": "reader_constraints/ddb_xml_reader.schema.json"

docs/advanced_guidance/json_schemas/contract/components/reader_constraints/global_csv_reader_args.schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
"type": "object",
77
"properties": {
88
"field_check": {
9-
"type": "boolean",
10-
"description": "Enable to check for additional or missing fields."
9+
"type": "string",
10+
"description": "Enable to check for additional or missing fields.",
11+
"enum": [
12+
"true",
13+
"false"
14+
]
1115
},
1216
"field_check_error_code": {
1317
"type": "string",

docs/advanced_guidance/json_schemas/contract/components/type_name.schema.json

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,35 @@
33
"$id": "data-ingest:contract/components/type_name.schema.json",
44
"title": "type_name",
55
"description": "The name of an allowed type within data ingest. This should be a Python type",
6-
"type": "string",
7-
"enum": [
8-
"str",
9-
"int",
10-
"float",
11-
"date",
12-
"datetime",
13-
"constr",
14-
"conint",
15-
"condate",
16-
"condecimal",
17-
"postcode",
18-
"nhsnumber",
19-
"permissivenhsno",
20-
"alphanumeric",
21-
"identifier",
22-
"orgid",
23-
"formatteddatetime",
24-
"formattedtime",
25-
"conformatteddate",
26-
"reportingperiodstart",
27-
"reportingperiodend"
28-
]
6+
"oneOf": [
7+
{
8+
"enum": [
9+
"str",
10+
"int",
11+
"float",
12+
"date",
13+
"datetime",
14+
"constr",
15+
"conint",
16+
"condate",
17+
"condecimal",
18+
"postcode",
19+
"nhsnumber",
20+
"permissivenhsno",
21+
"alphanumeric",
22+
"identifier",
23+
"orgid",
24+
"formatteddatetime",
25+
"formattedtime",
26+
"conformatteddate",
27+
"reportingperiodstart",
28+
"reportingperiodend"
29+
]
30+
},
31+
{
32+
"type": "string",
33+
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
34+
}
35+
],
36+
"minLength": 1
2937
}

0 commit comments

Comments
 (0)