From 319b22993e739b68778424bd8f695f745f465ec1 Mon Sep 17 00:00:00 2001 From: Dimitris Zorbas Date: Tue, 10 May 2022 10:02:29 +0100 Subject: [PATCH] Format code with mix format --- lib/mix/tasks/openapi.spec.json.ex | 12 ++++++++---- lib/open_api_spex/open_api.ex | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/mix/tasks/openapi.spec.json.ex b/lib/mix/tasks/openapi.spec.json.ex index b8999e64..336cb511 100644 --- a/lib/mix/tasks/openapi.spec.json.ex +++ b/lib/mix/tasks/openapi.spec.json.ex @@ -44,9 +44,10 @@ defmodule Mix.Tasks.Openapi.Spec.Json do json_encoder = OpenApiSpex.OpenApi.json_encoder() spec = spec.spec() - json_encoding_result = spec - |> OpenApiSpex.OpenApi.to_map(vendor_extensions: vendor_extensions) - |> json_encoder.encode(pretty: pretty) + json_encoding_result = + spec + |> OpenApiSpex.OpenApi.to_map(vendor_extensions: vendor_extensions) + |> json_encoder.encode(pretty: pretty) case json_encoding_result do {:ok, json} -> @@ -71,7 +72,10 @@ defmodule Mix.Tasks.Openapi.Spec.Json do end defp parse_options(argv) do - parse_options = [strict: [spec: :string, endpoint: :string, pretty: :boolean, vendor_extensions: :boolean]] + parse_options = [ + strict: [spec: :string, endpoint: :string, pretty: :boolean, vendor_extensions: :boolean] + ] + {opts, args, _} = OptionParser.parse(argv, parse_options) %Options{ diff --git a/lib/open_api_spex/open_api.ex b/lib/open_api_spex/open_api.ex index 869cc40a..977239cf 100644 --- a/lib/open_api_spex/open_api.ex +++ b/lib/open_api_spex/open_api.ex @@ -83,7 +83,7 @@ defmodule OpenApiSpex.OpenApi do defimpl encoder do def encode(api_spec = %OpenApi{}, options) do api_spec - |> OpenApi.to_map + |> OpenApi.to_map() |> unquote(encoder).encode(options) end end