Skip to content

Auto-configure Spring REST Docs to use REST Assured #9643

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

Closed
wants to merge 2 commits into from

Conversation

eddumelendez
Copy link
Contributor

See gh-7228

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 30, 2017
@eddumelendez eddumelendez force-pushed the gh-7228 branch 3 times, most recently from dd5435e to b304d85 Compare July 1, 2017 02:33
Copy link
Member

@wilkinsona wilkinsona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to the comment I left, I think it'd make sense to restructure the code a bit. I think I'd keep RestDocsAutoConfiguration, and then use inner classes for the MockMvc- and REST Assured-specific configuration.

What do you think, @eddumelendez? If my proposed changes make sense to you, do you have time to make them?

@Configuration
@ConditionalOnClass({ RequestSpecification.class, RestAssuredRestDocumentation.class })
@EnableConfigurationProperties
public class RestAssuredAutoConfiguration {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't feel quite right to me, particularly the name. It's not general purpose auto-configured for REST Assured so I think it might be better if it were named RestDocsRestAssuredAutoConfiguration.

@eddumelendez
Copy link
Contributor Author

@wilkinsona thanks for feedback. I have applied the changes and rebase my branch. Now, all checks passed ok.

@wilkinsona wilkinsona changed the title Add support to RestDocs to work with ResAssured Auto-configure Spring REST Docs to use REST Assured Jul 3, 2017
@philwebb philwebb added type: enhancement A general enhancement priority: normal and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 5, 2017
@philwebb philwebb added this to the 2.0.0.M4 milestone Jul 5, 2017
@wilkinsona
Copy link
Member

Thanks for yet another contribution, @eddumelendez. I've merged this into master.

wilkinsona added a commit that referenced this pull request Sep 25, 2017
* gh-9643:
  Polish "Add auto-configuration for REST Docs with REST Assured"
  Add auto-configuration for REST Docs with REST Assured
@eddumelendez eddumelendez deleted the gh-7228 branch January 17, 2018 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants