This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Chris H (CruftMaster)
committed
Apr 23, 2017
1 parent
15c55b3
commit 98c7732
Showing
13 changed files
with
611 additions
and
592 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,61 @@ | ||
package testdata | ||
|
||
const ArrayOfMessages = `{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"properties": { | ||
"description": { | ||
"type": "string" | ||
}, | ||
"payload": { | ||
"items": { | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"properties": { | ||
"complete": { | ||
"type": "boolean" | ||
}, | ||
"id": { | ||
"type": "integer" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"rating": { | ||
"type": "number" | ||
}, | ||
"timestamp": { | ||
"type": "string" | ||
}, | ||
"topology": { | ||
"enum": [ | ||
"FLAT", | ||
0, | ||
"NESTED_OBJECT", | ||
1, | ||
"NESTED_MESSAGE", | ||
2, | ||
"ARRAY_OF_TYPE", | ||
3, | ||
"ARRAY_OF_OBJECT", | ||
4, | ||
"ARRAY_OF_MESSAGE", | ||
5 | ||
], | ||
"oneOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "integer" | ||
} | ||
] | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object" | ||
}, | ||
"type": "array" | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object" | ||
}` |
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,61 @@ | ||
package testdata | ||
|
||
const ArrayOfObjects = `{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"properties": { | ||
"description": { | ||
"type": "string" | ||
}, | ||
"payload": { | ||
"items": { | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"properties": { | ||
"complete": { | ||
"type": "boolean" | ||
}, | ||
"id": { | ||
"type": "integer" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"rating": { | ||
"type": "number" | ||
}, | ||
"timestamp": { | ||
"type": "string" | ||
}, | ||
"topology": { | ||
"enum": [ | ||
"FLAT", | ||
0, | ||
"NESTED_OBJECT", | ||
1, | ||
"NESTED_MESSAGE", | ||
2, | ||
"ARRAY_OF_TYPE", | ||
3, | ||
"ARRAY_OF_OBJECT", | ||
4, | ||
"ARRAY_OF_MESSAGE", | ||
5 | ||
], | ||
"oneOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "integer" | ||
} | ||
] | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object" | ||
}, | ||
"type": "array" | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object" | ||
}` |
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,24 @@ | ||
package testdata | ||
|
||
const ArrayOfPrimitives = `{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"properties": { | ||
"description": { | ||
"type": "string" | ||
}, | ||
"keyWords": { | ||
"items": { | ||
"type": "string" | ||
}, | ||
"type": "array" | ||
}, | ||
"luckyNumbers": { | ||
"items": { | ||
"type": "integer" | ||
}, | ||
"type": "array" | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object" | ||
}` |
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,144 @@ | ||
package testdata | ||
|
||
const EnumCeption = `{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"properties": { | ||
"complete": { | ||
"type": "boolean" | ||
}, | ||
"failureMode": { | ||
"enum": [ | ||
"RECURSION_ERROR", | ||
0, | ||
"SYNTAX_ERROR", | ||
1 | ||
], | ||
"oneOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "integer" | ||
} | ||
] | ||
}, | ||
"id": { | ||
"type": "integer" | ||
}, | ||
"importedEnum": { | ||
"oneOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "integer" | ||
} | ||
] | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"payload": { | ||
"properties": { | ||
"complete": { | ||
"type": "boolean" | ||
}, | ||
"id": { | ||
"type": "integer" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"rating": { | ||
"type": "number" | ||
}, | ||
"timestamp": { | ||
"type": "string" | ||
}, | ||
"topology": { | ||
"enum": [ | ||
"FLAT", | ||
0, | ||
"NESTED_OBJECT", | ||
1, | ||
"NESTED_MESSAGE", | ||
2, | ||
"ARRAY_OF_TYPE", | ||
3, | ||
"ARRAY_OF_OBJECT", | ||
4, | ||
"ARRAY_OF_MESSAGE", | ||
5 | ||
], | ||
"oneOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "integer" | ||
} | ||
] | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object" | ||
}, | ||
"payloads": { | ||
"items": { | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"properties": { | ||
"complete": { | ||
"type": "boolean" | ||
}, | ||
"id": { | ||
"type": "integer" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"rating": { | ||
"type": "number" | ||
}, | ||
"timestamp": { | ||
"type": "string" | ||
}, | ||
"topology": { | ||
"enum": [ | ||
"FLAT", | ||
0, | ||
"NESTED_OBJECT", | ||
1, | ||
"NESTED_MESSAGE", | ||
2, | ||
"ARRAY_OF_TYPE", | ||
3, | ||
"ARRAY_OF_OBJECT", | ||
4, | ||
"ARRAY_OF_MESSAGE", | ||
5 | ||
], | ||
"oneOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "integer" | ||
} | ||
] | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object" | ||
}, | ||
"type": "array" | ||
}, | ||
"rating": { | ||
"type": "number" | ||
}, | ||
"timestamp": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object" | ||
}` |
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,23 @@ | ||
package testdata | ||
|
||
const FirstEnum = `{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"enum": [ | ||
"VALUE_0", | ||
0, | ||
"VALUE_1", | ||
1, | ||
"VALUE_2", | ||
2, | ||
"VALUE_3", | ||
3 | ||
], | ||
"oneOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "integer" | ||
} | ||
] | ||
}` |
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,24 @@ | ||
package testdata | ||
|
||
const FirstMessage = `{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"properties": { | ||
"complete1": { | ||
"type": "boolean" | ||
}, | ||
"id1": { | ||
"type": "integer" | ||
}, | ||
"name1": { | ||
"type": "string" | ||
}, | ||
"rating1": { | ||
"type": "number" | ||
}, | ||
"timestamp1": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": true, | ||
"type": "object" | ||
}` |
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,23 @@ | ||
package testdata | ||
|
||
const ImportedEnum = `{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"enum": [ | ||
"VALUE_0", | ||
0, | ||
"VALUE_1", | ||
1, | ||
"VALUE_2", | ||
2, | ||
"VALUE_3", | ||
3 | ||
], | ||
"oneOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "integer" | ||
} | ||
] | ||
}` |
Oops, something went wrong.