Skip to content

Commit e67ed45

Browse files
committed
docs: content quality checks
Signed-off-by: Artemis Lavasa <[email protected]>
1 parent 83f8c92 commit e67ed45

16 files changed

+62
-66
lines changed

spec/components/securitySchemes/Access Token.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ type: apiKey
22
in: query
33
name: access_token
44
description: >
5-
> Your access token will allow you to use the service in the same way in which
6-
you may use it if you log in on the web portal. You will have the same
7-
permissions unless specified otherwise creation of the token. This implies
5+
> Your access token will allow you to use the service in the same way you would
6+
use it through the web portal. You will have the same
7+
permissions unless specified otherwise during the creation of the token. This implies
88
that anyone who has this token can log in as yourself to the service. Do not
9-
share your personal access token with anyone else, and only use it with HTTPS!
9+
share your personal access token with anyone else, and only use it with HTTPS.
1010
1111
1212
To get an access token, you will need to log in on the web portal and [create

spec/openapi.yaml

+13-15
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,24 @@ openapi: 3.0.0
22
info:
33
version: 1.0.0
44
title: CERN Analysis Preservation REST API
5-
termsOfService: 'https://analysispreservation.cern.ch/terms/'
65
contact:
76
8-
url: 'https://analysispreservation.cern.ch/about'
9-
license:
10-
name: Apache 2.0
11-
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
7+
url: 'https://analysispreservation.cern.ch'
128
x-logo:
139
url: >-
1410
https://github.com/cernanalysispreservation/cap-api-docs/raw/master/web/CAP_API_docs.png
1511
description: >
12+
13+
CERN Analysis Preservation (CAP) is a service developed at the European Organization for Nuclear Research (CERN) to support researchers in preserving and documenting the various components of their physics analyses, so that they are reusable and understandable in the future.
14+
1615
CERN Analysis Preservation offers a REST API to access the service
1716
independently from the web interface. This allows users to automate specific
1817
tasks or create their own data interface, using simple HTTP calls.
1918
2019
2120
# Introduction
2221
23-
CERN Analysis Preservation provides a RESTful API, built on HTTP. It tries
24-
to provide a predictable interface, that includes:
22+
CERN Analysis Preservation provides a RESTful API, built on HTTP. It provides a predictable interface, that includes:
2523
2624
* resource URLs,
2725
@@ -33,8 +31,8 @@ info:
3331
You can use your favorite HTTP/REST library for your programming language to
3432
use CAP's API, or you can use one of our SDKs (CLI clients), currently
3533
available in Python. Every action from our app is implemented using REST
36-
endpoints, all of which are documented and available, in order to bea easily
37-
accessible for automations and integrations into specific workflowsor
34+
endpoints, all of which are documented and available, in order to be easily
35+
accessible for automations and integrations into specific workflows or
3836
data-related apps.
3937
4038
@@ -54,21 +52,21 @@ info:
5452
5553
<!-- ReDoc-Inject: <security-definitions> -->
5654
externalDocs:
57-
description: Click here if you are looking for our developement documentation.
55+
description: Click here if you are looking for our development documentation.
5856
url: 'https://cernanalysispreservation.readthedocs.io'
5957
tags:
6058
- name: Deposits
61-
description: The Deposit resource is used for uploading and editing records on CAP
59+
description: The Deposit resource is used for uploading and editing records on CAP.
6260
- name: Records
6361
description: >
6462
The Record resource is used for fetching and searching published records
6563
on CAP. Create deposit
6664
- name: Files
6765
description: >
68-
The Files resource is used for uploading files and attach them to
69-
records/deposits
66+
The Files resource is used for uploading files and attachinging them to
67+
records/deposits.
7068
71-
The following type of upload are possible:
69+
The following types of uploads are possible:
7270
* Local files
7371
* Git repos
7472
* URL linked files
@@ -81,7 +79,7 @@ tags:
8179
- name: Services
8280
description: Operations about services
8381
- name: User
84-
description: Operations about user
82+
description: Operations about users
8583
security:
8684
- Access Token: []
8785
servers:

spec/paths/deposits.yaml

+4-6
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ post:
66
77
88
> JSON Schemas and analysis types (`$ana_type`) depend on the access rights
9-
you have and mainly\
10-
11-
correspond to the CERN collaboration you are part of (***ALICE, ATLAS, CMS,
9+
you have and mainly correspond to the CERN collaboration you are part of (***ALICE, ATLAS, CMS,
1210
LHCb***).\
1311
14-
To get the list of available schemas you can call the
12+
To get the list of available schemas you can call the
1513
tags:
1614
- Deposits
1715
requestBody:
@@ -59,8 +57,8 @@ post:
5957
get:
6058
summary: List all deposits/drafts
6159
description: >-
62-
List all deposits for the currently authenticated user. At least `read`
63-
access is needed to query a record
60+
List all deposits for the currently authenticated user.
61+
> At least `read` access is needed to query a record.
6462
tags:
6563
- Deposits
6664
parameters:

spec/paths/deposits@{depid}.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ get:
1111
- Deposits
1212
summary: Get deposit by ID
1313
description: |
14-
Retrieve a deposit/draft resource by the `deposit_id`
15-
> You need to have at least 'read' access
14+
Retrieve a deposit/draft resource using `deposit_id`.
15+
> You need to have at least 'read' access.
1616
operationId: get_deposit
1717
responses:
1818
'200':
@@ -34,7 +34,7 @@ put:
3434
tags:
3535
- Deposits
3636
summary: Update a deposit
37-
description: Update a deposit/draft resource
37+
description: Update a deposit/draft resource.
3838
operationId: depositUpdate
3939
requestBody:
4040
content:
@@ -45,8 +45,8 @@ put:
4545
title: My new title
4646
abstract: Already commited/saved abstract desciption
4747
description: |
48-
A JSON object that will replace the `metadata` field of the resource
49-
> It should validate against the specified `$schema` of the resource
48+
A JSON object that will replace the `metadata` field of the resource.
49+
> It should validate against the specified `$schema` of the resource.
5050
required: true
5151
responses:
5252
'200':
@@ -70,7 +70,7 @@ patch:
7070
- Deposits
7171
summary: Patch a deposit
7272
description: >
73-
Update a deposit/draft resource with a [JSON Patch](http://jsonpatch.com/)
73+
Update a deposit/draft resource with a [JSON Patch](http://jsonpatch.com/).
7474
7575
7676
### What is JSON Patch?
@@ -87,7 +87,7 @@ patch:
8787
8888
8989
JSON Patch is specified in [RFC 6902](http://tools.ietf.org/html/rfc6902)
90-
from the IETF.
90+
by the IETF.
9191
9292
9393
### Simple example
@@ -135,9 +135,9 @@ patch:
135135
value: Gen Test
136136
description: >
137137
A [JSON Patch](http://jsonpatch.com/) object that will update/patch on top
138-
of the `metadata` of the resource
138+
of the `metadata` of the resource.
139139
140-
> It should validate against the specified `$schema` of the resource
140+
> It should validate against the specified `$schema` of the resource.
141141
required: true
142142
responses:
143143
'200':

spec/paths/deposits@{depid}@[email protected]

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ post:
1111
- Deposits
1212
summary: Clone/duplicate a draft
1313
description: |
14-
Retrieve a draft records by the `deposit_id`
15-
> You need to have at least 'read' access
14+
Retrieve a draft record using `deposit_id`.
15+
> You need to have at least 'read' access.
1616
operationId: cloneDeposit
1717
responses:
1818
'200':

spec/paths/deposits@{depid}@[email protected]

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ parameters:
99
post:
1010
tags:
1111
- Deposits
12-
summary: Edit published deposit
12+
summary: Edit a published deposit
1313
description: >
1414
To be able to **edit** an already `published` deposit, you should first
1515
change it's status to `draft`. Only then you can
1616
[update](#operation/depositUpdate) or [patch](#operation/depositPatch)
17-
depending on your needs
17+
depending on your needs.
1818
operationId: editDeposit
1919
responses:
2020
'200':

spec/paths/deposits@{depid}@[email protected]

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ post:
1111
- Deposits
1212
summary: Add/remove permissions
1313
description: |
14-
Add or remove `user` and `e-group` access to the resource
15-
> You need to have 'admin' rights for the deposit to change permissions
14+
Add or remove `user` and `e-group` access for a resource.
15+
> You need to have 'admin' rights for the deposit to be able to change permissions.
1616
operationId: permissionsDeposit
1717
responses:
1818
'200':

spec/paths/deposits@{depid}@[email protected]

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ post:
1212
summary: Publish to collaboration
1313
description: >
1414
Create a new version of the document and make it public to your
15-
collaboration
15+
collaboration.
1616
operationId: publishDeposit
1717
responses:
1818
'200':

spec/paths/deposits@{depid}@[email protected]

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ post:
2626
summary: Upload files/data
2727
description: |
2828
Upload files/data to your analysis, in a specified deposit record.
29-
The following type of uploads are possible:
29+
The following types of uploads are possible:
3030
* Local files
3131
* Git repos
3232
* URL linked files
3333
3434
The API differentiates between whole repos (saved as .tar) and single files
35-
from repos, so the parameter "type" is necessary.
35+
from repos, so the parameter `type` is necessary.
3636
operationId: uploadDeposit
3737
responses:
3838
'200':

spec/paths/deposits@{depid}@files.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ get:
1111
- Deposits
1212
summary: Get deposit files
1313
description: |
14-
Retrieve all files that are associated with the draft record
14+
Retrieve all files that are associated with a draft record.
1515
responses:
1616
'200':
1717
description: List of files
@@ -28,10 +28,10 @@ get:
2828
post:
2929
tags:
3030
- Deposits
31-
summary: Upload local files
31+
summary: Upload local files.
3232
description: |
33-
Retrieve a draft records by the `deposit_id`
34-
> You need to have at least 'read' access
33+
Retrieve a draft record using `deposit_id`
34+
> You need to have at least 'read' access.
3535
operationId: filesDeposit
3636
responses:
3737
'200':

spec/paths/jsonschemas.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ get:
33
- JSON Schemas
44
summary: Get a list of available JSON Schemas
55
description: >-
6-
List of the available JSON schemas. They can be used to create an analysis
7-
record
6+
List of the available JSON Schemas. They can be used to create an analysis
7+
record.
88
operationId: getJSONSchemas
99
responses:
1010
'200':
@@ -26,11 +26,11 @@ get:
2626
post:
2727
tags:
2828
- JSON Schemas
29-
summary: Create a new JSON Schemas
29+
summary: Create a new JSON schema
3030
description: >
31-
Create a new JSON schemas. Add your customized schemas for records and
31+
Create a new JSON Schema. Add your customized schemas for records and
3232
deposits, your corresponding UI form options and ES search mapping for
33-
better indexing
33+
better indexing.
3434
operationId: createJSONSchemas
3535
requestBody:
3636
content:
@@ -41,7 +41,7 @@ post:
4141
simple:
4242
$ref: '#/components/examples/JSONSchemaResource'
4343
description: |
44-
A JSON object that will populate the `Schema` resource
44+
A JSON object that will populate the `Schema` resource.
4545
required: true
4646
responses:
4747
'200':

spec/paths/jsonschemas@{name}.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ get:
99
tags:
1010
- JSON Schemas
1111
summary: Get latest version by name
12-
description: Retrieve the latest JSON Schemas for the specified `name`
12+
description: Retrieve the latest JSON Schema for a specified `name`.
1313
operationId: getLatestByName
1414
responses:
1515
'200':

spec/paths/jsonschemas@{name}@{version}.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ get:
1515
tags:
1616
- JSON Schemas
1717
summary: Get schema by name and version
18-
description: Retrieve the latest JSON Schemas for the specified `name`
18+
description: Retrieve the latest JSON Schemas for a specified `name` and `version`.
1919
operationId: getSchemaByNameAndVersion
2020
responses:
2121
'200':
@@ -35,11 +35,11 @@ get:
3535
put:
3636
tags:
3737
- JSON Schemas
38-
summary: Update schemas for a specific name and version
38+
summary: Update schemas for a specific name and version,
3939
description: >
40-
Create a new JSON schemas. Add your customized schemas for records and
40+
Create a new JSON Schema. Add your customized schemas for records and
4141
deposits, your corresponding UI form options and ES search mapping for
42-
better indexing
42+
better indexing.
4343
operationId: updateSchemaByNameAndVersion
4444
requestBody:
4545
content:
@@ -50,8 +50,8 @@ put:
5050
title: My new title
5151
abstract: Already commited/saved abstract desciption
5252
description: |
53-
A JSON object that will replace the `metadata` field of the resource
54-
> It should validate against the specified `$schema` of the resource
53+
A JSON object that will replace the `metadata` field of the resource.
54+
> It should validate against the specified `$schema` of the resource.
5555
required: true
5656
responses:
5757
'200':
@@ -72,7 +72,7 @@ delete:
7272
tags:
7373
- JSON Schemas
7474
summary: Remove schemas for a specific name and version
75-
description: Remove schemas for a specific name and version
75+
description: Remove schemas for a specific name and version.
7676
operationId: deleteSchemaByNameAndVersion
7777
responses:
7878
'200':

spec/paths/records.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ get:
88
- Search
99
summary: Retrieve a list of records
1010
description: >-
11-
Query published records (You need to have at least 'read' access to query
12-
them)
11+
Query published records.
12+
> You need to have at least 'read' access to query them.
1313
operationId: get_records
1414
parameters:
1515
- $ref: '#/components/parameters/query'
@@ -57,7 +57,7 @@ post:
5757
tags:
5858
- Records
5959
summary: Create a record
60-
description: Create a record
60+
description: Create a record.
6161
operationId: create_record
6262
responses:
6363
'200':

spec/paths/users@{username}.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ get:
4141
put:
4242
tags:
4343
- User
44-
summary: Updated user
44+
summary: Update user
4545
description: This can only be done by the logged in user.
4646
operationId: updateUser
4747
parameters:

spec/paths/workflows@reana@all@record@{pid}.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ get:
44
tags:
55
- Workflows
66
summary: Get all the workflows
7-
description: Get all the workflows (created and deleted) from the user
7+
description: Get all the workflows (created and deleted) from the user.
88
operationId: reana_workflow_all
99
responses:
1010
'200':

0 commit comments

Comments
 (0)