Closed rcknight closed 4 years ago
The build will be failing because I didn't yet update the expected test output. Even in this default case where no example instance is supplied, the example object has improved to use the correct types:
new:
"example": {
"name": "Example",
"id": 0,
"age": 0
}
old:
"example": {
"name": "",
"id": "",
"age": ""
}
Recent OpenAPI changes from @williamhbell don't create the "Example" json objects as swagerui does it for you
(As discussed in slack)
Users can supply an example instance on
RouteMetaData
andRouteMetaDataResponse
. If supplied, the values on these objects will be used to populate examples in the OpenApi schemas. If no example objects are supplied, then this PR still improves example output, displaying correctly typed values rather than deciding everything is a string, and correctly handling nested object structures rather than only including top-level properties in examples.