Created
September 14, 2018 11:16
-
-
Save piotrbrzezina/7b06f9f39c0af93b80b223b8d4c6dd60 to your computer and use it in GitHub Desktop.
Flashcard setp 5 (custom Opperation)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ... | |
/** | |
* @ApiResource( | |
* normalizationContext={"groups"={"userList"}}, | |
* denormalizationContext={"groups"={"userCreate"}}, | |
* validationGroups="userCreate", | |
* itemOperations={ | |
* "get", | |
* "put", | |
* "changePassword"={ | |
* "method"="PUT", | |
* "path"="/users/{id}/change-password", | |
* "denormalization_context"={"groups"={"userChangePassword"}}, | |
* "validation_groups"={"userChangePassword"}, | |
* "swagger_context"={ | |
* "summary" = "Change user password" | |
* } | |
* } | |
* } | |
* ) | |
*/ | |
class User implements UserInterface | |
{ | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment