Work around unexported http_uri:uri() type

This prevents warnings when an application passes the `unknown` option to
Dialyzer and depends on `jesse`.
This commit is contained in:
Luca Favatella 2018-02-23 10:12:31 +00:00 committed by Tino Breddin
parent 9126f3db67
commit b0a3baef2a
2 changed files with 6 additions and 3 deletions

View File

@ -77,7 +77,8 @@
-type schema() :: json_term().
-type schema_id() :: http_uri:uri() | undefined.
-type http_uri_uri() :: string() | unicode:unicode_binary(). %% From https://github.com/erlang/otp/blob/OTP-20.2.3/lib/inets/doc/src/http_uri.xml#L57
-type schema_id() :: http_uri_uri() | undefined.
-type schema_ref() :: binary().

View File

@ -276,10 +276,12 @@ load_local_schema(Schema, [Key | Keys]) ->
end
end.
-type http_uri_uri() :: string() | unicode:unicode_binary(). %% From https://github.com/erlang/otp/blob/OTP-20.2.3/lib/inets/doc/src/http_uri.xml#L57
%% @doc Resolve a new id
%% @private
-spec combine_id(undefined | http_uri:uri(),
undefined | string() | binary()) -> http_uri:uri().
-spec combine_id(undefined | http_uri_uri(),
undefined | string() | binary()) -> http_uri_uri().
combine_id(Id, undefined) ->
Id;
combine_id(Id, RefBin) ->