How to create custom endpoint in API Platform and add it to the documentation? How to create custom endpoint in API Platform and add it to the documentation? symfony symfony

How to create custom endpoint in API Platform and add it to the documentation?


Controller:

class MyUserController extends  Controller{    public function fn_me()    {        return $this->getUser();    }}

Entity:

 * @ApiResource( *  collectionOperations={ *      "get","post", *      "collName_api_me"={"route_name"="api_me"} *  } * ) */class User implements UserInterface, \Serializable

routes.yaml

api_me:    path: '/api/me'    methods: ['GET']    defaults:        _controller: '\App\Controller\MyUserController::fn_me'        _api_resource_class: 'App\Entity\User'        _api_collection_operation_name: 'collName_api_me'