VaporOpenAPI

MIT License

Stars
57

Bot releases are hidden (Show)

VaporOpenAPI - Modify `OpenAPIExampleProvider` expectation and default implementation.

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.

VaporOpenAPI - Add (some) support for OpenAPI examples

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 EncodableandSampleable` to gain automatic conformance without implementing a couple of functions yourself.

VaporOpenAPI - Update OpenAPIReflection version for bug fix.

Published by mattpolzin over 4 years ago

VaporOpenAPI - Initial Pre-release

Published by mattpolzin over 4 years ago