Skip to content

Swagger 2.0 api documentation doesn't support custom operations. #614

@samvdb

Description

@samvdb

How to reproduce:

/**
 * @ApiResource(
 *     iri="https://schema.org/Foo",
 *     itemOperations={
 *          "bar": {"route_name": "api_foo_bar", "method": "GET"},
 *          "get": {"method": "GET"}
 *     }
 *     )
 */

Expected result:

2 operations in the swagger output, currently only the GET route is outputted.

Problem:
\ApiPlatform\Core\Swagger\ApiDocumentationBuilder::getSwaggerOperation

IMO the code before the switch statement is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions