Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
NebojsaStrbac997 committed May 3, 2023
1 parent cdbc987 commit 27e8035
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,22 @@ end

Also note that the examples generated with __run_test!__ are tagged with the `:rswag` so they can easily be filtered. E.g. `rspec --tag rswag`

### date-time in query parameters

Input that is being sent in querys of rspec tests is html safe. That includes date-time strings. It was solved in this [`pr`](https://github.com/rswag/rswag/pull/621). Here is an example test:

```ruby
parameter name: :date_time, in: :query, type: :string

response '200', 'blog found' do
let(:date_time) { DateTime.new(2001, 2, 3, 4, 5, 6, '-7').to_s }

run_test! do
expect(request[:path]).to eq('/blogs?date_time=2001-02-03T04%3A05%3A06-07%3A00')
end
end
```

### Strict schema validation

By default, if response body contains undocumented properties tests will pass. To keep your responses clean and validate against a strict schema definition you can set the global config option:
Expand Down

0 comments on commit 27e8035

Please sign in to comment.