OpenAPICompiler (openapi_compiler v1.0.0-beta.15) View Source

Generate OpenAPI Generator from OpenAPI 3.0 Yaml / JSON

Parameters

  • yml_path - Yaml Location Path
  • json_path - JSON Location Path
  • server - Server to choose (by description; required when >= 2 servers)

Examples

Using Yml File

defmodule Acme.PetStore do
  use OpenAPICompiler,
    yml_path: Application.app_dir(:acme_petstore, "priv/openapi.yml")
    #...
end

Using JSON File

defmodule Acme.PetStore do
  use OpenAPICompiler,
    json_path: Application.app_dir(:acme_petstore, "priv/openapi.json")
    #...
end