[ https://issues.apache.org/jira/browse/THRIFT-2859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14229188#comment-14229188 ]
Stig Bakken commented on THRIFT-2859: ------------------------------------- Jens: TBH, the schema isn't really done yet, but even in its current form it helped me find some issues. I ended up using the "json_schema" Ruby validator, which at least supports anyOf/allOf/oneOf constraints. Getting the schema right is time consuming, since it involves figuring out which issues are because of the schema (most are), and which are because of the validator :) I want to finish it though, running it from tests, but if you don't mind I'll do that in a separate ticket. Another great test (for yet another ticket) would be to have a test re-creating thrift files from the JSON definition, and then re-do that from the generated thrift file and verify that the output is identical. On formatting: yes it would be great to make it indented nicely, I was planning to do that after the rest worked as it should. > JSON generator: output complete descriptors > ------------------------------------------- > > Key: THRIFT-2859 > URL: https://issues.apache.org/jira/browse/THRIFT-2859 > Project: Thrift > Issue Type: Improvement > Components: JSON - Compiler > Affects Versions: 0.9.2 > Reporter: Stig Bakken > Assignee: Jens Geyer > Priority: Minor > > (Someone should probably add a Jira component for the JSON generator.) > The attached pull request contains some improvements to the JSON generator: > 1. programs are no longer merged by default, use "--gen json:merge" > 2. "index" is renamed to "key" for fields to match the compiler's internal > naming > 3. types are described in a way that does not require string parsing > 4. full support for exceptions, unions, namespaces, includes and > required/optional fields -- This message was sent by Atlassian JIRA (v6.3.4#6332)