There is an error in the definition of the Mocking Plugin's response.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- openapi
- Domain
- documentation
Research direction
Start with the Mocking plugin page's “Mocked responses” section and compare it with the 3.1.0.0 changelog entry. Verify the version-specific behavior for included_status_codes, random_status_code, and X-Kong-Mocking-Status-Code, then update the section so supported status codes and selection behavior are accurate, with an optional 400 or 404 example.
Written by the indexing model from the issue text.
Description
Jobs to be done (optional)
Users should be able to understand which HTTP status codes the Mocking plugin can return without needing to cross-check the plugin changelog.
Currently, the Mocking plugin page says under Mocked responses that the plugin can mock only the following responses:
200201204
However, the Mocking plugin changelog for 3.1.0.0 says that the plugin added included_status_codes, random_status_code, and support for All HTTP codes. It also says users can select a specific response with the X-Kong-Mocking-Status-Code behavioral header.
This can lead users to incorrectly conclude that the Mocking plugin cannot return 4xx or 5xx responses, even though newer versions appear to support them.
Definition of done
Update the Mocking plugin documentation so the Mocked responses section accurately reflects the current behavior.
Suggested updates:
- Clarify that the Mocking plugin supports HTTP status codes beyond
200,201, and204in supported versions. - Explain how
included_status_codesaffects which status codes can be returned. - Explain that
X-Kong-Mocking-Status-Codecan be used to request a specific status code defined in the corresponding OpenAPI operation. - Clarify any version-specific behavior, if the
200/201/204limitation applies only to older Kong Gateway versions. - Optionally add a small example showing a
404or400response in the OpenAPI spec and how to request it.
Information
Relevant docs:
- Mocking plugin page:
https://developer.konghq.com/plugins/mocking/#mocked-responses - Mocking plugin changelog
3.1.0.0:https://developer.konghq.com/plugins/mocking/changelog/#3-1-0-0
Current potentially misleading section:
The Mocking plugin can mock the following responses:
200201204
Relevant changelog information from 3.1.0.0:
- Added
included_status_codesandrandom_status_code - Added behavioral headers including
X-Kong-Mocking-Status-Code - Added support for All HTTP codes
Impact:
A user trying to use Kong Gateway as a mock server may incorrectly choose the Request Termination plugin for 4xx/5xx mocks because the Mocking plugin documentation appears to say that only 200, 201, and 204 are supported.
Due date (optional)
No specific due date.
Size
S
- Dominant language
- Ruby
- Stars
- 28
- Forks
- 121
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 290
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Kong/developer.konghq.com
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
internal product:gateway
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Kong/developer.konghq.com#7301 ·
-
user-reported
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Kong/developer.konghq.com#7179 ·
-
internal product:ai-gateway
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Kong/developer.konghq.com#7100 ·
-
Catalog: Agents GA Openinternal product:catalog release-docs
Difficulty 2/5 1-2 days Newbie friendliness 72/100
Kong/developer.konghq.com#7068 ·
All issues in Kong/developer.konghq.com
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Documentation issues Open
Difficulty 2/5 1-2 days Newbie friendliness 72/100