Skip to content

Add support for documenting request and response cookies - #592

Closed
clydebarrow wants to merge 2 commits into
spring-projects:mainfrom
clydebarrow:cookies
Closed

clydebarrow wants to merge 2 commits into
spring-projects:mainfrom
clydebarrow:cookies

Conversation

@clydebarrow

@clydebarrow clydebarrow commented Mar 7, 2019 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown

@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
Copy Markdown

@clydebarrow Thank you for signing the Contributor License Agreement!

@clydebarrow

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@wilkinsona wilkinsona added type: enhancement Enhancement that adds a new feature and removed status: waiting-for-triage Untriaged issue labels Mar 13, 2019
@wilkinsona wilkinsona added this to the 2.1.0.RC1 milestone Mar 13, 2019
@Fameing

Fameing commented Oct 27, 2020

Copy link
Copy Markdown

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

@wilkinsona

Copy link
Copy Markdown
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
Copy Markdown
Member

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

wilkinsona added a commit that referenced this pull request Jul 18, 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

Successfully merging this pull request may close these issues.

5 participants