Git Product home page Git Product logo

Comments (8)

hantsy avatar hantsy commented on July 28, 2024 1

@mduesterhoeft Thanks. I will try it soon.

from restdocs-raml.

mduesterhoeft avatar mduesterhoeft commented on July 28, 2024

Did you try it with the reactive stack. I haven't - but from what I read in the spring-restdocs docu I had the impression that it should work.

Let me know if you tried.

from restdocs-raml.

hantsy avatar hantsy commented on July 28, 2024

I have not tried this(restdocs-raml ) in my webflux sample, so I am not sure if it works in webflux,via WebTestClient.

I have tried restdocs for WebTestClient, but the APIs for WebTestClient are different from MockMVC and RestAssured.

from restdocs-raml.

mduesterhoeft avatar mduesterhoeft commented on July 28, 2024

The infrastructure is slightly different. But generally we just add a snippet - and that should stay the same.

But nevertheless there seems to be a change in spring-restdocs 2 that is binary incompatible with spring.restdocs 1.

They changed RestDocumentationContext from a class to an interface and this results in this exception when trying out restdocs-raml with WebTestClient:

java.lang.IncompatibleClassChangeError: Found interface org.springframework.restdocs.RestDocumentationContext, but class was expected

So there is an issue not sure how you would solve this and how to achieve to release a version that is compatible with spring-restdocs 1 and 2.

from restdocs-raml.

hantsy avatar hantsy commented on July 28, 2024

@mduesterhoeft I do not think spring-restdocs 1.x supports Webflux. So I think restdocs-saml could have to start a new restdocs2 branch for the compatibility for spring-restdocs 2.x.

from restdocs-raml.

mduesterhoeft avatar mduesterhoeft commented on July 28, 2024

I am still hoping that I can get it to work for both versions. I am already on it.

from restdocs-raml.

mduesterhoeft avatar mduesterhoeft commented on July 28, 2024

@hantsy I think I got it to work. I decided to go for reflection instead of having to maintain different versions and branches.

I also forked the spring-restdocs sample using WebTestClient and adopted it to use restdocs-raml so I could verify it is also working with spring-restdocs 2.

See https://github.com/mduesterhoeft/spring-restdocs/tree/master/samples/web-test-client

from restdocs-raml.

mduesterhoeft avatar mduesterhoeft commented on July 28, 2024

I also documented the compatibility - https://github.com/mduesterhoeft/spring-restdocs/tree/master/samples/web-test-client

from restdocs-raml.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.