Skip to content

Commit 4fdf21b

Browse files
docs: refactored and updated the json schemas (#131)
1 parent 29e1ac7 commit 4fdf21b

49 files changed

Lines changed: 1112 additions & 233 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft-07/schema",
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"$id": "data-ingest:contract/components/base_entity.schema.json",
44
"title": "base_entity",
55
"description": "A complete entity specification within data ingest",
@@ -10,7 +10,8 @@
1010
"description": "A mapping of field names to their Python types. These will either be strings representing Python types (if there are no argumements to the type), and field specification objects otherwise",
1111
"additionalProperties": {
1212
"$ref": "field.schema.json"
13-
}
13+
},
14+
"minProperties": 1
1415
},
1516
"aliases": {
1617
"description": "A mapping of field name to allowed field alias",
@@ -26,5 +27,7 @@
2627
"type": "string"
2728
}
2829
}
29-
}
30+
},
31+
32+
"required": ["fields"]
3033
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft-07/schema",
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"$id": "data-ingest:contract/components/contract_error_details.schema.json",
44
"title": "base_entity",
55
"description": "A mapping of field names to the custom error code and message required if these fields were to fail validation during the data contract phase. For nested fields, these should be specified using struct '.' notation (eg. fieldA.fieldB.fieldC)",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft-07/schema",
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"$id": "data-ingest:contract/components/entity.schema.json",
44
"title": "entity",
55
"description": "A concrete entity specification within data ingest",

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft-07/schema",
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"$id": "data-ingest:contract/components/field.schema.json",
44
"title": "field",
55
"description": "The type of a field, specified as a bare Python type if there are no argumements, and as an object otherwise. This can also be a reference to a type defined in the dataset",
@@ -9,6 +9,10 @@
99
},
1010
{
1111
"$ref": "field_specification.schema.json"
12+
},
13+
{
14+
"type": "string",
15+
"minLength": 1
1216
}
1317
]
1418
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft-07/schema",
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"$id": "data-ingest:contract/components/field_error_detail.schema.json",
44
"title": "field_error_detail",
55
"description": "The custom details to be used for a field when a validation error is raised during the data contract phase",

docs/advanced_guidance/json_schemas/contract/components/field_error_type.schema copy.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://json-schema.org/draft-07/schema",
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
33
"$id": "data-ingest:contract/components/field_error_type.schema.json",
44
"title": "field_error_detail",
55
"description": "The error type for a field when a validation error is raised during the data contract phase",

0 commit comments

Comments
 (0)