phoenixnap / springmvc-raml-plugin

Spring MVC - RAML Spec Synchroniser Plugin. A Maven plugin designed to Generate Server & Client code in Spring from a RAML API descriptor and conversely, a RAML API document from the SpringMVC Server implementation.
Apache License 2.0
137 stars 84 forks source link

Response field defined as type: date-only is returning unix timestamp instead of date #183

Closed zeljko-mirovic closed 7 years ago

zeljko-mirovic commented 7 years ago

Response field defined as type: date-only is returning unix timestamp instead of date. Plugin version 0.10.9.

RAML example:

#%RAML 1.0
title: Test

types:
  Data:
    type: object
    properties:
      name:
        type: string
      date:
        type: date-only

/test:
  get:
    responses:
      200:
        body:
          application/json:
            type: Data

Actual response:

{
  "name": "Test name",
  "date": 1496527200000
}

Expected response:

{
  "name": "Test name",
  "date":  "2017-06-04"
}