Details
-
Bug
-
Status: Done
-
Major
-
Resolution: Done
-
None
-
- Import the Rwadef inlined in the ticket description into the designer
- Export Swagger 2
- default value for date and datetime should be present
-
All
-
Small
Description
When I export to Swagger 2 a definition with data type containing date and datetime properties, their default value is lost.
Example of Rwadef to reproduce the issue
--- specVersion: "3.0.2" info: name: "qwert" version: "1.0.0" description: "No description" contract: mediaTypes: - "application/json" unsortedElementOrder: - "#/types/datatype" types: datatype: type: "object" properties: date: type: "date" default: "def" datetime: type: "datetime" default: "2016-02-28T16:41:41.090Z" string: type: "string" default: "def"
Exported Swagger (dafault is missing for date and datetime)
--- swagger: "2.0" info: description: "No description" version: "1.0.0" title: "qwert" consumes: - "application/json" produces: - "application/json" paths: {} definitions: datatype: type: "object" properties: date: type: "string" format: "date" datetime: type: "string" format: "date-time" string: type: "string" default: "def"