public class StandardWriterResolver extends Object implements WriterResolver
WriterResolver
.Constructor and Description |
---|
StandardWriterResolver(PropertyPlaceholderHelper.PlaceholderResolver placeholderResolver)
Creates a new
StandardWriterResolver that will use the given
placeholderResolver 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.
|
protected File |
resolveFile(String outputDirectory,
String fileName,
RestDocumentationContext context) |
void |
setEncoding(String encoding)
Configures the encoding that should be used by any writers produced by this
resolver
|
public StandardWriterResolver(PropertyPlaceholderHelper.PlaceholderResolver placeholderResolver)
StandardWriterResolver
that will use the given
placeholderResolver
to resolve any placeholders in the
operationName
.placeholderResolver
- the placeholder resolverpublic Writer resolve(String operationName, String snippetName, RestDocumentationContext context) throws IOException
WriterResolver
resolve
in interface WriterResolver
operationName
- the name of the operation that is being documentedsnippetName
- the name of the snippetcontext
- the current documentation contextIOException
- if a writer cannot be resolvedpublic void setEncoding(String encoding)
WriterResolver
setEncoding
in interface WriterResolver
encoding
- the encodingprotected File resolveFile(String outputDirectory, String fileName, RestDocumentationContext context)