mirror of
https://github.com/encounter/JSONAPI.git
synced 2026-03-30 11:18:38 -07:00
Finish writing Date Attribute test cases and add support for Optional Date OpenAPI Node guesses.
This commit is contained in:
@@ -62,6 +62,12 @@ extension Optional: AnyJSONCaseIterable where Wrapped: CaseIterable, Wrapped: Co
|
||||
}
|
||||
}
|
||||
|
||||
extension Optional: DateOpenAPINodeType where Wrapped: DateOpenAPINodeType {
|
||||
static public func dateOpenAPINodeGuess(using encoder: JSONEncoder) -> JSONNode? {
|
||||
return Wrapped.dateOpenAPINodeGuess(using: encoder)?.optionalNode()
|
||||
}
|
||||
}
|
||||
|
||||
extension String: OpenAPINodeType {
|
||||
static public func openAPINode() throws -> JSONNode {
|
||||
return .string(.init(format: .generic,
|
||||
|
||||
Reference in New Issue
Block a user