public final class StandardWriterResolver extends java.lang.Object implements WriterResolver
WriterResolver.| Constructor and Description |
|---|
StandardWriterResolver(PlaceholderResolverFactory placeholderResolverFactory,
java.lang.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 |
|---|---|
java.io.Writer |
resolve(java.lang.String operationName,
java.lang.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, java.lang.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 java.io.Writer resolve(java.lang.String operationName,
java.lang.String snippetName,
RestDocumentationContext context)
throws java.io.IOException
WriterResolverresolve in interface WriterResolveroperationName - the name of the operation that is being documentedsnippetName - the name of the snippetcontext - the current documentation contextjava.io.IOException - if a writer cannot be resolved