fix: authn bad examples
This commit is contained in:
parent
9ef1795985
commit
bf827cffa8
|
@ -1412,6 +1412,9 @@ authenticator_examples() ->
|
||||||
|
|
||||||
status_metrics_example() ->
|
status_metrics_example() ->
|
||||||
#{
|
#{
|
||||||
|
status_metrics => #{
|
||||||
|
summary => <<"Authn status metrics">>,
|
||||||
|
value => #{
|
||||||
metrics => #{
|
metrics => #{
|
||||||
matched => 0,
|
matched => 0,
|
||||||
success => 0,
|
success => 0,
|
||||||
|
@ -1440,6 +1443,8 @@ status_metrics_example() ->
|
||||||
status => connected
|
status => connected
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
}.
|
}.
|
||||||
|
|
||||||
request_user_create_examples() ->
|
request_user_create_examples() ->
|
||||||
|
|
|
@ -109,10 +109,7 @@ schema_with_example(Type, Example) ->
|
||||||
|
|
||||||
-spec(schema_with_examples(hocon_schema:type(), map()) -> hocon_schema:field_schema_map()).
|
-spec(schema_with_examples(hocon_schema:type(), map()) -> hocon_schema:field_schema_map()).
|
||||||
schema_with_examples(Type, Examples) ->
|
schema_with_examples(Type, Examples) ->
|
||||||
%% Swagger can dynamically distinguish if there are multiple examples.
|
hoconsc:mk(Type, #{examples => #{<<"examples">> => Examples}}).
|
||||||
%% But explicitly declaring examples as plural
|
|
||||||
%% may cause some example structures to be incorrectly identified.
|
|
||||||
schema_with_example(Type, Examples).
|
|
||||||
|
|
||||||
-spec(error_codes(list(atom())) -> hocon_schema:fields()).
|
-spec(error_codes(list(atom())) -> hocon_schema:fields()).
|
||||||
error_codes(Codes) ->
|
error_codes(Codes) ->
|
||||||
|
|
Loading…
Reference in New Issue