Last active
November 13, 2015 00:59
-
-
Save kevinswiber/8b206bad5f4956a882f6 to your computer and use it in GitHub Desktop.
Thrift IDL for Siren Entity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct Order { | |
| 1: optional set<string> class_ | |
| 2: optional OrderProperties properties | |
| 3: optional OrderSubEntities entities | |
| 4: optional set<Action> actions | |
| 5: optional set<Link> links | |
| } | |
| struct OrderProperties { | |
| 1: required i32 orderNumber | |
| 2: optional i32 orderCount | |
| 3: required string status | |
| } | |
| union OrderSubEntities { | |
| 1: CustomerEntity customer_entity | |
| 2: LinkedEntity collection_linked_entity | |
| } | |
| struct CustomerEntity { | |
| 1: optional set<string> class_ | |
| 2: optional CustomerEntityProperties properties | |
| 3: optional set<string> rel | |
| 4: optional set<Link> links | |
| } | |
| struct CustomerEntityProperties { | |
| 1: required string customerId | |
| 2: optional string name | |
| } | |
| struct Action { | |
| 1: required string name | |
| 2: required string href | |
| 3: optional string title | |
| 4: optional string type | |
| 5: optional string method | |
| 6: optional set<Field> fields | |
| 7: optional set<string> class_ | |
| } | |
| struct Field { | |
| 1: required string name | |
| 2: optional set<string> class_ | |
| 3: optional string title | |
| 4: optional string type | |
| 5: optional FieldValue value | |
| } | |
| struct Link { | |
| 1: required set<string> rel | |
| 2: required string href | |
| 3: optional string title | |
| 4: optional string type | |
| 5: optional set<string> class_ | |
| } | |
| struct LinkedEntity { | |
| 1: optional set<string> class_ | |
| 2: required set<string> rel | |
| 3: required string href | |
| 4: optional string title | |
| } | |
| union FieldValue { | |
| 1: StringValue string_value | |
| 2: Int32Value i32_value | |
| 3: RadioValue radio_value | |
| } | |
| struct StringValue { | |
| 1: required string value | |
| } | |
| struct Int32Value { | |
| 1: required string value | |
| } | |
| struct RadioValue { | |
| 1: required set<RadioItem> value; | |
| } | |
| struct RadioItem { | |
| 1: required string value; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct Entity { | |
| 1: optional set<string> class | |
| 2: optional set<Entity> entities | |
| 3: optional set<Action> actions | |
| 4: optional set<Link> links | |
| } | |
| struct Link { | |
| 1: required set<string> rel | |
| 2: required string href | |
| 3: optional string title | |
| } | |
| struct Action { | |
| 1: required string name | |
| 2: optional string method | |
| 3: required string href | |
| 4: optional string type | |
| 5: optional string title | |
| 6: optional set<Field> fields | |
| } | |
| struct Field { | |
| 1: required string name | |
| 2: optional string type | |
| 3: optional string value | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment