public class CurlRequestSnippet extends TemplatedSnippet
Snippet
that documents the curl command for a request.CliDocumentation.curlRequest()
,
CliDocumentation.curlRequest(CommandFormatter)
,
CliDocumentation.curlRequest(Map)
,
CliDocumentation.curlRequest(Map, CommandFormatter)
Modifier | Constructor and Description |
---|---|
protected |
CurlRequestSnippet()
Deprecated.
since 1.2.0 in favor of
CurlRequestSnippet(CommandFormatter) |
protected |
CurlRequestSnippet(CommandFormatter commandFormatter)
Creates a new
CurlRequestSnippet that will use the given
commandFormatter to format the curl command. |
protected |
CurlRequestSnippet(Map<String,Object> attributes)
Deprecated.
since 1.2.0 in favor of
CurlRequestSnippet(Map, CommandFormatter) |
protected |
CurlRequestSnippet(Map<String,Object> attributes,
CommandFormatter commandFormatter)
Creates a new
CurlRequestSnippet with the given additional
attributes that will be included in the model during template rendering. |
Modifier and Type | Method and Description |
---|---|
protected Map<String,Object> |
createModel(Operation operation)
Create the model that should be used during template rendering to document the
given
operation . |
document, getAttributes, getSnippetName
@Deprecated protected CurlRequestSnippet()
CurlRequestSnippet(CommandFormatter)
CurlRequestSnippet
with no additional attributes.protected CurlRequestSnippet(CommandFormatter commandFormatter)
CurlRequestSnippet
that will use the given
commandFormatter
to format the curl command.commandFormatter
- The formatter@Deprecated protected CurlRequestSnippet(Map<String,Object> attributes)
CurlRequestSnippet(Map, CommandFormatter)
CurlRequestSnippet
with the given additional
attributes
that will be included in the model during template rendering.attributes
- The additional attributesprotected CurlRequestSnippet(Map<String,Object> attributes, CommandFormatter commandFormatter)
CurlRequestSnippet
with the given additional
attributes
that will be included in the model during template rendering.
The given commandFormaatter
will be used to format the curl command.attributes
- The additional attributescommandFormatter
- The formatter for generating the snippetprotected Map<String,Object> createModel(Operation operation)
TemplatedSnippet
operation
. Any additional attributes that were supplied when this
TemplatedSnippet
were created will be automatically added to the model
prior to rendering.createModel
in class TemplatedSnippet
operation
- The operation