krakenjs / swaggerize-express

Design-driven apis with swagger 2.0 and express.
Other
354 stars 81 forks source link

property string dateTime format is not supported well in mocks #113

Closed Kashio closed 7 years ago

Kashio commented 7 years ago

The generated data with the generated mocks data provider for any property which is of type string and format dateTime (haven't check date), will result in a normal string. (e.g: taken from my spec: start: "FcvTAQ",)

subeeshcbabu-zz commented 7 years ago

@Kashio Swagger has the format defined as date-time, even though the common name is dateTime.

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14

Please check the Mock generator module https://github.com/subeeshcbabu/swagmock for more details.