ePages-de / restdocs-api-spec

Adds API specification support to Spring REST Docs
MIT License
387 stars 101 forks source link

Support Spring REST Docs 3.0.0 #211

Open vtscotty opened 1 year ago

vtscotty commented 1 year ago

As documented here (https://github.com/spring-projects/spring-restdocs/issues/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 commented 1 year ago

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

ozscheyge commented 1 year ago

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 ). https://github.com/ePages-de/restdocs-api-spec/issues/196

ozscheyge commented 1 year ago

https://github.com/ePages-de/restdocs-api-spec/issues/216

tobiaskrauss commented 1 year ago

224

Cube189 commented 1 year ago

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

tobiaskrauss commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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