apache / couchdb

Seamless multi-master syncing database with an intuitive HTTP/JSON API, designed for reliability
https://couchdb.apache.org/
Apache License 2.0
6.28k stars 1.03k forks source link

Bulk get query documentation #5242

Closed JKDingwall closed 2 months ago

JKDingwall commented 2 months ago

Overview

Update the documentation for /{db}/_bulk_get to reference the /{db}/{docid} query parameters. This code indicates that they share the same query parsing function:

 bulk_get_parse_doc_query(Req) ->
    lists:foldl(
        fun({Key, Value}, Args) ->
            ok = validate_query_param(Key),
            parse_doc_query({Key, Value}, Args)
        end,   
        #doc_query_args{},
        chttpd:qs(Req)
    ).

Related Issues or Pull Requests

Checklist

JKDingwall commented 2 months ago

I'm not sure how to test the changes to make sure that they render correctly and that the :ref:\document endpoint <api/doc>`` works as expected.

nickva commented 2 months ago

@JKDingwall thank you for your PR. It looks

To check it locally, cd src/docs and run ./setup/.sh. That should setup a python venv with all dependencies.

Then run make check to check for basic formatting issues (line lengths, empty lines), then run make html to build the html docs.

To view them locally open build/html/index.html that opens the browser (on macos at least) to the built docs page.

Your PR's result looks like this:

scr

nickva commented 2 months ago

The PR merged. Thank you for your contribution, @JKDingwall