public class SwaggerMetadataProcessor extends Object implements MetadataProcessor<WSConnection>
Modifier and Type | Field and Description |
---|---|
static String |
CHARSET |
static String |
COLLECION_FORMAT |
static String |
CONSUMES |
static String |
KEY_NAME |
static String |
KEY_VALUE |
static String |
METHOD |
static String |
PARAMETER_TYPE |
static String |
PRODUCES |
static String |
SCHEME |
static String |
URI |
FQN, SOURCE_PREFIX
Constructor and Description |
---|
SwaggerMetadataProcessor(SwaggerExecutionFactory ef) |
Modifier and Type | Method and Description |
---|---|
static Map<io.swagger.models.HttpMethod,io.swagger.models.Operation> |
getOperationMap(io.swagger.models.Path operations) |
String |
getPreferredConsumes() |
String |
getPreferredProduces() |
String |
getPreferredScheme() |
protected io.swagger.models.Swagger |
getSchema(WSConnection conn) |
String |
getSwaggerFilePath() |
boolean |
isUseDefaultHost() |
void |
process(MetadataFactory mf,
WSConnection connection) |
void |
setPreferredConsumes(String type) |
void |
setPreferredProduces(String accept) |
void |
setPreferredScheme(String scheme) |
void |
setSwaggerFilePath(String swaggerFilePath) |
void |
setUseDefaultHost(boolean useDefault) |
public static final String KEY_NAME
public static final String KEY_VALUE
@ExtensionMetadataProperty(applicable=Procedure.class, datatype=java.lang.String.class, display="URI", description="Used to define endpoint of the procedure", required=true) public static final String URI
@ExtensionMetadataProperty(applicable=Procedure.class, datatype=java.lang.String.class, display="Http Method", description="Http method used to execute the procedure", required=true, allowed="GET,POST,PUT,DELETE,OPTIONS,HEAD,PATCH") public static final String METHOD
@ExtensionMetadataProperty(applicable=Procedure.class, datatype=java.lang.String.class, display="Scheme", description="Scheme to use http, https etc.", allowed="HTTP,HTTPS") public static final String SCHEME
@ExtensionMetadataProperty(applicable=Procedure.class, datatype=java.lang.String.class, display="Produces", description="Used to define content type produced by this procedure, default JSON assumed") public static final String PRODUCES
@ExtensionMetadataProperty(applicable=Procedure.class, datatype=java.lang.String.class, display="Consumes", description="Used to define content type consumed by this procedure with body type parameters. Default JSON assumed") public static final String CONSUMES
@ExtensionMetadataProperty(applicable=Procedure.class, datatype=java.lang.String.class, display="Charset", description="Encoding of the return data") public static final String CHARSET
@ExtensionMetadataProperty(applicable=ProcedureParameter.class, datatype=java.lang.String.class, display="Parameter Type", description="Parameter type, as to how the parameter is being provided to the procedure", required=true, allowed="PATH,QUERY,FORM,FORMDATA,BODY,HEADER") public static final String PARAMETER_TYPE
@ExtensionMetadataProperty(applicable=ProcedureParameter.class, datatype=java.lang.String.class, display="Collection Format", description="Determines the format of the array if type array is used, like CSV,TSV etc.", allowed="CSV,SSV,TSV,PIPES,MULTI") public static final String COLLECION_FORMAT
public SwaggerMetadataProcessor(SwaggerExecutionFactory ef)
@TranslatorProperty(display="Swagger metadata file path", category=IMPORT, description="Swagger metadata file path.") public String getSwaggerFilePath()
public void setSwaggerFilePath(String swaggerFilePath)
@TranslatorProperty(display="Use Host from Swagger File", category=IMPORT, description="Use default host specified in the Swagger file; Defaults to true") public boolean isUseDefaultHost()
public void setUseDefaultHost(boolean useDefault)
@TranslatorProperty(display="Preferred Scheme", category=IMPORT, description="Preferred Scheme to use when Swagger file supports multiple invocation schemes like http, https etc.") public String getPreferredScheme()
public void setPreferredScheme(String scheme)
@TranslatorProperty(display="Preferred Accept Header", category=IMPORT, description="Preferred Accept MIME type header, this should be one of the Swagger \'produces\' types; default is application/json") public String getPreferredProduces()
public void setPreferredProduces(String accept)
@TranslatorProperty(display="Preferred Content-type Header", category=IMPORT, description="Preferred Content-type header, this should be one of the Swagger \'consume\' types, default is application/json") public String getPreferredConsumes()
public void setPreferredConsumes(String type)
public void process(MetadataFactory mf, WSConnection connection) throws TranslatorException
process
in interface MetadataProcessor<WSConnection>
TranslatorException
public static Map<io.swagger.models.HttpMethod,io.swagger.models.Operation> getOperationMap(io.swagger.models.Path operations)
protected io.swagger.models.Swagger getSchema(WSConnection conn) throws TranslatorException
TranslatorException
Copyright © 2019. All rights reserved.