Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[PLAT-931] Add External Identities endpoints to docs #25

Merged

Conversation

Johnetordoff
Copy link
Contributor

Purpose

We have CenterForOpenScience/osf.io#8540, so we need to document it!

Changes

  • Simple textual changes
  • Rogue typo

Ticket

https://openscience.atlassian.net/projects/PLAT/issues/PLAT-931

@@ -1253,6 +1253,12 @@ paths:
/users/{user_id}/:
$ref: 'users/detail.yaml'

/users/{user_id}/identities/:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the OSF PR, it looks like this URL is /users/{uid}/settings/identities/

'200':
description: 'OK'
schema:
$ref: definition.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should reference an external identity definition. Currently the response schema implies that a fully serialized user is returned, when it's just the external identity.
screen shot 2018-08-15 at 1 24 56 pm
vs.
screen shot 2018-08-15 at 1 25 08 pm

id: q7fts

delete:
summary: Delete user's external identities
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, would suggest "Remove an external identity"

@@ -0,0 +1,96 @@
get:
summary: Retrieve user's external identities
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, would suggest "Retrieve an external identity"

@@ -0,0 +1,43 @@
get:
summary: List all user's external identities
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, would suggest "List all external identities" (the summary for listing user preprints, for example, is "List all preprints")

- Users
operationId: external_identities_detail
responses:
'200':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this return 200? Shouldn't a delete request return 204 No Content?


The returns deleted information including the external identity's name, status and id.

#### Returns
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See other delete request sections, I think this should be:

#### Returns

If the request is successful, no content is returned.


If the request is unsuccessful, a JSON object with an errors key containing information about the failure will be returned. Refer to the [list of error codes](#tag/Errors-and-Error-Codes) to understand why this request may have failed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like other sections, please add a "Permissions" section to explain that users can only delete their own identities.

@caseyrollins caseyrollins merged commit e9e464a into CenterForOpenScience:master Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants