Github user nsuke commented on a diff in the pull request: https://github.com/apache/thrift/pull/299#discussion_r46765156 --- 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 -- @stigsb Not sure you're still around but would you mind elaborating on why you moved key/value/class/elem here ? Thanks for sharing this BTW. It's pity this one escaped our eyes for so long.
--- 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. ---