我有这样的事情:
/**
* @ORM/Entity
* @ApiResource(
* itemOperations={
* "put_cancel": {
* "method": "PUT",
* "path": "/task/{id}/cancel",
* "messenger": "input",
* "input": CancelTaskCommand::class,
* "output": false
* },
* }
* )
*/
class Foo {}
Run Code Online (Sandbox Code Playgroud)
取消FooCommand.php
final class CancelFooCommand
{
/**
* @var string
* @ApiProperty(
* identifier=true,
* )
*/
public string $id = '';
/**
* @var string
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type": "string"
* }
* }
* )
*/
public string $note …Run Code Online (Sandbox Code Playgroud)