Skip to content

Commit 042a54a

Browse files
committed
Fix support for setting vendor extensions on JSONSchema values.
1 parent a6bc177 commit 042a54a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/OpenAPIKit/Schema Object/JSONSchema.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import OpenAPIKitCore
1313
public struct JSONSchema: JSONSchemaContext, HasWarnings {
1414

1515
public let warnings: [OpenAPI.Warning]
16-
public let value: Schema
16+
public var value: Schema
1717

1818
internal init(warnings: [OpenAPI.Warning], schema: Schema) {
1919
self.warnings = warnings
@@ -441,8 +441,8 @@ extension JSONSchema: VendorExtendable {
441441
get {
442442
coreContext.vendorExtensions
443443
}
444-
set {
445-
coreContext.vendorExtensions
444+
set(extensions) {
445+
self.value = value.with(vendorExtensions: extensions)
446446
}
447447
}
448448

0 commit comments

Comments
 (0)