Closed TristanSpeakEasy closed 7 months ago
libopenapi
v0.16.5
now supports the follow format
values:
bigint
decimal
Which means they can be used to render out strings and numbers.
If you try your spec again with v0.1.10
of wiretap, and add in the following required values to your schema
required:
...
- bigint
- bigintStr
- decimal
- decimalStr
wiretap will now return the following mock
{
"json": {
"any": "any",
"bigint": 8821239038968084,
"bigintStr": "9223372036854775808",
"bool": true,
"date": "2020-01-01",
"dateTime": "2020-01-01T00:00:00.000001Z",
"decimal": 3.141592653589793,
"decimalStr": "3.14159265358979344719667586",
"enum": "one",
"float32": 1.1,
"int": 1,
"int32": 1,
"int32Enum": 55,
"intEnum": 2,
"num": 1.1,
"str": "test"
}
}
I suspect this is likely to be a feature request more than a bug. But consider this spec:
The response has properties like:
ie integers and numbers that are using advances formats. decimal is currently a recognized format in the official OpenAPI format registry and we are trying to get
bigint
added as well.currently wiretap just returns nothing for these properties:
where we need it to return the defined examples at least