Skip to content

Provide separate snippets for documenting query parameters and form parameters #832

Closed
@wilkinsona

Description

@wilkinsona

When REST Docs was first implemented, it only supported Spring Framework's MockMvc which is heavily Servlet based. This led to a snippet for the Servlet concept of request parameters being provided. With hindsight, this was a mistake. Request parameters are a server-side construct that provides access to parameters from the request URI's query string or from posted form data. From a client's perspective, the parameters have two separate sources and, as such, they should be documented separately in client-facing documentation. Rather than providing a snippet for request parameters, REST Docs should provide separate snippets for query parameters and form parameters.

To provide a smooth migration path from REST Docs 2.0.x to 3.0.x, the intention is to treat this as a bug. Support for documenting request parameters will be deprecated in 2.0.x and, at the same time, support for documenting query parameters and form parameters will be introduced. Then, in 3.0.x, the deprecated support for documenting request parameters will be removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementEnhancement that adds a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions