Closed Calavoow closed 8 years ago
Sorry its taken me so long to answer this issue.
The current code defaults to a string if the type cannot be found or understood in term of OpenAPI/Swagger spec .
I have had a look at the OpenAPI/Swagger spec and its does not look like it supports typing individual items in an array. Cannot not see any work around for this so I am going to add array.ordered(type)
as an unsupported feature in the readme.
I don't think that this type of feature will be add to OpenAPI/Swagger spec soon. They have to deal with how it would effect the code generation tools for strongly typed languages first.
I will close the issues, but if you wish to discuss more it please feel free to comment
Thanks. In strongly typed languages this is simply a tuple or HList, so hopefully it can be added some time.
When creating a schema for data returned from the API as follows:
An example instance could be
The output of the model type on the swagger doc website is as follows
when adding the schema to the
hapi-swagger
plugin options asToggling
required
as in #249 has no effect.Did I make an error here in specifying the schema, or attaching it to the hapi-swagger plugin? Or is this a bug in converting the type of a tuple?