This OpenAPI 3.0 implementation is incomplete and it does NOT support tags, callbacks & some other things.
SwiftOAPI support SPM. You've to add to
Package.swift file information about SwiftOAPI. Here's an example.
let package = Package( name: "YourApp", dependencies: [ .package(url: "https://github.com/alxdrlitreev/swift-oapi-generator.git") ], targets: [ .target(name: "YourApp", dependencies: ["SwiftOAPI"]), .testTarget(name: "YourAppTests", dependencies: ["YourApp"]) ] )
SwiftOAPIParser is main class which is responsible for parsing information about our API structure and generating corresponding Swift structures.
let jsonString = <...> // Retrieve OpenAPI JSON from your API provider let openAPIObject = try! SwiftOAPIParser().parseJSON(from: jsonString)
This code and tool is under the MIT Licence. See the
LICENCE file in this repository.
|Last commit: 6 weeks ago|