Skip to content

Commit 709cabb

Browse files
committed
Update config for Redocly from sync_gateway source
This will update x-internal settings. via #781 and discussion with @torcolvin
1 parent 7bfb90e commit 709cabb

File tree

10 files changed

+1810
-510
lines changed

10 files changed

+1810
-510
lines changed

modules/ROOT/assets/attachments/bundled-admin.yaml

Lines changed: 203 additions & 110 deletions
Large diffs are not rendered by default.

modules/ROOT/assets/attachments/bundled-metric.yaml

Lines changed: 68 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ openapi: 3.0.3
22
info:
33
title: Sync Gateway
44
description: Sync Gateway manages access and synchronization between Couchbase Lite and Couchbase Server
5-
version: 3.1.0
5+
version: 3.2.0
66
license:
77
name: Business Source License 1.1 (BSL)
88
url: https://github.com/couchbase/sync_gateway/blob/master/LICENSE
@@ -19,9 +19,39 @@ servers:
1919
hostname:
2020
description: The hostname to use
2121
default: localhost
22+
tags:
23+
- name: Prometheus
24+
description: Endpoints for use with Prometheus
25+
externalDocs:
26+
description: Sync Gateway Quickstart | Couchbase Docs
27+
url: https://docs.couchbase.com/sync-gateway/current/index.html
2228
paths:
23-
/_metrics:
29+
/_ping:
2430
get:
31+
summary: Check if API is available
32+
description: Returns OK status if API is available.
33+
responses:
34+
'200':
35+
description: Returned status
36+
content:
37+
text/plain:
38+
schema:
39+
type: string
40+
example: OK
41+
tags:
42+
- Server
43+
operationId: get__ping
44+
head:
45+
responses:
46+
'200':
47+
description: Server is available
48+
tags:
49+
- Server
50+
summary: Check if API is available
51+
description: Returns OK status if API is available.
52+
operationId: head__ping
53+
/_metrics:
54+
get: &ref_0
2555
summary: Debugging/monitoring runtime stats in Prometheus Exposition format
2656
description: |-
2757
Returns Sync Gateway statistics and other runtime variables in Prometheus Exposition format.
@@ -40,7 +70,9 @@ paths:
4070
type: string
4171
tags:
4272
- Prometheus
43-
operationId: get__metrics
73+
operationId: get_metrics
74+
/metrics:
75+
get: *ref_0
4476
/_expvar:
4577
get:
4678
summary: Get all Sync Gateway statistics
@@ -61,7 +93,7 @@ paths:
6193
application/javascript:
6294
schema:
6395
type: object
64-
properties: &ref_0
96+
properties: &ref_1
6597
cmdline:
6698
description: Built-in variables from the Go runtime, lists the command-line arguments
6799
type: object
@@ -151,42 +183,72 @@ paths:
151183
properties:
152184
admin_net_bytes_recv:
153185
type: integer
186+
description: The total number of bytes received (since node start-up) on the network interface to which the Sync Gateway api.admin_interface is bound.
154187
admin_net_bytes_sent:
155188
type: integer
189+
description: The total number of bytes sent (since node start-up) on the network interface to which the Sync Gateway api.admin_interface is bound.
156190
error_count:
157191
type: integer
192+
description: The total number of errors logged.
158193
go_memstats_heapalloc:
159194
type: integer
195+
description: HeapAlloc is bytes of allocated heap objects. Allocated heap objects include all reachable objects, as well as unreachable objects that the garbage collector has not yet freed. Specifically, HeapAlloc increases as heap objects are allocated and decreases as the heap is swept and unreachable objects are freed. Sweeping occurs incrementally between GC cycles, so these two processes occur simultaneously, and as a result HeapAlloc tends to change smoothly (in contrast with the sawtooth that is typical of stop-the-world garbage collectors).
160196
go_memstats_heapidle:
161197
type: integer
198+
description: HeapIdle is bytes in idle (unused) spans. Idle spans have no objects in them. These spans could be (and may already have been) returned to the OS, or they can be reused for heap allocations, or they can be reused as stack memory. HeapIdle minus HeapReleased estimates the amount of memory that could be returned to the OS, but is being retained by the runtime so it can grow the heap without requesting more memory from the OS. If this difference is significantly larger than the heap size, it indicates there was a recent transient spike in live heap size.
162199
go_memstats_heapinuse:
163200
type: integer
201+
description: HeapInuse is bytes in in-use spans. In-use spans have at least one object in them. These spans an only be used for other objects of roughly the same size. HeapInuse minus HeapAlloc estimates the amount of memory that has been dedicated to particular size classes, but is not currently being used. This is an upper bound on fragmentation, but in general this memory can be reused efficiently.
164202
go_memstats_heapreleased:
165203
type: integer
204+
description: HeapReleased is bytes of physical memory returned to the OS. This counts heap memory from idle spans that was returned to the OS and has not yet been reacquired for the heap.
166205
go_memstats_pausetotalns:
167206
type: integer
207+
description: PauseTotalNs is the cumulative nanoseconds in GC stop-the-world pauses since the program started. During a stop-the-world pause, all goroutines are paused and only the garbage collector can run.
168208
go_memstats_stackinuse:
169209
type: integer
210+
description: StackInuse is bytes in stack spans. In-use stack spans have at least one stack in them. These spans can only be used for other stacks of the same size. There is no StackIdle because unused stack spans are returned to the heap (and hence counted toward HeapIdle).
170211
go_memstats_stacksys:
171212
type: integer
213+
description: StackSys is bytes of stack memory obtained from the OS. StackSys is StackInuse, plus any memory obtained directly from the OS for OS thread stacks (which should be minimal).
172214
go_memstats_sys:
173215
type: integer
216+
description: Sys is the total bytes of memory obtained from the OS. Sys is the sum of the XSys fields below. Sys measures the virtual address space reserved by the Go runtime for the heap, stacks, and other internal data structures. It's likely that not all of the virtual address space is backed by physical memory at any given moment, though in general it all was at some point.
174217
goroutines_high_watermark:
175218
type: integer
219+
description: Peak number of go routines since process start.
176220
num_goroutines:
177221
type: integer
178-
process_cpu_percent_utilization:
222+
description: The total number of goroutines.
223+
num_idle_kv_ops:
179224
type: integer
225+
description: The total number of idle kv operations.
226+
process_cpu_percent_utilization:
227+
type: number
228+
format: float
229+
description: The CPU utilization as percentage value * 10. The extra 10 multiplier is a mistake left for backwards compatibility. Please consider using node_cpu_percent_utilization as of version 3.2. The CPU usage calculation is performed based on user and system CPU time, but it does not include components such as iowait. The derivation means that the values of process_cpu_percent_utilization and %Cpu, returned when running the top command, will differ.
230+
node_cpu_percent_utilization:
231+
type: number
232+
format: float
233+
description: The node CPU utilization as percentage value, since the last time this stat was called. The CPU usage calculation is performed based on user and system CPU time, but it does not include components such as iowait.
180234
process_memory_resident:
181235
type: integer
236+
description: The memory utilization (Resident Set Size) for the process, in bytes.
182237
pub_net_bytes_recv:
183238
type: integer
239+
description: The total number of bytes received (since node start-up) on the network interface to which the Sync Gateway api.public_interface is bound. By default, that is the number of bytes received on 127.0.0.1:4984 since node start-up
184240
pub_net_bytes_sent:
185241
type: integer
242+
description: The total number of bytes sent (since node start-up) on the network interface to which Sync Gateway api.public_interface is bound. By default, that is the number of bytes sent on 127.0.0.1:4984 since node start-up.
186243
system_memory_total:
187244
type: integer
245+
description: The total memory available on the system in bytes.
188246
warn_count:
189247
type: integer
248+
description: The total number of warnings logged.
249+
uptime:
250+
type: integer
251+
description: The total uptime.
190252
per_db:
191253
description: |-
192254
This array contains stats for all databases declared in the config file -- see the [Sync Gateway Statistics Schema](./../stats-monitoring.html) for more details on the metrics collected and reported by Sync Gateway.
@@ -262,14 +324,8 @@ paths:
262324
type: integer
263325
deprecated: true
264326
operationId: get__expvar
265-
tags:
266-
- name: Prometheus
267-
description: Endpoints for use with Prometheus
268-
externalDocs:
269-
description: Sync Gateway Quickstart | Couchbase Docs
270-
url: https://docs.couchbase.com/sync-gateway/current/index.html
271327
components:
272328
schemas:
273329
ExpVars:
274330
type: object
275-
properties: *ref_0
331+
properties: *ref_1

