refactor(schema): add args to map alias
This commit is contained in:
parent
8be718b22f
commit
06e440260f
|
@ -108,7 +108,7 @@ http_common_fields() ->
|
|||
).
|
||||
|
||||
headers(type) ->
|
||||
typerefl:alias("map", list({binary(), binary()}));
|
||||
typerefl:alias("map", list({binary(), binary()}), #{}, [binary(), binary()]);
|
||||
headers(desc) ->
|
||||
?DESC(?FUNCTION_NAME);
|
||||
headers(converter) ->
|
||||
|
@ -121,7 +121,7 @@ headers(_) ->
|
|||
undefined.
|
||||
|
||||
headers_no_content_type(type) ->
|
||||
typerefl:alias("map", list({binary(), binary()}));
|
||||
typerefl:alias("map", list({binary(), binary()}), #{}, [binary(), binary()]);
|
||||
headers_no_content_type(desc) ->
|
||||
?DESC(?FUNCTION_NAME);
|
||||
headers_no_content_type(converter) ->
|
||||
|
|
|
@ -865,7 +865,8 @@ typename_to_spec("bytesize()", _Mod) ->
|
|||
#{type => string, example => <<"32MB">>};
|
||||
typename_to_spec("wordsize()", _Mod) ->
|
||||
#{type => string, example => <<"1024KB">>};
|
||||
typename_to_spec("map()", _Mod) ->
|
||||
typename_to_spec("map(" ++ Map, _Mod) ->
|
||||
[$) | _MapArgs] = lists:reverse(Map),
|
||||
#{type => object, example => #{}};
|
||||
typename_to_spec("service_account_json()", _Mod) ->
|
||||
#{type => object, example => #{}};
|
||||
|
|
|
@ -57,7 +57,7 @@ fields("prometheus") ->
|
|||
)},
|
||||
{headers,
|
||||
?HOCON(
|
||||
typerefl:alias("map", list({string(), string()})),
|
||||
typerefl:alias("map", list({string(), string()}), #{}, [string(), string()]),
|
||||
#{
|
||||
default => #{},
|
||||
required => false,
|
||||
|
|
Loading…
Reference in New Issue