Skip to content

Commit 7dbb3ce

Browse files
authored
Merge pull request #347 from mattpolzin/even-less-breaking-inferred-addition
even less breaking by supporting a default implementation of the new inferred property.
2 parents cdcdb22 + d758f64 commit 7dbb3ce

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Sources/OpenAPIKit/Schema Object/JSONSchemaContext.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ public protocol JSONSchemaContext {
127127
var vendorExtensions: [String: AnyCodable] { get }
128128
}
129129

130+
extension JSONSchemaContext {
131+
// Default implementation to make addition of this new property which is only
132+
// supposed to be set internally a non-breaking addition.
133+
public var inferred: Bool { false }
134+
}
135+
130136
extension JSONSchema {
131137
/// The context that applies to all schemas.
132138
public struct CoreContext<Format: OpenAPIFormat>: JSONSchemaContext, Equatable {

Sources/OpenAPIKit30/Schema Object/JSONSchemaContext.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ public protocol JSONSchemaContext {
124124
var deprecated: Bool { get }
125125
}
126126

127+
extension JSONSchemaContext {
128+
// Default implementation to make addition of this new property which is only
129+
// supposed to be set internally a non-breaking addition.
130+
public var inferred: Bool { false }
131+
}
132+
127133
extension JSONSchema {
128134
/// The context that applies to all schemas.
129135
public struct CoreContext<Format: OpenAPIFormat>: JSONSchemaContext, Equatable {

0 commit comments

Comments
 (0)