nssalian commented on code in PR #9:
URL:
https://github.com/apache/iceberg-verification/pull/9#discussion_r4137727576
##########
dev/schema/cases.base.schema.json:
##########
@@ -0,0 +1,49 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://iceberg.apache.org/verification/cases.base.schema.json",
+ "title": "Conformance cases (base)",
+ "description": "Structure shared by every table-spec surface's cases.json.",
+ "type": "object",
+ "required": ["cases"],
+ "additionalProperties": false,
+ "properties": {
+ "cases": {
+ "type": "array",
+ "items": { "$ref": "#/$defs/case" }
+ }
+ },
+ "$defs": {
+ "case": {
+ "type": "object",
+ "required": ["id", "valid", "input"],
+ "additionalProperties": false,
+ "properties": {
+ "id": { "type": "string", "minLength": 1 },
+ "valid": { "type": "boolean" },
+ "input": true,
+ "decoded": true,
Review Comment:
I went ahead and did this here. `decoded` is now validated per type in
`cases.types.schema.json`: `if/then` keyed on `decoded.type` with the required
keys and `additionalProperties: false` for each shape (decimal, fixed,
geometry, geography, struct, list, map), recursive through struct fields, list
element, and map key/value, plus a closed enum of type names. A typo like
`precison`, a `fixed` carrying `len`, an unknown type, or an extra key on a
simple type all reject now. Added four self-test cases for these.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]