Github user nsuke commented on a diff in the pull request: https://github.com/apache/thrift/pull/299#discussion_r48102430 --- 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 -- Thanks for the explanation. I manually modified generated code but it seems it works fine. I understand it may have been another issue but based on information we have, I'm excluding this part for now. You can find update PR here: #749 It already found one regression (outdated schema) introduced after this PR :smile:
--- 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. ---