Get rid of OpenAPI namespace because a compiler bug was making it more hassle than it was worth.

This commit is contained in:
Mathew Polzin
2019-01-14 23:46:39 -08:00
parent cb04a01e71
commit 3a0ede2372
8 changed files with 119 additions and 90 deletions
@@ -11,7 +11,7 @@ private protocol _Optional {}
extension Optional: _Optional {}
extension Attribute: OpenAPINodeType where RawValue: OpenAPINodeType {
static public var openAPINode: OpenAPI.JSONNode {
static public var openAPINode: JSONNode {
// If the RawValue is not required, we actually consider it
// nullable. To be not required is for the Attribute itself
// to be optional.
@@ -23,7 +23,7 @@ extension Attribute: OpenAPINodeType where RawValue: OpenAPINodeType {
}
extension TransformedAttribute: OpenAPINodeType where RawValue: OpenAPINodeType {
static public var openAPINode: OpenAPI.JSONNode {
static public var openAPINode: JSONNode {
// If the RawValue is not required, we actually consider it
// nullable. To be not required is for the Attribute itself
// to be optional.
@@ -37,7 +37,7 @@ extension TransformedAttribute: OpenAPINodeType where RawValue: OpenAPINodeType
extension ToOneRelationship: OpenAPINodeType {
// TODO: const for json `type`
// TODO: metadata & links
static public var openAPINode: OpenAPI.JSONNode {
static public var openAPINode: JSONNode {
let nullable = Identifiable.self is _Optional.Type
return .object(.init(format: .generic,
required: true),
@@ -60,7 +60,7 @@ extension ToOneRelationship: OpenAPINodeType {
extension ToManyRelationship: OpenAPINodeType {
// TODO: const for json `type`
// TODO: metadata & links
static public var openAPINode: OpenAPI.JSONNode {
static public var openAPINode: JSONNode {
return .object(.init(format: .generic,
required: true),
.init(properties: [