Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #120

Merged
merged 1 commit into from
May 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

* Big refactoring
* Start to respect $schema
* Add posibility of adding validators for different schemas
* Add possibility of adding validators for different schemas


## 1.0.0
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Let's now change the value of the field "a" to a boolean
[<<"a">>]}]}
```

we stil got only two errors.
we still got only two errors.

Let's try using 'infinity' as the argument for the `allowed_errors` option

Expand Down Expand Up @@ -258,7 +258,7 @@ Value, Path}` where
* Schema is the part of the schema where validation failed
* ErrorType is the type of error, usually an atom such as `wrong_type`,
`not_in_range` or `no_match`
* Value is The part of the value where failed validation agains Schema
* Value is The part of the value where failed validation against Schema
* Path is a path to where validation failed within the original value. The path
is a list of property names and zero-based array indices referencing the
properties and array items within a JSON document; e.g. in the JSON document
Expand Down
4 changes: 2 additions & 2 deletions src/jesse.erl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ add_schema(Key, Schema) ->
jesse_database:add(Key, Schema, ValidationFun).

%% @doc Equivalent to `add_schema/2', but `Schema' is a binary string, and
%% the third agument is a parse function to convert the binary string to
%% the third argument is a parse function to convert the binary string to
%% a supported internal representation of json.
-spec add_schema( Key :: string()
, Schema :: binary()
Expand Down Expand Up @@ -224,7 +224,7 @@ validate(Schema, Data, Options) ->
validate_with_schema(Schema, Data) ->
validate_with_schema(Schema, Data, []).

%% @doc Validates json `Data' agains the given schema `Schema', using `Options'.
%% @doc Validates json `Data' against the given schema `Schema', using `Options'.
%% If the given json is valid, then it is returned to the caller, otherwise
%% an error with an appropriate error reason is returned. If the `parser_fun'
%% option is provided, then both `Schema' and `Data' are considered to be a
Expand Down
2 changes: 1 addition & 1 deletion src/jesse_error.erl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

%% @doc Implements the default error handler.
%% If the length of `ErrorList' exceeds `AllowedErrors' then the function
%% throws an exeption, otherwise adds a new element to the list and returs it.
%% throws an exception, otherwise adds a new element to the list and returns it.
-spec default_error_handler( Error :: error_reason()
, ErrorList :: [error_reason()]
, AllowedErrors :: jesse:allowed_errors()
Expand Down
2 changes: 1 addition & 1 deletion src/jesse_lib.erl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ re_options() ->
%% will be no differences between objects that contain one of those
%% lists with the same elements but in different order. Lists for
%% which order is relevant, e.g. JSON arrays, keep their original
%% order and will be considered diffferent if the order is different.
%% order and will be considered different if the order is different.
-spec normalize_and_sort(Value :: any()) -> any().
normalize_and_sort(Value) ->
normalize_and_sort_check_object(Value).
Expand Down
2 changes: 1 addition & 1 deletion test/Emakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%% This Emakefile is called by common test during `rebar ct`
%% and it defines 'COMMON_TEST' macro to conditionaly compile
%% and it defines 'COMMON_TEST' macro to conditionally compile
%% module, which uses maps syntax.
%% This one required because common test doesn't respect rebar's
%% `platform_define` option.
Expand Down
2 changes: 1 addition & 1 deletion test/jesse_schema_validator_tests.erl
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ map_data_test_draft(URI) ->
},
%% XXX: order of errors isn't guaranteed
%% In case of future fails it can be replaced with manual catching and sorting
%% of throwed error list, then checked using ?assertMatch
%% of thrown error list, then checked using ?assertMatch
?assertThrow([ { data_invalid
, {[{<<"type">>, <<"object">>} | _ ]}
, wrong_type
Expand Down