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

Support Spring REST Docs 3.0.0 #211

Open
vtscotty opened this issue Oct 28, 2022 · 8 comments
Open

Support Spring REST Docs 3.0.0 #211

vtscotty opened this issue Oct 28, 2022 · 8 comments

Comments

@vtscotty
Copy link

As documented here (spring-projects/spring-restdocs#832), the org.springframework.restdocs.request.RequestParametersSnippet has been broken down into QueryParametersSnippet and FormParametersSnippet as part of Spring Boot 3.0.0-RC1.

Error while running gradle test

org/springframework/restdocs/request/RequestParametersSnippet
java.lang.NoClassDefFoundError: org/springframework/restdocs/request/RequestParametersSnippet
	at com.epages.restdocs.apispec.RestDocumentationWrapper.enhanceSnippetsWithResourceSnippet(RestDocumentationWrapper.kt:52)
	at com.epages.restdocs.apispec.WebTestClientRestDocumentationWrapper.document(WebTestClientRestDocumentationWrapper.kt:25)
	at com.epages.restdocs.apispec.WebTestClientRestDocumentationWrapper.document$default(WebTestClientRestDocumentationWrapper.kt:20)
	at com.epages.restdocs.apispec.WebTestClientRestDocumentationWrapper.document(WebTestClientRestDocumentationWrapper.kt)

Once Spring Boot 3.0.0 releases, the restdocs-api-specs functionality will be broken in that version until the refactored structure is handled here.

@pax95
Copy link

pax95 commented Nov 27, 2022

Yes this seems to be broken. Any chance this is going to be fixed ?

@ozscheyge
Copy link
Contributor

To support Spring Boot 3.0, gradlew version would also need to be updated from 6.8.3 to at least 7.3 (see https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0.0-M1-Release-Notes ). #196

@ozscheyge ozscheyge changed the title Spring Boot 3.0.0-RC1 removed RequestParametersSnippet; Tests are failing Support Spring REST Docs 3.0.0 Nov 29, 2022
@ozscheyge
Copy link
Contributor

#216

tobiaskrauss added a commit to tobiaskrauss/restdocs-api-spec that referenced this issue Jan 23, 2023
According to spring-rest-docs 'requestParameters' are replaced by
'queryParameters' and 'formParameters'.
If 'requestParameters' are used to document the API, this must be replaced
by one of the new functions

Upgrades (needed to use spring-rest-docs 3.0.0):
* gradle 7.6
* kotlin 1.7.10
* spring-boot 3.0.2
* java 17
@tobiaskrauss
Copy link
Contributor

#224

@Cube189
Copy link

Cube189 commented Jan 23, 2023

Any ETA on this? I can't be alone saying this blocks our plans to upgrade to Boot 3.

@tobiaskrauss
Copy link
Contributor

Any ETA on this? I can't be alone saying this blocks our plans to upgrade to Boot 3.

I plan creating a PR by tomorrow, but I am no maintainer and not involved in the project as of now. So lets see what they think about the PR.

@ozscheyge
Copy link
Contributor

ozscheyge commented Jan 23, 2023

We are still in the process of upgrading to Spring Boot 2.7, so ePages won't provide Spring Boot 3 compatibility soon.

A PR is welcome. We would still prefer to continue with major version zero, to not give any guarantees. So 0.16.4 could be the last release for Spring Boot 2 and 0.17.x the first for Spring Boot 3.

@pax95
Copy link

pax95 commented Jan 28, 2023

I moved to https://springdoc.org/ for SB 3.X support

ozscheyge pushed a commit that referenced this issue Jan 31, 2023
* Support Spring REST Docs 3.0.0 (#211)

According to spring-rest-docs 'requestParameters' are replaced by
'queryParameters' and 'formParameters'.
If 'requestParameters' are used to document the API, this must be replaced
by one of the new functions

Upgrades (needed to use spring-rest-docs 3.0.0):
* gradle 7.6
* kotlin 1.7.10
* spring-boot 3.0.2
* java 17

* Use java-17 in travis ci

* use kotlin 1.7.22 as there are runtime dependencies to this version

* Update generators and gradle plugin for rest-docs v3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants