OpenAPIv3Validator.validate
You're seeing just the function
validate
, go back to OpenAPIv3Validator module for more information.
tests an input on whether it's compliant to the OpenAPIv3 spec, returning the errors, if any
Examples
iex> %{} |> OpenAPIv3Validator.validate()
{:error, [{"Required properties openapi, info, paths were not present.", "#"}]}
iex> spec =%{
iex> "openapi" => "3.0.0",
iex> "paths" => %{},
iex> "info" => %{"title" => "Valid OpenAPIv3 spec", "version" => "1.0.0"}
iex> }
iex> spec |> OpenAPIv3Validator.validate()
:ok