Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yceruto committed Jan 6, 2024
1 parent 6082a13 commit 2f6d612
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Define your OpenAPI spec and endpoint at the same time:
```php
<?php

namespace Api\Catalog\Controller;
namespace Api\Catalog\Controller\Post;

use Api\Catalog\Model\Product;
use OpenSolid\OpenApiBundle\Attribute\Body;
Expand All @@ -35,7 +35,7 @@ class PostProductAction
#[Post('/products')]
public function __invoke(#[Body] PostProductBody $body): Product
{
return new Product($body->name);
return new Product($body->name, $body->price);
}
}
```
Expand Down

0 comments on commit 2f6d612

Please sign in to comment.