public final class StandardWriterResolver extends Object implements WriterResolver
WriterResolver.| Constructor and Description |
|---|
StandardWriterResolver(PlaceholderResolverFactory placeholderResolverFactory,
String encoding,
TemplateFormat templateFormat)
Creates a new
StandardWriterResolver that will use a
PropertyPlaceholderHelper.PlaceholderResolver created from the given
placeholderResolverFactory to resolve any placeholders in the
operationName. |
| Modifier and Type | Method and Description |
|---|---|
Writer |
resolve(String operationName,
String snippetName,
RestDocumentationContext context)
Returns a writer that can be used to write the snippet with the given name for the
operation with the given name.
|
public StandardWriterResolver(PlaceholderResolverFactory placeholderResolverFactory, String encoding, TemplateFormat templateFormat)
StandardWriterResolver that will use a
PropertyPlaceholderHelper.PlaceholderResolver created from the given
placeholderResolverFactory to resolve any placeholders in the
operationName. Writers will use the given encoding and, when
writing to a file, will use a filename appropriate for content generated from
templates in the given templateFormat.placeholderResolverFactory - the placeholder resolver factoryencoding - the encodingtemplateFormat - the snippet formatpublic Writer resolve(String operationName, String snippetName, RestDocumentationContext context) throws IOException
WriterResolverresolve in interface WriterResolveroperationName - the name of the operation that is being documentedsnippetName - the name of the snippetcontext - the current documentation contextIOException - if a writer cannot be resolved