Class WireMockDocumentation


  • public abstract class WireMockDocumentation
    extends java.lang.Object
    Wrapper around the static API from MockMvcRestDocumentation, to integrate generation of WireMock stubs. Most of the static API was deprecated in 0.6.x and removed in 0.7.0.
    • Constructor Detail

      • WireMockDocumentation

        public WireMockDocumentation()
    • Method Detail

      • wiremockJson

        public static org.springframework.restdocs.snippet.Snippet wiremockJson​(ResponseFieldTemplateDescriptor... responseFieldTemplateDescriptors)
        Returns a json Snippet that will generate the WireMock stub from the API operation.
        Returns:
        the json snippet
      • idFieldReplacedWithPathParameterValue

        public static ResponseFieldTemplateDescriptor idFieldReplacedWithPathParameterValue()
        Convenience factory method for the common use case of replacing the id with the path parameter Assumes that the id field can be found at the field id and the path contains the id at the second position