Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

swagger.json and Postman collection are not consitent /user vs /users #380

Closed
rupertlssmith opened this issue Jun 26, 2019 · 8 comments
Closed
Labels

Comments

@rupertlssmith
Copy link

In the swagger definition, fetching the current user is done with a GET /users:

https://github.com/gothinkster/realworld/blob/master/api/swagger.json#L108

In the Postman test collection, fetching the current user is done with a GET /user:

https://github.com/gothinkster/realworld/blob/master/api/Conduit.postman_collection.json#L224

@jaguililla
Copy link

I ran into the same problem. What is the endpoint ot use?

Also, the update user allows to change the username (which can affect articles authors, etc.) and also allows you to change the token (should that be stored in any place?).

Thanks for your help!

@anishkny
Copy link
Member

Good catch. We are going with:

Get Current User - GET /api/user
Update User - PUT /api/user

See: https://github.com/gothinkster/realworld/blob/master/api/README.md#get-current-user

Feel free to send a PR to correct swagger.json

@jaguililla
Copy link

Ok. I'll do the PR :)

Could tell me if PUT is supporting all fields? For me, username and token shouldn't be changed (token is not allowed in readme, so I assume that it is wrong in the Swagger spec, right?).

Thanks again!

@anishkny
Copy link
Member

Yes. PUT user supports only email, bio, image

@jaguililla
Copy link

Done... If something is wrong tell me in #396 :)

@jaguililla
Copy link

The POST {{APIURL}}/profiles/celeb_{{USERNAME}}/follow Postman route has a body which seem redundant (as the username is already a path parameter). Would it be OK to delete the body of this request from the Postman collection?

@borovikovd
Copy link
Contributor

Hi all. Faced the same problem, the fix is here: #664

@geromegrignon
Copy link
Contributor

fixed by #664

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants