core icon indicating copy to clipboard operation
core copied to clipboard

Swagger and custom POST operation

Open Jarablus opened this issue 10 years ago • 3 comments

` /**

  • @ApiResource(
  • collectionOperations={
    
  •     "create"={
    
  •        "path"="/customers/create",
    
  •        "method"="POST",
    
  •        "controller"="AppBundle:Customer:create",
    
  •        "hydra_context"={"@type"="hydra:Operation", "hydra:title"="Création de client", "returns"="jsonld"}
    
  •     }
    
  • },`
    

this creates two operations in doc (POST /customers and POST customer/create)

Jarablus avatar Jul 18 '16 14:07 Jarablus

Hi @napalm33700,

Thanks for testing api-platform V2.

We will be looking into this.

Simperfit avatar Jul 19 '16 11:07 Simperfit

@napalm33700 I updated the PR could you test again ?

Thank you.

Simperfit avatar Jul 27 '16 18:07 Simperfit

Sorry if I have to create a new issue for this but, do you know how I can change default parameters list for custom operation in Swagger ?

Jarablus avatar Jul 29 '16 07:07 Jarablus