modules/ROOT/assets/attachments/bundled-public.yaml

Lines changed: 46 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ openapi: 3.0.3
22
info:
33
title: Sync Gateway
44
description: Sync Gateway manages access and synchronization between Couchbase Lite and Couchbase Server
5-
version: 3.1.0
5+
version: 3.2.0
66
license:
77
name: Business Source License 1.1 (BSL)
88
url: https://github.com/couchbase/sync_gateway/blob/master/LICENSE
@@ -19,6 +19,26 @@ servers:
1919
hostname:
2020
description: The hostname to use
2121
default: localhost
22+
tags:
23+
- name: Server
24+
description: Manage server activities
25+
- name: Database Management
26+
description: Create and manage Sync Gateway databases
27+
- name: Session
28+
description: Manage user sessions
29+
- name: Authentication
30+
description: Manage OpenID Connect Authentication
31+
- name: Document
32+
description: Create and manage documents
33+
- name: Document Attachment
34+
description: Create and manage document attachments
35+
- name: Replication
36+
description: Create and manage inter-Sync Gateway replications
37+
- name: Unsupported
38+
description: Endpoints that are not supported by Sync Gateway
39+
externalDocs:
40+
description: Sync Gateway Quickstart | Couchbase Docs
41+
url: https://docs.couchbase.com/sync-gateway/current/index.html
2242
paths:
2343
/{db}/_session:
2444
parameters:
@@ -362,6 +382,30 @@ paths:
362382
summary: Check if server online
363383
description: Check if the server is online by checking the status code of response.
364384
operationId: head_-
385+
/_ping:
386+
get:
387+
summary: Check if API is available
388+
description: Returns OK status if API is available.
389+
responses:
390+
'200':
391+
description: Returned status
392+
content:
393+
text/plain:
394+
schema:
395+
type: string
396+
example: OK
397+
tags:
398+
- Server
399+
operationId: get__ping
400+
head:
401+
responses:
402+
'200':
403+
description: Server is available
404+
tags:
405+
- Server
406+
summary: Check if API is available
407+
description: Returns OK status if API is available.
408+
operationId: head__ping
365409
/{keyspace}/:
366410
parameters:
367411
- name: keyspace
@@ -414,7 +458,7 @@ paths:
414458
type: string
415459
_exp:
416460
description: |-
417-
Expiry time after which the document will be purged. The expiration time is set and managed on the Couchbase Server document. The value can be specified in two ways; in ISO-8601 format, for example the 6th of July 2022 at 17:00 in the BST timezone would be `2016-07-06T17:00:00+01:00`; it can also be specified as a numeric Couchbase Server expiry value. Couchbase Server expiries are specified as Unix time, and if the desired TTL is below 30 days then it can also represent an interval in seconds from the current time (for example, a value of 5 will remove the document 5 seconds after it is written to Couchbase Server). The document expiration time is returned in the response of `GET /{db}/{doc} ` when `show_exp=true` is included in the query.
461+
Expiry time after which the document will be purged. The expiration time is set and managed on the Couchbase Server document. The value can be specified in two ways; in ISO-8601 format, for example the 6th of July 2022 at 17:00 in the BST timezone would be `2016-07-06T17:00:00+01:00`; it can also be specified as a numeric Couchbase Server expiry value. Couchbase Server expiry values are specified as Unix time, and if the desired TTL is below 30 days then it can also represent an interval in seconds from the current time (for example, a value of 5 will remove the document 5 seconds after it is written to Couchbase Server). The document expiration time is returned in the response of `GET /{db}/{doc} ` when `show_exp=true` is included in the query.
418462
419463
As with the existing explicit purge mechanism, this applies only to the local database; it has nothing to do with replication. This expiration time is not propagated when the document is replicated. The purge of the document does not cause it to be deleted on any other database.
420464
type: string
@@ -2881,26 +2925,6 @@ paths:
28812925
tags:
28822926
- Replication
28832927
operationId: get_db-_blipsync
2884-
tags:
2885-
- name: Server
2886-
description: Manage server activities
2887-
- name: Database Management
2888-
description: Create and manage Sync Gateway databases
2889-
- name: Session
2890-
description: Manage user sessions
2891-
- name: Authentication
2892-
description: Manage OpenID Connect Authentication
2893-
- name: Document
2894-
description: Create and manage documents
2895-
- name: Document Attachment
2896-
description: Create and manage document attachments
2897-
- name: Replication
2898-
description: Create and manage inter-Sync Gateway replications
2899-
- name: Unsupported
2900-
description: Endpoints that are not supported by Sync Gateway
2901-
externalDocs:
2902-
description: Sync Gateway Quickstart | Couchbase Docs
2903-
url: https://docs.couchbase.com/sync-gateway/current/index.html
29042928
components:
29052929
parameters:
29062930
db:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
7.3.0

0 commit comments

Comments
 (0)