Skip to content

Commit

Permalink
docs/api: use {params} consistently in titles (#4426)
Browse files Browse the repository at this point in the history
Use `{db}` and `{ddoc}` consistently in paths and titles 

Authored-by: @alxndrsn
  • Loading branch information
alxndrsn committed Feb 17, 2023
1 parent 645912d commit 9f8cf48
Show file tree
Hide file tree
Showing 19 changed files with 123 additions and 121 deletions.
4 changes: 2 additions & 2 deletions src/docs/src/api/database/bulk-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,8 @@ Sending multiple queries to a database
}
.. Note::
The multiple queries are also supported in /db/_local_docs/queries and
/db/_design_docs/queries (similar to /db/_all_docs/queries).
The multiple queries are also supported in /{db}/_local_docs/queries and
/{db}/_design_docs/queries (similar to /{db}/_all_docs/queries).

.. _api/db/bulk_get:

Expand Down
6 changes: 3 additions & 3 deletions src/docs/src/api/database/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
.. _api/db/changes:

================
``/db/_changes``
================
==================
``/{db}/_changes``
==================

.. http:get:: /{db}/_changes
:synopsis: Returns changes for the given database
Expand Down
6 changes: 3 additions & 3 deletions src/docs/src/api/database/common.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
.. _api/db:

=======
``/db``
=======
=========
``/{db}``
=========

.. http:head:: /{db}
:synopsis: Checks the database existence
Expand Down
24 changes: 12 additions & 12 deletions src/docs/src/api/database/compact.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
.. _api/db/compact:

================
``/db/_compact``
================
==================
``/{db}/_compact``
==================

.. http:post:: /{db}/_compact
:synopsis: Starts a compaction for the database
Expand Down Expand Up @@ -82,9 +82,9 @@
.. _api/db/compact/ddoc:

===========================
``/db/_compact/design-doc``
===========================
=========================
``/{db}/_compact/{ddoc}``
=========================

.. http:post:: /{db}/_compact/{ddoc}
:synopsis: Starts a compaction for all the views in the selected
Expand Down Expand Up @@ -141,9 +141,9 @@

.. _api/db/ensure_full_commit:

===========================
``/db/_ensure_full_commit``
===========================
=============================
``/{db}/_ensure_full_commit``
=============================

.. http:post:: /{db}/_ensure_full_commit
:synopsis: Deprecated endpoint to support CouchDB versions < 3.0
Expand Down Expand Up @@ -196,9 +196,9 @@
.. _api/db/view_cleanup:

=====================
``/db/_view_cleanup``
=====================
=======================
``/{db}/_view_cleanup``
=======================

.. http:post:: /{db}/_view_cleanup
:synopsis: Removes view files that are not used by any design document
Expand Down
14 changes: 7 additions & 7 deletions src/docs/src/api/database/find.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.. _api/db/_find:

================
``/db/_find``
``/{db}/_find``
================

.. http:post:: /{db}/_find
Expand Down Expand Up @@ -946,7 +946,7 @@ The execution statistics currently include:
.. _api/db/find/index:

================
``/db/_index``
``/{db}/_index``
================

.. _api/db/find/index-post:
Expand Down Expand Up @@ -1166,7 +1166,7 @@ it easier to take advantage of future improvements to query planning
.. http:get:: /{db}/_index
:synopsis: List all indexes.

When you make a ``GET`` request to ``/db/_index``, you get a list of all
When you make a ``GET`` request to ``/{db}/_index``, you get a list of all
indexes in the database. In addition to the information available through
this API, indexes are also stored in design documents <index-functions>.
Design documents are regular documents that have an ID starting with
Expand All @@ -1189,7 +1189,7 @@ it easier to take advantage of future improvements to query planning
Format of index objects:
- **ddoc**: ID of the design document the index belongs to. This ID
can be used to retrieve the design document containing the index,
by making a ``GET`` request to ``/db/ddoc``, where ``ddoc`` is the
by making a ``GET`` request to ``/{db}/ddoc``, where ``ddoc`` is the
value of this field.
- **name**: Name of the index.
- **type**: Type of the index. Currently "json" is the only
Expand Down Expand Up @@ -1290,9 +1290,9 @@ it easier to take advantage of future improvements to query planning
.. _api/db/find/explain:

================
``/db/_explain``
================
==================
``/{db}/_explain``
==================

.. http:post:: /{db}/_explain
:synopsis: Identify which index is being used by a particular query.
Expand Down
4 changes: 2 additions & 2 deletions src/docs/src/api/database/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ For clarity, the form below is used in the URL paths:

.. code-block:: none
GET /db
GET /{db}
Where ``db`` is the name of any database.
Where ``{db}`` is the name of any database.

.. toctree::
common
Expand Down
26 changes: 13 additions & 13 deletions src/docs/src/api/database/misc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
.. _api/db/purge:

==============
``/db/_purge``
==============
================
``/{db}/_purge``
================

.. http:post:: /{db}/_purge
:synopsis: Purges documents entirely from database
Expand Down Expand Up @@ -178,7 +178,7 @@ following behavior:
.. _api/db/_purged_infos_limit:

==============================
``/db/_purged_infos_limit``
``/{db}/_purged_infos_limit``
==============================

.. http:get:: /{db}/_purged_infos_limit
Expand Down Expand Up @@ -274,9 +274,9 @@ following behavior:
.. _api/db/missing_revs:

