Skip to content
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

Add support for documenting request and response cookies #592

Closed
wants to merge 2 commits into from

Conversation

clydebarrow
Copy link
Contributor

@clydebarrow clydebarrow commented Mar 7, 2019

Addresses enhancement request #306 and issue #593.

Documentation of cookies in requests and responses follows the same pattern as that already used for headers.

@pivotal-issuemaster
Copy link

@clydebarrow Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@clydebarrow Thank you for signing the Contributor License Agreement!

@clydebarrow
Copy link
Contributor Author

CheckStyle fails on my build with errors like this from test code:

RequestCookiesSnippetFailureTests.java:32: Using a static member import should be avoided - org.springframework.restdocs.cookies.CookieDocumentation.cookieWithName. [AvoidStaticImport]

But similar usage of static imports is already present, and passes checkStyle, in existing test code. I have absolutely no idea how to deal with that - is there some hidden config for checkStyle? I could only find an xml file that references an external project.

@wilkinsona
Copy link
Member

This looks great on first look, @clydebarrow. Thanks very much, particularly for adding plenty of tests and updating the docs too.

The CheckStyle config comes from Spring Java Format. Please don't worry about it for now. I can look at allowing some new static imports there in due course.

We generally try to keep diffs as clean as possible by only changing what's needed to fix an issue or implement a new feature. To that end, can you please revert the changes to build.gradle and RequestDocumentation.

Where you've added a whole new class, can you please add @since 2.1 to its javadoc. Similarly, where you've added a new method to an existing class, can you please add @since 2.1 to the method's javadoc.

@clydebarrow
Copy link
Contributor Author

@wilkinsona The changes to build.gradle were to allow the build to complete without error. I have raised an issue #593 to clarify this, and determined that only one of the changes to build.gradle was needed. I will revert the other.

@clydebarrow
Copy link
Contributor Author

repo.spring.io appears to be down right now.

@Fameing
Copy link

Fameing commented Oct 27, 2020

Are there any movements in this feature? This functionality is sorely lacking.

@wilkinsona
Copy link
Member

No, sorry. There's nothing beyond what you can see here. The plan is to include the changes proposed here in Spring REST Docs 2.1, but there's no date for that release at this time.

@wilkinsona wilkinsona changed the title Implement support for documenting request and response cookies. Add support for documenting request and response cookies Jan 11, 2022
@wilkinsona wilkinsona modified the milestones: 2.1.0-RC1, 3.0.0-M3 Mar 24, 2022
@wilkinsona wilkinsona modified the milestones: 3.0.0-M3, 3.0.0-M4 May 16, 2022
@wilkinsona
Copy link
Member

Thanks again for the contribution, @clydebarrow, and for your patience until we got this merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants