Open API F# Parser
Simple library for parsing YAML/JSON Open API (previously called as Swagger) specification (version 3.0.1). Originally part of my type provider, but I will probably never finish it, so at least community can use part of it for own projects. :)
First install NuGet package
or using Paket
How to use
Typically, you would use some existing specification (see official examples for version 3):
open OpenAPIParser.Version3.Parser let openAPI = Document.loadFromYamlFile "mySpec.yaml"
Then you have basic F# record filled
let version = openAPI.Info.Version let title = openAPI.Info.Title let paths = openAPI.Paths ...
Please check test project for more examples.
Not all properties from 3.0.1 specification are implemented. Especially
oneOf Schema objects, which will be probably implemented in future versions. Please check Specification record definition for already implemented properties.
You know the drill. Code + Tests = Good PR. Any contribution more than welcome!