Skip to content
Merged
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
2 changes: 1 addition & 1 deletion db/attachment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ func TestMigrateBodyAttachments(t *testing.T) {
defer db.Close(ctx)
collection, ctx := GetSingleDatabaseCollectionWithUser(ctx, t, db)

// Update the doc with a the same body as rev 3-a, and make sure attachments are migrated.
// Update the doc with the same body as rev 3-a, and make sure attachments are migrated.
newBody := Body{
"test": true,
BodyRev: "3-a",
Expand Down
2 changes: 0 additions & 2 deletions docs/api/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,6 @@ tags:
description: Create and manage database users and roles
- name: Session
description: Manage user sessions
- name: OpenID Connect
description: Manage OpenID Connect
- name: Document
description: Create and manage documents and attachments
- name: Replication
Expand Down
4 changes: 2 additions & 2 deletions docs/api/components/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ Retrieved-replication:
- localWins
- custom
custom_conflict_resolver:
description: "This specifies the Javascript function to use to resolve conflicts between conflicting revisions.\n \nThis **must** be used when `conflict_resolution_type=custom`. This property will be ignored when `conflict_resolution_type` is not `custom`.\n\nThe Javascript function to provide this property should be in backticks (like the sync function). The function takes 1 parameter which is a struct that represents the conflict. This struct has 2 properties:\n* `LocalDocument` - The local document. This contains the document ID under the `_id` key.\n* `RemoteDocument` - The remote document\nThe function should return the new documents body. This can be the winning revision (for example, `return conflict.LocalDocument`), a new body, or `nil` to resolve as a delete.\n\nExample:\n```\n\"custom_conflict_resolver\":\\`\n\tfunction(conflict) {\n\t\tconsole.log(\"Doc ID: \"+conflict.LocalDocument._id);\n\t\tconsole.log(\"Full remote doc: \"+JSON.stringify(conflict.RemoteDocument));\n\t\treturn conflict.RemoteDocument;\n\t}\n\\`\n```\n\nUsing complex `custom_conflict_resolver` functions can noticeably degrade performance. Use a built-in resolver whenever possible.\n\nThis is an Enterprise Edition only feature.\n"
description: "This specifies the Javascript function to use to resolve conflicts between conflicting revisions.\n \nThis **must** be used when `conflict_resolution_type=custom`. This property will be ignored when `conflict_resolution_type` is not `custom`.\n\nThe Javascript function to provide this property should be in backticks (like the sync function). The function takes 1 parameter which is a struct that represents the conflict. This struct has 2 properties:\n* `LocalDocument` - The local document. This contains the document ID under the `_id` key.\n* `RemoteDocument` - The remote document\nThe function should return the new document's body. This can be the winning revision (for example, `return conflict.LocalDocument`), a new body, or `nil` to resolve as a delete.\n\nExample:\n```\n\"custom_conflict_resolver\":\\`\n\tfunction(conflict) {\n\t\tconsole.log(\"Doc ID: \"+conflict.LocalDocument._id);\n\t\tconsole.log(\"Full remote doc: \"+JSON.stringify(conflict.RemoteDocument));\n\t\treturn conflict.RemoteDocument;\n\t}\n\\`\n```\n\nUsing complex `custom_conflict_resolver` functions can noticeably degrade performance. Use a built-in resolver whenever possible.\n\nThis is an Enterprise Edition only feature.\n"
type: string
default: none
purge_on_removal:
Expand Down Expand Up @@ -925,7 +925,7 @@ Replication:
- localWins
- custom
custom_conflict_resolver:
description: "This specifies the Javascript function to use to resolve conflicts between conflicting revisions.\n \nThis **must** be used when `conflict_resolution_type=custom`. This property will be ignored when `conflict_resolution_type` is not `custom`.\n\nThe Javascript function to provide this property should be in backticks (like the sync function). The function takes 1 parameter which is a struct that represents the conflict. This struct has 2 properties:\n* `LocalDocument` - The local document. This contains the document ID under the `_id` key.\n* `RemoteDocument` - The remote document\nThe function should return the new documents body. This can be the winning revision (for example, `return conflict.LocalDocument`), a new body, or `nil` to resolve as a delete.\n\nExample:\n```\n\"custom_conflict_resolver\":\\`\n\tfunction(conflict) {\n\t\tconsole.log(\"Doc ID: \"+conflict.LocalDocument._id);\n\t\tconsole.log(\"Full remote doc: \"+JSON.stringify(conflict.RemoteDocument));\n\t\treturn conflict.RemoteDocument;\n\t}\n\\`\n```\n\nUsing complex `custom_conflict_resolver` functions can noticeably degrade performance. Use a built-in resolver whenever possible.\n\nThis is an Enterprise Edition only feature.\n"
description: "This specifies the Javascript function to use to resolve conflicts between conflicting revisions.\n \nThis **must** be used when `conflict_resolution_type=custom`. This property will be ignored when `conflict_resolution_type` is not `custom`.\n\nThe Javascript function to provide this property should be in backticks (like the sync function). The function takes 1 parameter which is a struct that represents the conflict. This struct has 2 properties:\n* `LocalDocument` - The local document. This contains the document ID under the `_id` key.\n* `RemoteDocument` - The remote document\nThe function should return the new document's body. This can be the winning revision (for example, `return conflict.LocalDocument`), a new body, or `nil` to resolve as a delete.\n\nExample:\n```\n\"custom_conflict_resolver\":\\`\n\tfunction(conflict) {\n\t\tconsole.log(\"Doc ID: \"+conflict.LocalDocument._id);\n\t\tconsole.log(\"Full remote doc: \"+JSON.stringify(conflict.RemoteDocument));\n\t\treturn conflict.RemoteDocument;\n\t}\n\\`\n```\n\nUsing complex `custom_conflict_resolver` functions can noticeably degrade performance. Use a built-in resolver whenever possible.\n\nThis is an Enterprise Edition only feature.\n"
type: string
default: none
purge_on_removal:
Expand Down
2 changes: 1 addition & 1 deletion docs/api/paths/admin/db-_compact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ post:
- $ref: ../../components/parameters.yaml#/compact-type
- name: action
in: query
description: Defines whether the a compact operation is being started or stopped.
description: Defines whether the compact operation is being started or stopped.
schema:
type: string
default: start
Expand Down
2 changes: 1 addition & 1 deletion docs/api/paths/admin/db-_ensure_full_commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
parameters:
- $ref: ../../components/parameters.yaml#/db
post:
summary: '/{db}/_ensure_full_commit'
summary: Ensure Full Commit
description: |-
This endpoint is non-functional but is present for CouchDB compatibility.

Expand Down
14 changes: 0 additions & 14 deletions docs/api/paths/admin/db-_replication-.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,3 @@ post:
tags:
- Replication
operationId: post_db-_replication-
head:
summary: /{db}/_replication/
responses:
'200':
description: OK
'404':
description: Not Found
tags:
- Replication
description: |-
Required Sync Gateway RBAC roles:

* Sync Gateway Replicator
operationId: head_db-_replication-
14 changes: 0 additions & 14 deletions docs/api/paths/admin/db-_replicationStatus-.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,3 @@ get:
tags:
- Replication
operationId: get_db-_replicationStatus-
head:
summary: /{db}/_replicationStatus/
responses:
'200':
description: OK
'400':
description: Bad Request
tags:
- Replication
description: |-
Required Sync Gateway RBAC roles:

* Sync Gateway Replicator
operationId: head_db-_replicationStatus-
10 changes: 0 additions & 10 deletions docs/api/paths/admin/db-_session.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,3 @@ post:
tags:
- Session
operationId: post_db-_session
head:
summary: /{db}/_session
responses:
'200':
description: OK
'404':
$ref: ../../components/responses.yaml#/Not-found
tags:
- Session
operationId: head_db-_session
16 changes: 0 additions & 16 deletions docs/api/paths/admin/db-_user-.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,3 @@ post:
tags:
- Database Security
operationId: post_db-_user-
head:
summary: /{db}/_user/
responses:
'200':
description: OK
'404':
$ref: ../../components/responses.yaml#/Not-found
tags:
- Database Security
description: |-
Required Sync Gateway RBAC roles:

* Sync Gateway Architect
* Sync Gateway Application
* Sync Gateway Application Read Only
operationId: head_db-_user-
27 changes: 0 additions & 27 deletions docs/api/paths/admin/keyspace-_all_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,30 +77,3 @@ post:
tags:
- Document
operationId: post_keyspace-_all_docs
head:
summary: /{db}/_all_docs
responses:
'200':
description: OK
'400':
$ref: ../../components/responses.yaml#/request-problem
'404':
$ref: ../../components/responses.yaml#/Not-found
tags:
- Document
parameters:
- $ref: ../../components/parameters.yaml#/include_docs
- $ref: ../../components/parameters.yaml#/Include-channels
- $ref: ../../components/parameters.yaml#/include-access
- $ref: ../../components/parameters.yaml#/include-revs
- $ref: ../../components/parameters.yaml#/include-seqs
- $ref: ../../components/parameters.yaml#/keys
- $ref: ../../components/parameters.yaml#/startkey
- $ref: ../../components/parameters.yaml#/endkey
- $ref: ../../components/parameters.yaml#/limit-result-rows
description: |-
Required Sync Gateway RBAC roles:

* Sync Gateway Application
* Sync Gateway Application Read Only
operationId: head_keyspace-_all_docs
17 changes: 0 additions & 17 deletions docs/api/paths/admin/keyspace-_changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,20 +176,3 @@ post:
tags:
- Database Management
operationId: post_keyspace-_changes
head:
summary: /{db}/_changes
responses:
'200':
description: OK
'400':
description: Bad Request
'404':
description: Not Found
tags:
- Database Management
description: |-
Required Sync Gateway RBAC roles:

* Sync Gateway Application
* Sync Gateway Application Read Only
operationId: head_keyspace-_changes
23 changes: 3 additions & 20 deletions docs/api/paths/admin/keyspace-_raw-docid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ parameters:
get:
summary: Get a document with the corresponding metadata
description: |-
Returns the a documents latest revision with its metadata.
Returns a document's latest revision with its metadata.

Note: The direct use of this endpoint is unsupported. The sync metadata is maintained internally by Sync Gateway and its structure can change. It should not be used to drive business logic of applications since the response to the `/{db}/_raw/{id}` endpoint can change at any time.

Expand All @@ -23,7 +23,7 @@ get:
- $ref: ../../components/parameters.yaml#/include_doc
- name: redact
in: query
description: This redacts sensitive parts of the response. Cannot be used when `include_docs=true`
description: This redacts sensitive parts of the response. Cannot be used when `include_doc=true`
schema:
type: boolean
responses:
Expand Down Expand Up @@ -72,7 +72,7 @@ get:
description: The document CAS (Concurrent Document Mutations) number used for document locking.
type: string
value_crc32c:
description: The documents CRC32 number.
description: The document's CRC32 number.
type: string
channel_set:
description: The channels the document has been in.
Expand Down Expand Up @@ -112,20 +112,3 @@ get:
tags:
- Document
operationId: get_keyspace-_raw-docid
head:
summary: /{keyspace}/_raw/{docid}
responses:
'200':
description: Document exists
'400':
$ref: ../../components/responses.yaml#/request-problem
'404':
$ref: ../../components/responses.yaml#/Not-found
tags:
- Document
description: |-
Required Sync Gateway RBAC roles:

* Sync Gateway Application
* Sync Gateway Application Read Only
operationId: head_keyspace-_raw-docid
9 changes: 0 additions & 9 deletions docs/api/paths/common/_ping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,3 @@ get:
tags:
- Server
operationId: get__ping
head:
responses:
'200':
description: Server is available
tags:
- Server
summary: Check if API is available
description: Returns OK status if API is available.
operationId: head__ping
2 changes: 1 addition & 1 deletion docs/api/paths/public/db-_ensure_full_commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
parameters:
- $ref: ../../components/parameters.yaml#/db
post:
summary: '/{db}/_ensure_full_commit'
summary: Ensure Full Commit
description: This endpoint is non-functional but is present for CouchDB compatibility.
responses:
'201':
Expand Down
10 changes: 0 additions & 10 deletions docs/api/paths/public/db-_session.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,3 @@ delete:
tags:
- Session
operationId: delete_db-_session
head:
summary: /{db}/_session
responses:
'200':
description: OK
'404':
$ref: ../../components/responses.yaml#/Not-found
tags:
- Session
operationId: head_db-_session
23 changes: 0 additions & 23 deletions docs/api/paths/public/keyspace-_all_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,3 @@ post:
tags:
- Document
operationId: post_keyspace-_all_docs
head:
summary: /{db}/_all_docs
responses:
'200':
description: OK
'400':
$ref: ../../components/responses.yaml#/request-problem
'404':
$ref: ../../components/responses.yaml#/Not-found
tags:
- Document
parameters:
- $ref: ../../components/parameters.yaml#/include_docs
- $ref: ../../components/parameters.yaml#/Include-channels
- $ref: ../../components/parameters.yaml#/include-access
- $ref: ../../components/parameters.yaml#/include-revs
- $ref: ../../components/parameters.yaml#/include-seqs
- $ref: ../../components/parameters.yaml#/keys
- $ref: ../../components/parameters.yaml#/startkey
- $ref: ../../components/parameters.yaml#/endkey
- $ref: ../../components/parameters.yaml#/limit-result-rows
description: ''
operationId: head_keyspace-_all_docs
13 changes: 0 additions & 13 deletions docs/api/paths/public/keyspace-_changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,3 @@ post:
tags:
- Database Management
operationId: post_keyspace-_changes
head:
summary: /{db}/_changes
responses:
'200':
description: OK
'400':
description: Bad Request
'404':
description: Not Found
tags:
- Database Management
description: ''
operationId: head_keyspace-_changes
Loading