Example usage for org.springframework.restdocs.generate RestDocumentationGenerator RestDocumentationGenerator

List of usage examples for org.springframework.restdocs.generate RestDocumentationGenerator RestDocumentationGenerator

Introduction

In this page you can find the example usage for org.springframework.restdocs.generate RestDocumentationGenerator RestDocumentationGenerator.

Prototype

public RestDocumentationGenerator(String identifier, RequestConverter<REQ> requestConverter,
        ResponseConverter<RESP> responseConverter, Snippet... snippets) 

Source Link

Document

Creates a new RestDocumentationGenerator for the operation identified by the given identifier .

Usage

From source file:io.github.restdocsext.jersey.JerseyRestDocumentation.java

/**
 * Documents the API call with the given {@code identifier} using the given {@code snippets}.
 *
 * @param identifier an identifier for the API call that is being documented
 * @param snippets the snippets that will document the API call
 * @return a {@link JerseyRestDocumentationFilter} that will produce the documentation
 *//*from  w  ww  .j a va  2  s. com*/
public static JerseyRestDocumentationFilter document(String identifier, Snippet... snippets) {
    return new JerseyRestDocumentationFilter(
            new RestDocumentationGenerator<>(identifier, REQUEST_CONVERTER, RESPONSE_CONVERTER, snippets));
}