mirror of
https://github.com/encounter/JSONAPI.git
synced 2026-03-30 11:18:38 -07:00
Hopefully remove some ambiguity.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user