Skip to content

Commit

Permalink
CBG-4369-add-api-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
torcolvin committed Nov 21, 2024
1 parent 8b8b03d commit 9508e2c
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/api/components/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,13 @@ show_exp:
schema:
type: boolean
description: Whether to show the expiry property (`_exp`) in the response.
show_cv:
name: show_cv
in: query
required: false
schema:
type: boolean
description: Output the current version of the version vector in the response as property `_cv`.
startkey:
name: startkey
in: query
Expand Down
2 changes: 2 additions & 0 deletions docs/api/components/responses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ all-docs:
properties:
rev:
type: string
cv:
type: string
uniqueItems: true
total_rows:
type: number
Expand Down
1 change: 1 addition & 0 deletions docs/api/paths/admin/keyspace-_all_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ get:
- $ref: ../../components/parameters.yaml#/startkey
- $ref: ../../components/parameters.yaml#/endkey
- $ref: ../../components/parameters.yaml#/limit-result-rows
- $ref: ../../components/parameters.yaml#/show_cv
responses:
'200':
$ref: ../../components/responses.yaml#/all-docs
Expand Down
1 change: 1 addition & 0 deletions docs/api/paths/admin/keyspace-_bulk_get.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ post:
description: If this header includes `gzip` then the the HTTP response will be compressed. This takes priority over `X-Accept-Part-Encoding`. Only part compression will be done if `X-Accept-Part-Encoding=gzip` and the `User-Agent` is below 1.2 due to clients not being able to handle full compression.
schema:
type: string
- $ref: ../../components/parameters.yaml#/show_cv
requestBody:
content:
application/json:
Expand Down
2 changes: 2 additions & 0 deletions docs/api/paths/admin/keyspace-docid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ get:
- $ref: ../../components/parameters.yaml#/rev
- $ref: ../../components/parameters.yaml#/open_revs
- $ref: ../../components/parameters.yaml#/show_exp
- $ref: ../../components/parameters.yaml#/show_cv
- $ref: ../../components/parameters.yaml#/revs_from
- $ref: ../../components/parameters.yaml#/atts_since
- $ref: ../../components/parameters.yaml#/revs_limit
Expand Down Expand Up @@ -52,6 +53,7 @@ get:
- Bob
_id: AliceSettings
_rev: 1-64d4a1f179db5c1848fe52967b47c166
_cv: 1@src
'400':
$ref: ../../components/responses.yaml#/invalid-doc-id
'404':
Expand Down
1 change: 1 addition & 0 deletions docs/api/paths/public/keyspace-_all_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ get:
- $ref: ../../components/parameters.yaml#/startkey
- $ref: ../../components/parameters.yaml#/endkey
- $ref: ../../components/parameters.yaml#/limit-result-rows
- $ref: ../../components/parameters.yaml#/show_cv
responses:
'200':
$ref: ../../components/responses.yaml#/all-docs
Expand Down
1 change: 1 addition & 0 deletions docs/api/paths/public/keyspace-_bulk_get.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ post:
description: If this header includes `gzip` then the the HTTP response will be compressed. This takes priority over `X-Accept-Part-Encoding`. Only part compression will be done if `X-Accept-Part-Encoding=gzip` and the `User-Agent` is below 1.2 due to clients not being able to handle full compression.
schema:
type: string
- $ref: ../../components/parameters.yaml#/show_cv
requestBody:
content:
application/json:
Expand Down
5 changes: 5 additions & 0 deletions docs/api/paths/public/keyspace-docid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ get:
- $ref: ../../components/parameters.yaml#/rev
- $ref: ../../components/parameters.yaml#/open_revs
- $ref: ../../components/parameters.yaml#/show_exp
- $ref: ../../components/parameters.yaml#/show_cv
- $ref: ../../components/parameters.yaml#/revs_from
- $ref: ../../components/parameters.yaml#/atts_since
- $ref: ../../components/parameters.yaml#/revs_limit
Expand All @@ -39,13 +40,17 @@ get:
_rev:
description: The revision ID of the document.
type: string
_cv:
description: The current version of version vector of the document.
type: string
additionalProperties: true
example:
FailedLoginAttempts: 5
Friends:
- Bob
_id: AliceSettings
_rev: 1-64d4a1f179db5c1848fe52967b47c166
_cv: 1@src
'400':
$ref: ../../components/responses.yaml#/invalid-doc-id
'404':
Expand Down

0 comments on commit 9508e2c

Please sign in to comment.