src/main/php/routing/api/Resource.php
public function jsonSerialize(): array
    {
        return [
                'name'        => $this->name,
                'methods'     => $this->requestMethods,
                'description' => $this->annotations->description(),
                'produces'    => $this->mimeTypes,
                'responses'   => $this->annotations->statusCodes(),
                'headers'     => $this->annotations->headers(),
                'parameters'  => $this->annotations->parameters(),
                'auth'        => $this->authConstraint,
                '_links'      => $this->links
        ];
    }
public function jsonSerialize(): array
    {
        return [
                'name'        => $this->name,
                'methods'     => $this->requestMethods,
                'description' => $this->annotations->description(),
                'produces'    => $this->mimeTypes,
                'responses'   => $this->annotations->statusCodes(),
                'headers'     => $this->annotations->headers(),
                'parameters'  => $this->annotations->parameters(),
                'auth'        => $this->authConstraint,
                '_links'      => $this->links
        ];
    }
public function jsonSerialize ( ) : array { return [ 'name' => $ this -> name , 'methods' => $ this -> requestMethods , 'description' => $ this -> annotations -> description ( ) , 'produces' => $ this -> mimeTypes , 'responses' => $ this -> annotations -> statusCodes ( ) , 'headers' => $ this -> annotations -> headers ( ) , 'parameters' => $ this -> annotations -> parameters ( ) , 'auth' => $ this -> authConstraint , '_links' => $ this -> links ] ; }
returns proper representation which can be serialized to JSON

@return  array
@XmlIgnore
returns proper representation which can be serialized to JSON