Skip to content

Commit

Permalink
docs: fix examples for RequestBody (#2415)
Browse files Browse the repository at this point in the history
Hi,

this is my first try with this bundle and I got into an error that leads
me to a discussion on github. Following the discussion here:
#1990 (comment)
I think that the documentation should be updated to match the "content"
argument.
But maybe I've missed something else ?

Thanks !

## What type of PR is this? (check all applicable)
- [ ] Bug Fix
- [ ] Feature
- [ ] Refactor
- [ ] Deprecation
- [ ] Breaking Change
- [x] Documentation Update
- [ ] CI

## Checklist
- [x] I have made corresponding changes to the documentation (`docs/`)
- [ ] I have made corresponding changes to the changelog
(`CHANGELOG.md`)

Co-authored-by: Djordy Koert <[email protected]>
  • Loading branch information
xavierleune and DjordyKoert authored Jan 8, 2025
1 parent ff91395 commit 13408ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,10 @@ that property type to not be nullable, for example.
#[OA\Response(response: 200, content: new Model(type: UserDto::class, groups: ["default"]))]
// Similarly, this will make the username `required` in the create schema
#[OA\RequestBody(new Model(type: UserDto::class, groups: ["create"]))]
#[OA\RequestBody(content: new Model(type: UserDto::class, groups: ["create"]))]
// But for updates, the `username` property will not be required
#[OA\RequestBody(new Model(type: UserDto::class, groups: ["update"]))]
#[OA\RequestBody(content: new Model(type: UserDto::class, groups: ["update"]))]
.. tip::
Expand Down

0 comments on commit 13408ab

Please sign in to comment.