Skip to content

[WIP] Documentation for reviews #71

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions swagger-spec/preprint_providers/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ properties:
type: boolean
readOnly: true
description: 'Whether or not redirects are enabled for the provider''s domain.'
reviews_workflow:
type: string
readOnly: false
description: 'The workflow used for reviewing/moderating preprints, if any. Valid values: "pre-moderation", "post-moderation"'
reviews_comments_anonymous:
type: boolean
readOnly: false
description: 'Whether comments on submissions made by moderators are visible to preprint authors.'
reviews_workflow:
type: string
readOnly: false
description: 'If comments are not private, whether the commenting moderator''s name is visible to preprint authors.'
relationships:
type: object
title: Relationships
Expand Down
58 changes: 58 additions & 0 deletions swagger-spec/preprint_providers/detail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ get:
example: khbvy
name: Open Science Framework
domain: 'osf.io'
reviews_workflow: null
reviews_comments_private: true
reviews_comments_anonymous: true
type: preprint_providers
id: osf
links:
Expand All @@ -125,3 +128,58 @@ get:
meta:
total: 5
per_page: 10

patch:
summary: Update a preprint provider
description: >-
Updates the specified preprint provider by setting the values of the parameters passed.
Any parameters not provided will be left unchanged.


Currently, the only parameters which may be set are `reviews_workflow`,
`reviews_comments_private`, and `reviews_comments_anonymous`. These parameters may be set
only once, after which they may be updated only by an OSF Admin.

#### Returns

Returns a JSON object with a `data` key containing the new representation of the updated
provider, if the request is successful.


If the request is unsuccessful, an `errors` key containing
information about the failure will be returned. Refer to the [list of error codes]()
to understand why this request may have failed.


If `reviews_workflow` is already non-null, attempting to update the provider will return
a `409` Conflict error. If you need to change your provider's moderation settings, contact
[[email protected]](mailto:[email protected]) for help.

parameters:
- in: path
type: string
required: true
name: preprint_provider_id
description: 'The unique identifier of the provider.'
- in: body
required: true
name: data
schema:
type: object
example:
data:
id: '{preprint_provider_id}'
attributes:
reviews_workflow: 'pre-moderation'
reviews_comments_private: false
reviews_comments_anonymous: true

tags:
- Preprint Providers
operationId: preprint_provider_partial_update
consumes:
- application/json
x-response-schema: 'Preprint Provider'
responses:
'200':
description: 'OK'