Class RequestPartBodySnippet

All Implemented Interfaces:
Snippet

public class RequestPartBodySnippet extends AbstractBodySnippet
A Snippet that documents the body of a request part.
Author:
Andy Wilkinson
  • Constructor Details

    • RequestPartBodySnippet

      public RequestPartBodySnippet(String partName)
      Creates a new RequestPartBodySnippet that will document the body of the request part with the given partName.
      Parameters:
      partName - the name of the request part
    • RequestPartBodySnippet

      public RequestPartBodySnippet(String partName, PayloadSubsectionExtractor<?> subsectionExtractor)
      Creates a new RequestPartBodySnippet that will document the subsection of the body of the request part with the given partName extracted by the given subsectionExtractor.
      Parameters:
      partName - the name of the request part
      subsectionExtractor - the subsection extractor
    • RequestPartBodySnippet

      public RequestPartBodySnippet(String partName, Map<String,Object> attributes)
      Creates a new RequestPartBodySnippet that will document the body of the request part with the given partName. The given additional attributes will be included in the model during template rendering.
      Parameters:
      partName - the name of the request part
      attributes - the additional attributes
    • RequestPartBodySnippet

      public RequestPartBodySnippet(String partName, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String,Object> attributes)
      Creates a new RequestPartBodySnippet that will document the body of the request part with the given partName. The subsection of the body extracted by the given subsectionExtractor will be documented and the given additional attributes that will be included in the model during template rendering.
      Parameters:
      partName - the name of the request part
      subsectionExtractor - the subsection extractor
      attributes - the additional attributes
  • Method Details