public abstract class OpenApiParameterGenerator<T extends io.apicurio.datamodels.openapi.models.OasDocument> extends Object
| Constructor and Description |
|---|
OpenApiParameterGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
addGlobalParameters(Connector.Builder builder,
T openApiDoc)
Extract global parameters from OpenAPI document and generate configuration properties on given connector builder.
|
protected abstract Map<String,ConfigurationProperty> |
createConfigurationProperties(T openApiDoc)
Create configuration properties from global parameters on given OpenAPI document.
|
static ConfigurationProperty |
createPropertyFromParameter(io.apicurio.datamodels.openapi.models.OasParameter parameter,
String type,
String javaType,
Object defaultValue,
List<String> enums)
Creates a configuration property from given parameter.
|
protected boolean |
shouldCreateProperty(io.apicurio.datamodels.openapi.models.OasParameter parameter)
Checks if we should generate a configuration property for given global parameter.
|
public void addGlobalParameters(Connector.Builder builder, T openApiDoc)
builder - the connector builder to receive generated configuration properties.openApiDoc - the OpenAPI document.protected abstract Map<String,ConfigurationProperty> createConfigurationProperties(T openApiDoc)
openApiDoc - the OpenAPI document.protected boolean shouldCreateProperty(io.apicurio.datamodels.openapi.models.OasParameter parameter)
parameter - the parameter to check.public static ConfigurationProperty createPropertyFromParameter(io.apicurio.datamodels.openapi.models.OasParameter parameter, String type, String javaType, Object defaultValue, List<String> enums)
parameter - the global parameter on the specification.type - the parameter type (array, object, etc.)javaType - the corresponding java type.defaultValue - optional default value.enums - optional list of allowed values as enumeration.Copyright © 2016–2021 Red Hat. All rights reserved.