View Source erf_parser_oas_3_0 (erf v0.1.2)

An OpenAPI Specification 3.0 erf_parser.

Summary

Functions

Parses an OpenAPI Specification 3.0 file into an API AST.

Types

-type ctx() ::
          #{base_path := binary(),
            base_name := binary(),
            namespace := binary(),
            resolved := [binary()],
            spec := spec()}.
-type spec() :: njson:t().

Functions

-spec parse(SpecPath) -> Result
               when
                   SpecPath :: binary(),
                   Result :: {ok, API} | {error, Reason},
                   API :: erf:api(),
                   Reason :: term().
Parses an OpenAPI Specification 3.0 file into an API AST.