hashicorp / hashicorp/consul

http api /v1/kv/ should check true value for the parameter "recurse"

Open
#12,958 3 comments 0 reactions 0 assignees View on GitHub
theme/kv type/docs
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

#### Overview of the Issue

According to [consul doc on kv API](https://www.consul.io/api-docs/kv),

> If the [recurse](https://www.consul.io/api-docs/kv#recurse) or [keys](https://www.consul.io/api-docs/kv#keys) query parameters are true, this endpoint will return an array of keys

However, the implementation does recurse if `recurse` exists.

https://github.com/hashicorp/consul/blob/474385d153e21203c190d1292e039af0852ee5b0/agent/kvs_endpoint.go#L56-L57

Should check the value of the parameter instead of its existence.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.