Hopefully remove some ambiguity.

This commit is contained in:
Mathew Polzin
2019-01-24 19:09:46 -08:00
parent 2b59f54067
commit 5ea83b07c1
2 changed files with 5 additions and 11 deletions
@@ -19,7 +19,7 @@ public protocol OpenAPINodeType {
/// Anything conforming to `OpenAPIEncodedNodeType` can provide an
/// OpenAPI schema representing itself but it may need an Encoder
/// to do its job.
public protocol OpenAPIEncodedNodeType: OpenAPINodeType {
public protocol OpenAPIEncodedNodeType {
static func openAPINode(using encoder: JSONEncoder) throws -> JSONNode
}
@@ -29,12 +29,6 @@ extension OpenAPIEncodedNodeType where Self: Sampleable, Self: Encodable {
}
}
extension OpenAPIEncodedNodeType {
public static func openAPINode() throws -> JSONNode {
return try openAPINode(using: JSONEncoder())
}
}
/// Anything conforming to `RawOpenAPINodeType` can provide an
/// OpenAPI schema representing itself. This second protocol is
/// necessary so that one type can conditionally provide a