I'm struggling to find a data structure syntax that generates JSON schema that I can use effectively with Dredd.
My data structure is as follows:
## Nation (object)
+ id (string) Zid for Nation
+ type (string) The object type that this data represents
+ label (string) Name of nation
+ languages (array[Language], fixed) The languages available within this Nation
+ years (array[Year], fixed) The years available within this Nation
## Year (object)
+ id (string) Zid for Nation
+ type (string) The object type that this data represents
+ label (string) The name of the year group
## Language (object)
+ id (string) Zid for Language
+ type (string) The object type that this data represents
+ label (string) The name of the supported language
+ code (string) The code for the supported language
But when the resulting JSON-schema includes an empty enum property that causes my test to fail due to the
I'm struggling to find a data structure syntax that generates JSON schema that I can use effectively with Dredd.
My data structure is as follows:
But when the resulting JSON-schema includes an empty
enum
property that causes my test to fail due to theThis empty
enum
results in my tests failing as the data returned from my API doesn't match it.Not sure if I've misinterpreted the documentation or if this is a genuine bug.