Github user stigsb commented on a diff in the pull request: https://github.com/apache/thrift/pull/299#discussion_r47478624 --- Diff: lib/json/schema.json --- @@ -20,66 +21,78 @@ "map", "union", "struct", - "exception", "binary" ] }, "base-type": { - "title": "Base types", + "title": "Base type schema", "type": "object", "properties": { "typeId": { - "enum": [ "void", "string", "bool", "byte", "i16", "i32", "i64", "double", "binary" ] + "enum": ["void", "string", "bool", "byte", "i16", "i32", "i64", "double", "binary" ] } }, "required": [ "typeId" ] }, "list-type": { - "title": "List and set types", + "title": "List and set schema", "type": "object", "properties": { - "typeId": { "enum": [ "list", "set" ] }, - "elemTypeId": { "$ref": "#/definitions/type-id" }, - "elemType": { "$ref": "#/definitions/type-spec" } + "typeId": { + "enum": [ "list", "set" ] + } }, - "required": [ "typeId", "elemTypeId", "elemType" ] + "required": [ "typeId", "elemTypeId" ] }, "map-type": { - "title": "Map type", + "title": "Map schema", "type": "object", "properties": { - "typeId": { "enum": [ "map" ] }, - "keyTypeId": { "$ref": "#/definitions/type-id" }, - "keyType": { "$ref": "#/definitions/type-spec" }, - "valueTypeId": { "$ref": "#/definitions/type-id" }, - "valueType": { "$ref": "#/definitions/type-spec" } + "typeId": { + "enum": [ "map" ] + } }, "required": [ "typeId", "keyTypeId", "valueTypeId" ] }, - "struct-spec": { - "title": "Struct and union types", + "struct-type": { + "title": "Struct, union and exception schema", "type": "object", "properties": { - "typeId": { "enum": [ "union", "struct" ] }, - "class": { "type": "string" } + "typeId": { + "enum": [ "union", "struct", "exception" ] + } }, "required": [ "typeId", "class" ] }, - "type-spec": { + "type-desc": { + "title": "Type descriptor schema", "allOf": [ - { "type": "object" }, + { + "type": "object", + "properties": { + "typeId": { "type": "string" }, + "keyTypeId": { "$ref": "#/definitions/type-id" }, + "keyType": { "$ref": "#/definitions/type-desc" }, + "valueTypeId": { "$ref": "#/definitions/type-id" }, + "valueType": { "$ref": "#/definitions/type-desc" }, + "class": { "type": "string" }, + "elemTypeId": { "$ref": "#/definitions/type-id" }, + "elemType": { "$ref": "#/definitions/type-desc" } --- End diff -- It's been a while, so my memory may be off here, but I seem to remember that it was because the validator wouldn't catch failures otherwise.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---