Skip to content

Commit

Permalink
Update README wrt dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dgutov committed Mar 22, 2024
1 parent 9c770e6 commit 4762ffe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2089,9 +2089,9 @@ end

### Using `dry-validation` or `dry-schema`

As an alternative to the `params` DSL described above, you can use a schema or `dry-validation` contract to describe an endpoint's parameters. This can be especially useful if you use the above already in some other parts of your application.
As an alternative to the `params` DSL described above, you can use a schema or `dry-validation` contract to describe an endpoint's parameters. This can be especially useful if you use the above already in some other parts of your application. If not, you'll need to add `dry-validation` or `dry-schema` to your `Gemfile`.

Call `contract` with a contract or schema defined previously
Then call `contract` with a contract or schema defined previously

```rb
contract CreateFoosSchema
Expand All @@ -2108,7 +2108,7 @@ contract do
end
```

The latter will define a coercing schema (`Dry::Schema.Params`). With the former syntax it's up to you to decide whether the input will need coercing.
The latter will define a coercing schema (`Dry::Schema.Params`). When using the former approach, it's up to you to decide whether the input will need coercing.

`params` and `contract` declarations can also be used together, e.g. to describe different parts of a nested namespace for an endpoint.

Expand Down

0 comments on commit 4762ffe

Please sign in to comment.