Skip to content

Commit 4007b18

Browse files
committed
WIP to update to use OpenAPIKit 4.0
1 parent c4f3f1e commit 4007b18

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ let package = Package(
4545
.package(url: "https://github.com/apple/swift-collections", from: "1.1.4"),
4646

4747
// Read OpenAPI documents
48-
.package(url: "https://github.com/mattpolzin/OpenAPIKit", from: "3.9.0"),
48+
.package(url: "https://github.com/mattpolzin/OpenAPIKit", from: "4.0.0"),
4949
.package(url: "https://github.com/jpsim/Yams", "4.0.0"..<"7.0.0"),
5050

5151
// CLI Tool

Tests/OpenAPIGeneratorCoreTests/Parser/Test_YamsParser.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ final class Test_YamsParser: Test_Core {
126126
/foo.yaml: error: Found neither a $ref nor a PathItem in Document.paths['/system'].
127127
128128
PathItem could not be decoded because:
129-
Inconsistency encountered when parsing `Vendor Extension` for the **GET** endpoint under `/system`: Found at least one vendor extension property that does not begin with the required 'x-' prefix. Invalid properties: [ resonance ]..
129+
Problem encountered when parsing `Vendor Extension` for the **GET** endpoint under `/system`: Found at least one vendor extension property that does not begin with the required 'x-' prefix. Invalid properties: [ resonance ]..
130130
"""
131131
assertThrownError(try _test(yaml), expectedDiagnostic: expected)
132132
}

Tests/OpenAPIGeneratorCoreTests/Translator/TypeAssignment/Test_TypeMatcher.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ final class Test_TypeMatcher: Test_Core {
245245
static let multipartElementTypeReferenceIfReferenceableTypes:
246246
[(UnresolvedSchema?, OrderedDictionary<String, OpenAPI.Content.Encoding>?, String?)] = [
247247
(nil, nil, nil), (.b(.string), nil, nil), (.a(.component(named: "Foo")), nil, "Foo"),
248-
(.a(.component(named: "Foo")), ["foo": .init(contentType: .json)], nil),
248+
(.a(.component(named: "Foo")), ["foo": .init(contentTypes: [.json])], nil),
249249
]
250250
func testMultipartElementTypeReferenceIfReferenceableTypes() throws {
251251
for (schema, encoding, name) in Self.multipartElementTypeReferenceIfReferenceableTypes {

Tests/OpenAPIGeneratorCoreTests/Translator/TypesTranslator/Test_translateSchemas.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ class Test_translateSchemas: Test_Core {
3535
(
3636
schemaWithWarnings,
3737
[
38-
"warning: Schema warning: Inconsistency encountered when parsing `OpenAPI Schema`: Found schema attributes not consistent with the type specified: string. Specifically, attributes for these other types: [\"array\"]. [context: codingPath=, contextString=, subjectName=OpenAPI Schema]"
38+
"warning: Schema warning: Problem encountered when parsing `OpenAPI Schema`: Found schema attributes not consistent with the type specified: string. Specifically, attributes for these other types: [\"array\"]. [context: codingPath=, contextString=, subjectName=OpenAPI Schema]"
3939
]
4040
),
4141
]
42-
4342
for (schema, diagnosticDescriptions) in cases {
4443
let collector = AccumulatingDiagnosticCollector()
4544
let translator = makeTranslator(diagnostics: collector)

0 commit comments

Comments
 (0)