BigDecimal as String in Swagger defenition
问题 I would like to define an object with BigDecimal as String in swagger.json Right now I can do "MyObject": { "type": "object", "properties": { "amountOfMoney": { "type": "string", "pattern": "d+([.]d+)?" }, "name": { "type": "string" } }, "title": "MyObject" } Another way, I can Define amountOfMoney as a number. "MyObject": { "type": "object", "properties": { "amountOfMoney": { "type": "number" "minimum": 0.0, "maximum": 100.0, "exclusiveMinimum": false, "exclusiveMaximum": false }, "name": {