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, OperationResponsePreprocessor responsePreprocessor,
        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} in
 * addition to any default snippets. The given {@code requestPreprocessor} is applied to the
 * request before it is documented.//from   w  w w .j a v  a2  s  .  c  o m
 *
 * @param identifier an identifier for the API call that is being documented
 * @param requestPreprocessor the request preprocessor
 * @param snippets the snippets
 * @return a {@link JerseyRestDocumentationFilter} that will produce the documentation
 */
public static JerseyRestDocumentationFilter document(String identifier,
        OperationRequestPreprocessor requestPreprocessor, Snippet... snippets) {
    return new JerseyRestDocumentationFilter(new RestDocumentationGenerator<>(identifier, REQUEST_CONVERTER,
            RESPONSE_CONVERTER, requestPreprocessor, snippets));
}

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

/**
 * Documents the API call with the given {@code identifier} using the given {@code snippets} in
 * addition to any default snippets. The given {@code responsePreprocessor} is applied to the
 * request before it is documented.//from   w w w .  jav a2 s .  c  o m
 *
 * @param identifier an identifier for the API call that is being documented
 * @param responsePreprocessor the response preprocessor
 * @param snippets the snippets
 * @return a {@link JerseyRestDocumentationFilter} that will produce the documentation
 */
public static JerseyRestDocumentationFilter document(String identifier,
        OperationResponsePreprocessor responsePreprocessor, Snippet... snippets) {
    return new JerseyRestDocumentationFilter(new RestDocumentationGenerator<>(identifier, REQUEST_CONVERTER,
            RESPONSE_CONVERTER, responsePreprocessor, snippets));
}