Page MenuHomePhorge

No OneTemporary

Size
714 B
Referenced Files
None
Subscribers
None
diff --git a/lib/open_api_spex/inspect/for_parameter.ex b/lib/open_api_spex/inspect/for_parameter.ex
new file mode 100644
index 0000000..e69de29
diff --git a/lib/open_api_spex/inspect/for_schema.ex b/lib/open_api_spex/inspect/for_schema.ex
new file mode 100644
index 0000000..d363528
--- /dev/null
+++ b/lib/open_api_spex/inspect/for_schema.ex
@@ -0,0 +1,16 @@
+defimpl Inspect, for: OpenApiSpex.Schema do
+ import Inspect.Algebra
+
+ def inspect(parameter, opts) do
+ map =
+ parameter
+ |> Map.from_struct()
+ |> Enum.filter(fn
+ {_key, nil} -> false
+ {_key, _value} -> true
+ end)
+ |> Map.new()
+
+ concat(["%OpenApiSpex.Schema", to_doc(map, opts)])
+ end
+end

File Metadata

Mime Type
text/x-diff
Expires
Sat, Nov 30, 3:20 PM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41488
Default Alt Text
(714 B)

Event Timeline