-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #224 from LiveRamp/develop
Release 6.2.4
- Loading branch information
Showing
18 changed files
with
1,397 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
namespace { | ||
title "Polymorphism example" | ||
version 0.0.1 | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
diagram main { | ||
/include | ||
resource.reslang | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
resource MyResource { | ||
id: string | ||
basic: BasicUnion | ||
normal: NormalUnion | ||
|
||
/operations | ||
MULTIGET POST | ||
} | ||
|
||
union BasicUnion { | ||
myFirstStruct: MyFirstStruct | ||
} | ||
|
||
structure MyFirstStruct { | ||
attributeA: int | ||
attributeB: int optional | ||
} | ||
|
||
union NormalUnion { | ||
mySecondStruct: MySecondStruct | ||
myThirdStruct: MyThirdStruct | ||
} | ||
|
||
structure MySecondStruct { | ||
attributeC: string | ||
attributeD: string optional | ||
} | ||
|
||
structure MyThirdStruct { | ||
attributeE: string | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Error: No events are listed in the specification |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
digraph G { | ||
graph [fontname = "helvetica"]; | ||
node [fontname = "helvetica"]; | ||
edge [fontname = "helvetica"]; | ||
node [shape=none]; | ||
|
||
"MyResource" [label=< | ||
<table border="3" cellborder="0" cellspacing="1" style='rounded' bgcolor='#ffffcc'> | ||
<tr><td><b>MyResource </b></td></tr><hr/><tr><td align="left">id: string</td></tr><tr><td align="left">basic: BasicUnion</td></tr><tr><td align="left">normal: NormalUnion</td></tr><tr><td align="right"><font color="#0000ff" point-size="8"> MULTIGET POST</font></td></tr></table>>]; | ||
"BasicUnion" [label=< | ||
<table border="1" cellborder="0" cellspacing="1" style='dashed' > | ||
<tr><td><b>BasicUnion </b></td></tr> </table> >]; | ||
"MyFirstStruct" [label=< | ||
<table border="1" cellborder="0" cellspacing="1" > | ||
<tr><td><b>MyFirstStruct </b></td></tr> <hr/><tr><td align="left">attributeA: int</td></tr><tr><td align="left">attributeB: int</td></tr></table> >]; | ||
"NormalUnion" [label=< | ||
<table border="1" cellborder="0" cellspacing="1" style='dashed' > | ||
<tr><td><b>NormalUnion </b></td></tr> </table> >]; | ||
"MySecondStruct" [label=< | ||
<table border="1" cellborder="0" cellspacing="1" > | ||
<tr><td><b>MySecondStruct </b></td></tr> <hr/><tr><td align="left">attributeC: string</td></tr><tr><td align="left">attributeD: string</td></tr></table> >]; | ||
"MyThirdStruct" [label=< | ||
<table border="1" cellborder="0" cellspacing="1" > | ||
<tr><td><b>MyThirdStruct </b></td></tr> <hr/><tr><td align="left">attributeE: string</td></tr></table> >]; | ||
"BasicUnion" -> "MyFirstStruct" [dir="back" arrowtail="diamond" label=< <font point-size="8"> myFirstStruct</font> >]; | ||
"NormalUnion" -> "MySecondStruct" [dir="back" arrowtail="diamond" label=< <font point-size="8"> mySecondStruct</font> >]; | ||
"NormalUnion" -> "MyThirdStruct" [dir="back" arrowtail="diamond" label=< <font point-size="8"> myThirdStruct</font> >]; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
{ | ||
"$id": "https://schemas.liveramp.com/noroot", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"definitions": { | ||
"MyResourceInput": { | ||
"type": "object", | ||
"properties": { | ||
"basic": { | ||
"$ref": "#/definitions/BasicUnion", | ||
"type": "object" | ||
}, | ||
"normal": { | ||
"$ref": "#/definitions/NormalUnion", | ||
"type": "object" | ||
} | ||
}, | ||
"required": [ | ||
"basic", | ||
"normal" | ||
] | ||
}, | ||
"MyResourceOutput": { | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string" | ||
}, | ||
"basic": { | ||
"$ref": "#/definitions/BasicUnion", | ||
"type": "object" | ||
}, | ||
"normal": { | ||
"$ref": "#/definitions/NormalUnion", | ||
"type": "object" | ||
} | ||
}, | ||
"required": [ | ||
"id", | ||
"basic", | ||
"normal" | ||
] | ||
}, | ||
"MyResourceMultiResponse": { | ||
"type": "object", | ||
"properties": { | ||
"myResources": { | ||
"description": "Array of retrieved MyResources", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/MyResourceOutput" | ||
} | ||
} | ||
} | ||
}, | ||
"BasicUnion": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"type": "string" | ||
} | ||
}, | ||
"discriminator": { | ||
"propertyName": "type", | ||
"mapping": { | ||
"myFirstStruct": "#/definitions/BasicUnionMyFirstStruct" | ||
} | ||
}, | ||
"required": [ | ||
"type", | ||
"attributeA" | ||
] | ||
}, | ||
"BasicUnionMyFirstStruct": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/BasicUnion" | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"attributeA": { | ||
"type": "integer", | ||
"format": "int32" | ||
}, | ||
"attributeB": { | ||
"type": "integer", | ||
"format": "int32" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"NormalUnion": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"type": "string" | ||
} | ||
}, | ||
"discriminator": { | ||
"propertyName": "type", | ||
"mapping": { | ||
"mySecondStruct": "#/definitions/NormalUnionMySecondStruct", | ||
"myThirdStruct": "#/definitions/NormalUnionMyThirdStruct" | ||
} | ||
}, | ||
"required": [ | ||
"type", | ||
"attributeC", | ||
"attributeE" | ||
] | ||
}, | ||
"NormalUnionMySecondStruct": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/NormalUnion" | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"attributeC": { | ||
"type": "string" | ||
}, | ||
"attributeD": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"NormalUnionMyThirdStruct": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/NormalUnion" | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"attributeE": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"StandardError": { | ||
"type": "object", | ||
"properties": { | ||
"httpStatus": { | ||
"description": "HTTP error status code for this problem", | ||
"type": "integer", | ||
"format": "int32" | ||
}, | ||
"errorCode": { | ||
"description": "Service specific error code, more granular", | ||
"type": "string" | ||
}, | ||
"message": { | ||
"description": "General, human readable error message", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"httpStatus", | ||
"errorCode", | ||
"message" | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.