-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
Milestone
Description
In this small example, the TestObject.datetime property is defined to have the "date-time" format. When converting to JSON, the generated Swift client converts it as if it was a "date".
swagger: '2.0'
info:
title: Test
version: 1.0.0
produces:
- application/json
paths:
/test:
put:
parameters:
- name: testObject
in: body
required: true
schema:
$ref: '#/definitions/TestObject'
responses:
'200':
description: OK
definitions:
TestObject:
type: object
properties:
datetime:
type: string
format: date-time
description: Date Time
Resulting JSON string:
{datetime: "2015-11-25"}
Expected:
{datetime: "2015-11-25T12:00:00Z"}