MIT License
Bot releases are visible (Hide)
Published by mattpolzin over 4 years ago
static func openAPIExample(using encoder: JSONEncoder) throws -> String?
->
static func openAPIExample(using encoder: JSONEncoder) throws -> AnyCodable?
The openAPIExample()
function is now expected to return an AnyCodable instead of a String. This change facilities embedding examples into OpenAPI documentation as schemas instead of strings. This can improve rendering in some UIs such as ReDoc's.
Published by mattpolzin over 4 years ago
Adds the OpenAPIExampleProvider
protocol that request/response types can conform to in order to attempt to produce examples of themselves.
OpenAPIExampleProvider requires a type is
Encodableand
Sampleable` to gain automatic conformance without implementing a couple of functions yourself.
Published by mattpolzin over 4 years ago
Published by mattpolzin over 4 years ago