Loads an OpenAPI document from a file or a URL.
{:ok, spec} = Infusion.Spec.load("openapi.json")
{:ok, spec} = Infusion.Spec.load("https://example.com/openapi.yaml")JSON and YAML are both accepted, told apart by content rather than by file
extension. Prefer JSON when a vendor publishes both: it is about 50 times
faster to parse. YAML is read with full YAML type resolution, so true,
false and null arrive as booleans and nil (a faster YAML library was
measured returning them as strings, which silently changes meaning, e.g.
additionalProperties: "false").
Only OpenAPI 3.0 and 3.1 are supported.
Summary
Functions
Loads and checks an OpenAPI document.