=====================
``/db/_missing_revs``
=====================
=======================
``/{db}/_missing_revs``
=======================

.. http:post:: /{db}/_missing_revs
:synopsis: By given list of document revisions returns the document
Expand Down Expand Up @@ -335,9 +335,9 @@ following behavior:
.. _api/db/revs_diff:

==================
``/db/_revs_diff``
==================
====================
``/{db}/_revs_diff``
====================

.. http:post:: /{db}/_revs_diff
:synopsis: By given list of document revisions returns differences between
Expand Down Expand Up @@ -419,9 +419,9 @@ following behavior:
.. _api/db/revs_limit:

===================
``/db/_revs_limit``
===================
=====================
``/{db}/_revs_limit``
=====================

.. http:get:: /{db}/_revs_limit
:synopsis: Returns the limit of historical revisions to store for
Expand Down
6 changes: 3 additions & 3 deletions src/docs/src/api/database/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
.. _api/db/security:

=================
``/db/_security``
=================
===================
``/{db}/_security``
===================

.. http:get:: /{db}/_security
:synopsis: Returns the special security object for the database
Expand Down
14 changes: 7 additions & 7 deletions src/docs/src/api/database/shard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
.. _api/db/shards:

===============
``/db/_shards``
===============
=================
``/{db}/_shards``
=================

.. versionadded:: 2.0

Expand Down Expand Up @@ -105,7 +105,7 @@
.. _api/db/shards/doc:

==============================
``/db/_shards/doc``
``/{db}/_shards/{docid}``
==============================

.. http:get:: /{db}/_shards/{docid}
Expand Down Expand Up @@ -161,9 +161,9 @@
.. _api/db/sync_shards:

=====================
``/db/_sync_shards``
=====================
======================
``/{db}/_sync_shards``
======================

.. versionadded:: 2.3.1

Expand Down
18 changes: 9 additions & 9 deletions src/docs/src/api/ddoc/common.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
.. _api/ddoc:

==========================
``/db/_design/design-doc``
==========================
========================
``/{db}/_design/{ddoc}``
========================

.. http:head:: /{db}/_design/{ddoc}
:synopsis: Returns bare information in the HTTP Headers for
Expand Down Expand Up @@ -94,9 +94,9 @@

.. _api/ddoc/attachment:

=====================================
``/db/_design/design-doc/attachment``
=====================================
==================================
``/{db}/_design/{ddoc}/{attname}``
==================================

.. http:head:: /{db}/_design/{ddoc}/{attname}
:synopsis: Returns bare information in the HTTP Headers for the attachment
Expand Down Expand Up @@ -136,9 +136,9 @@

.. _api/ddoc/info:

================================
``/db/_design/design-doc/_info``
================================
==============================
``/{db}/_design/{ddoc}/_info``
==============================

.. http:get:: /{db}/_design/{ddoc}/_info
:synopsis: Returns view index information for the specified design document
Expand Down
36 changes: 18 additions & 18 deletions src/docs/src/api/ddoc/render.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
.. _api/ddoc/show:

==========================================
``/db/_design/design-doc/_show/show-name``
==========================================
=====================================
``/{db}/_design/{ddoc}/_show/{func}``
=====================================

.. warning::

Expand Down Expand Up @@ -76,9 +76,9 @@
.. _api/ddoc/show/id:

=================================================
``/db/_design/design-doc/_show/show-name/doc-id``
=================================================
=============================================
``/{db}/_design/{ddoc}/_show/{func}/{docid}``
=============================================

.. warning::

Expand Down Expand Up @@ -141,9 +141,9 @@
.. _api/ddoc/list:

====================================================
``/db/_design/design-doc/_list/list-name/view-name``
====================================================
============================================
``/{db}/_design/{ddoc}/_list/{func}/{view}``
============================================

.. warning::

Expand Down Expand Up @@ -212,9 +212,9 @@
.. _api/ddoc/list/ddoc:

===============================================================
``/db/_design/design-doc/_list/list-name/other-ddoc/view-name``
===============================================================
=========================================================
``/{db}/_design/{ddoc}/_list/{func}/{other-ddoc}/{view}``
=========================================================

.. warning::

Expand Down Expand Up @@ -284,9 +284,9 @@
.. _api/ddoc/update:

==============================================
``/db/_design/design-doc/_update/update-name``
==============================================
=======================================
``/{db}/_design/{ddoc}/_update/{func}``
=======================================

.. http:post:: /{db}/_design/{ddoc}/_update/{func}
:synopsis: Executes an update function against the null document
Expand Down Expand Up @@ -348,9 +348,9 @@
.. _api/ddoc/update/id:

=====================================================
``/db/_design/design-doc/_update/update-name/doc-id``
=====================================================
===============================================
``/{db}/_design/{ddoc}/_update/{func}/{docid}``
===============================================

.. http:put:: /{db}/_design/{ddoc}/_update/{func}/{docid}
:synopsis: Executes an update function against the specified document
Expand Down
2 changes: 1 addition & 1 deletion src/docs/src/api/ddoc/rewrites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.. _api/ddoc/rewrite:

========================================
``/db/_design/design-doc/_rewrite/path``
``/{db}/_design/{ddoc}/_rewrite/{path}``
========================================

.. warning::
Expand Down

0 comments on commit 9f8cf48

Please sign in to comment.