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

Generate OpenAPI Generator from OpenAPI 3.0 Yaml / JSON

parameters

Parameters

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

examples

Examples

using-yml-file

Using Yml File

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

using-json-file

Using JSON File

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