Skip to content

Commit

Permalink
Merge pull request #75 from tolbrino/v1.5.2/http_uri-types
Browse files Browse the repository at this point in the history
Work around unexported `http_uri:uri()` type
  • Loading branch information
andreineculau committed Feb 5, 2019
2 parents 56d41d9 + b0a3bae commit 9b0db70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/jesse.erl
Expand Up @@ -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().

Expand Down
6 changes: 4 additions & 2 deletions src/jesse_state.erl
Expand Up @@ -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) ->
Expand Down

0 comments on commit 9b0db70

Please sign in to comment.