public class OpenAPIMetadataProcessor extends Object implements MetadataProcessor<WSConnection>
| Modifier and Type | Field and Description |
|---|---|
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 |
URI |
FQN, SOURCE_PREFIX| Constructor and Description |
|---|
OpenAPIMetadataProcessor(OpenAPIExecutionFactory ef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getMetadataUrl() |
static Map<io.swagger.v3.oas.models.PathItem.HttpMethod,io.swagger.v3.oas.models.Operation> |
getOperationMap(io.swagger.v3.oas.models.PathItem operations) |
String |
getPreferredConsumes() |
String |
getPreferredProduces() |
protected io.swagger.v3.parser.core.models.SwaggerParseResult |
getSchema(WSConnection conn) |
String |
getServer() |
void |
process(MetadataFactory mf,
WSConnection connection) |
void |
setMetadataUrl(String metadataUrl) |
void |
setPreferredConsumes(String type) |
void |
setPreferredProduces(String accept) |
void |
setServer(String server) |
public static final String KEY_NAME
public static final String KEY_VALUE
@ExtensionMetadataProperty(applicable=org.teiid.metadata.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=org.teiid.metadata.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=org.teiid.metadata.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=org.teiid.metadata.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=org.teiid.metadata.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=org.teiid.metadata.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 OpenAPIMetadataProcessor(OpenAPIExecutionFactory ef)
@TranslatorProperty(display="OpenAPI metadata URL", category=IMPORT, description="OpenAPI metadata URL") public String getMetadataUrl()
public void setMetadataUrl(String metadataUrl)
@TranslatorProperty(display="Server", category=IMPORT, description="Server to use when multiple servers are defined") public String getServer()
public void setServer(String server)
@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>TranslatorExceptionpublic static Map<io.swagger.v3.oas.models.PathItem.HttpMethod,io.swagger.v3.oas.models.Operation> getOperationMap(io.swagger.v3.oas.models.PathItem operations)
protected io.swagger.v3.parser.core.models.SwaggerParseResult getSchema(WSConnection conn) throws TranslatorException
TranslatorExceptionCopyright © 2020. All rights reserved.