fabbricadigitale / scimd

SCIM v2 golang implementation
MIT License
5 stars 1 forks source link

Create successfully calls don't return the newly created resource #59

Closed alelb closed 6 years ago

alelb commented 6 years ago

When a new resource is created, an HTTP response is returned with HTTP status code 201 (Created). There isn't the newly created resource in the body of the response.

We want to fix that? @leodido @samechelon @leogr

leodido commented 6 years ago

What RFC mandates?

alelb commented 6 years ago

Here's a reference about resource creating.

Same question about replacing with PUT response. Here's a ref about update with PUT.

alelb commented 6 years ago

It's a good flow choise to return always the resource created/updated.

Do we have to reload resource at api or storage level? @leodido

leogr commented 6 years ago
When the service provider successfully creates the new resource, an
   HTTP response SHALL be returned with HTTP status code 201 (Created).
   The response body SHOULD contain the service provider's
   representation of the newly created resource.

I suggest to fetch the resource after its insertion here, then it can be returned within the response's body.

alelb commented 6 years ago

:+1: