Skip to content

Commit

Permalink
Fix contradictory 'any' nullability verification (#141)
Browse files Browse the repository at this point in the history
The 'AnyExample' test lists negative test '{"value":null}' however
ListAnyAliasExample and SetAnyAliasExample both listed positive
cases for JSON arrays including null values.
  • Loading branch information
carterkozak authored and bulldozer-bot[bot] committed Mar 11, 2019
1 parent 25ccb3e commit e641032
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions example-types.conjure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ types:
ListStringAliasExample: { alias: list<string> }
ListUuidAliasExample: { alias: list<uuid> }
ListAnyAliasExample: { alias: list<any> }
ListOptionalAnyAliasExample: { alias: list<optional<any>> }

SetBearerTokenAliasExample: { alias: set<bearertoken> }
SetBinaryAliasExample: { alias: set<binary> }
Expand All @@ -130,6 +131,7 @@ types:
SetStringAliasExample: { alias: set<string> }
SetUuidAliasExample: { alias: set<uuid> }
SetAnyAliasExample: { alias: set<any> }
SetOptionalAnyAliasExample: { alias: set<optional<any>> }

MapBearerTokenAliasExample:
alias: map<bearertoken, boolean>
Expand Down
18 changes: 16 additions & 2 deletions master-test-cases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,16 @@ body:
- type: ListAnyAliasExample
positive:
- '[]'
- '[null, 0, "content", true, [1,2,3], {"key":3}]'
- '[0, "content", true, [1,2,3], {"key":3}]'
negative:
- 'null'
- '[null]'
- type: ListOptionalAnyAliasExample
positive:
- '[]'
- '[null, 0, "content", true, [1,2,3], {"key":3}]'
negative:
- 'null'
- type: SetBearerTokenAliasExample
positive:
- '[]'
Expand Down Expand Up @@ -621,9 +628,16 @@ body:
- type: SetAnyAliasExample
positive:
- '[]'
- '[null, 0, "content", true, [1,2,3], {"key":3}]'
- '[0, "content", true, [1,2,3], {"key":3}]'
negative:
- 'null'
- '[null]'
- type: SetOptionalAnyAliasExample
positive:
- '[]'
- '[null, 0, "content", true, [1,2,3], {"key":3}]'
negative:
- 'null'
- type: MapBearerTokenAliasExample
positive:
- '{}'
Expand Down

0 comments on commit e641032

Please sign in to comment.