Skip to content

Provide a fluent API for snippet configuration #192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rhuss opened this issue Feb 3, 2016 · 1 comment
Open

Provide a fluent API for snippet configuration #192

rhuss opened this issue Feb 3, 2016 · 1 comment
Labels
type: enhancement Enhancement that adds a new feature

Comments

@rhuss
Copy link
Contributor

rhuss commented Feb 3, 2016

Since REST assured is based on a fluent API it would be awesome if Spring REST docs could provide a fluent (builder) API in addition to the varargs based approach.

(haven't looked in the Spring MVC usage pattern yet).

For example, instead of

responseFields( 
            fieldWithPath("contact").description("The user's contact details"), 
            fieldWithPath("contact.email").description("The user's email address"))

maybe sth like

request()
    .param("id","User's id")
response()
    .field("contact","The user's contact details")
    .field("contact.email","The user's email address")

Just a minor enhancement but would probably better align the paradigms. Nothing serious ;-)

@wilkinsona wilkinsona changed the title Provide a fluent API for creating the REST assured filter Provide a fluent API for snippet configuration Mar 28, 2018
@wilkinsona wilkinsona added the type: enhancement Enhancement that adds a new feature label Mar 28, 2018
@wilkinsona
Copy link
Member

I'd like to investigate this one as part of 2.1. I'm interested in what's possible with a Java 8 baseline and lambdas.

@wilkinsona wilkinsona added this to the 2.1.0.RC1 milestone Mar 28, 2018
@wilkinsona wilkinsona removed this from the 2.1.0-RC1 milestone Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Enhancement that adds a new feature
Projects
None yet
Development

No branches or pull requests

2 participants