Glue Resource creates wrong method

LukasB
LukasB lukas.bruecklmeier@unic.com Posts: 29 ✨ - Novice

I'm currently creating a Backend Glue API Resource for a post, put and delete endpoint:

/**
     * {@inheritDoc}
     *
     * @api
     *
     * @return \Generated\Shared\Transfer\GlueResourceMethodCollectionTransfer
     */
    public function getDeclaredMethods(): GlueResourceMethodCollectionTransfer
    {
        return (new GlueResourceMethodCollectionTransfer())
            ->setPost(
                (new GlueResourceMethodConfigurationTransfer())
                    ->setAction('postAction'),
            )
            ->setPut(
                (new GlueResourceMethodConfigurationTransfer())
                    ->setAction('putAction'),
            )
            ->setDelete(
                (new GlueResourceMethodConfigurationTransfer())
                    ->setAction('deleteAction'),
            );
    }

However when I check the routes in the console with

glue route:debug Backend -c

I see that the PUT route is named with PUT but the method is GET:

Am I missing something or is there a bug?

Answers

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 93 🏛 - Council (mod)

    PUT method isn´t handled ( yet) by the new GlueApi. but PATCH.

  • LukasB
    LukasB lukas.bruecklmeier@unic.com Posts: 29 ✨ - Novice

    Ah! Great thanks for sharing this information @Hidran Arias :)