play-swagger
play-swagger copied to clipboard
Custom mapping joda DateTime error
Default mapping of or.joda.time.DateTime is
{
type: "integer",
format: "epoch"
}
Overriding this binding with swagger-custom-mappings.yml doesn't work. Here is the yml:
- type: org\.joda\.time\.DateTime
specAsParameter:
- type: string
format: date-time
This is working for me, although I have a slightly different swagger-custom-mappings.yml file:
---
- type: .*DateTime
specAsParameter:
- type: string
format: date-time
This produces the following output fragment as expected:
"dueDate": {
"type": "string",
"format": "date-time"
}
Can confirm org.joda.time.DateTime does not work but .*DateTime does
@contact-mymoneytime Try this one:
---
- type: "org.joda.time.DateTime"
specAsParameter:
- type: string
format: date-time