Package io.swagger.v3.oas.integration
Class GenericOpenApiContext<T extends GenericOpenApiContext>
- java.lang.Object
-
- io.swagger.v3.oas.integration.GenericOpenApiContext<T>
-
- All Implemented Interfaces:
OpenApiContext
public class GenericOpenApiContext<T extends GenericOpenApiContext> extends Object implements OpenApiContext
-
-
Field Summary
Fields Modifier and Type Field Description protected StringconfigLocationprotected Stringidprotected OpenApiContextparentprotected Set<String>resourceClassesprotected Set<String>resourcePackages-
Fields inherited from interface io.swagger.v3.oas.integration.api.OpenApiContext
OPENAPI_CONTEXT_ID_DEFAULT, OPENAPI_CONTEXT_ID_KEY, OPENAPI_CONTEXT_ID_PREFIX
-
-
Constructor Summary
Constructors Constructor Description GenericOpenApiContext()
-
Method Summary
-
-
-
Method Detail
-
getCacheTTL
public long getCacheTTL()
-
setCacheTTL
public void setCacheTTL(long cacheTTL)
-
cacheTTL
public T cacheTTL(long cacheTTL)
-
getOpenApiReader
public OpenApiReader getOpenApiReader()
-
setOpenApiReader
public void setOpenApiReader(OpenApiReader openApiReader)
- Specified by:
setOpenApiReaderin interfaceOpenApiContext
-
getOpenApiScanner
public OpenApiScanner getOpenApiScanner()
-
setOpenApiScanner
public void setOpenApiScanner(OpenApiScanner openApiScanner)
- Specified by:
setOpenApiScannerin interfaceOpenApiContext
-
openApiReader
public final T openApiReader(OpenApiReader openApiReader)
-
openApiScanner
public final T openApiScanner(OpenApiScanner openApiScanner)
-
openApiConfiguration
public T openApiConfiguration(OpenAPIConfiguration openApiConfiguration)
-
getConfigLocation
public String getConfigLocation()
- Specified by:
getConfigLocationin interfaceOpenApiContext
-
setConfigLocation
public void setConfigLocation(String configLocation)
-
getId
public String getId()
- Specified by:
getIdin interfaceOpenApiContext
-
setId
public void setId(String id)
-
getParent
public OpenApiContext getParent()
- Specified by:
getParentin interfaceOpenApiContext
-
setParent
public void setParent(OpenApiContext parent)
-
parent
public final T parent(OpenApiContext parent)
-
getObjectMapperProcessor
public ObjectMapperProcessor getObjectMapperProcessor()
- Since:
- 2.0.6
-
setObjectMapperProcessor
public void setObjectMapperProcessor(ObjectMapperProcessor objectMapperProcessor)
- Specified by:
setObjectMapperProcessorin interfaceOpenApiContext- Since:
- 2.0.6
-
objectMapperProcessor
public final T objectMapperProcessor(ObjectMapperProcessor objectMapperProcessor)
- Since:
- 2.0.6
-
getModelConverters
public Set<ModelConverter> getModelConverters()
- Since:
- 2.0.6
-
setModelConverters
public void setModelConverters(Set<ModelConverter> modelConverters)
- Specified by:
setModelConvertersin interfaceOpenApiContext- Since:
- 2.0.6
-
modelConverters
public final T modelConverters(Set<ModelConverter> modelConverters)
- Since:
- 2.0.6
-
getOutputJsonMapper
public com.fasterxml.jackson.databind.ObjectMapper getOutputJsonMapper()
- Specified by:
getOutputJsonMapperin interfaceOpenApiContext- Since:
- 2.1.6
-
setOutputJsonMapper
public void setOutputJsonMapper(com.fasterxml.jackson.databind.ObjectMapper outputJsonMapper)
- Specified by:
setOutputJsonMapperin interfaceOpenApiContext- Since:
- 2.1.6
-
outputJsonMapper
public final T outputJsonMapper(com.fasterxml.jackson.databind.ObjectMapper outputJsonMapper)
- Since:
- 2.1.6
-
getOutputYamlMapper
public com.fasterxml.jackson.databind.ObjectMapper getOutputYamlMapper()
- Specified by:
getOutputYamlMapperin interfaceOpenApiContext- Since:
- 2.1.6
-
setOutputYamlMapper
public void setOutputYamlMapper(com.fasterxml.jackson.databind.ObjectMapper outputYamlMapper)
- Specified by:
setOutputYamlMapperin interfaceOpenApiContext- Since:
- 2.1.6
-
outputYamlMapper
public final T outputYamlMapper(com.fasterxml.jackson.databind.ObjectMapper outputYamlMapper)
- Since:
- 2.1.6
-
isOpenAPI31
public Boolean isOpenAPI31()
- Since:
- 2.1.8
-
setOpenAPI31
public void setOpenAPI31(Boolean v)
- Since:
- 2.1.8
-
isConvertToOpenAPI31
public Boolean isConvertToOpenAPI31()
- Since:
- 2.2.12
-
setConvertToOpenAPI31
public void setConvertToOpenAPI31(Boolean convertToOpenAPI31)
- Since:
- 2.2.12
-
getSchemaResolution
public Schema.SchemaResolution getSchemaResolution()
- Since:
- 2.2.24
-
setSchemaResolution
public void setSchemaResolution(Schema.SchemaResolution schemaResolution)
- Since:
- 2.2.24
-
schemaResolution
public T schemaResolution(Schema.SchemaResolution schemaResolution)
- Since:
- 2.2.24
-
getOpenAPIVersion
public String getOpenAPIVersion()
- Since:
- 2.2.28
-
setOpenAPIVersion
public void setOpenAPIVersion(String openAPIVersion)
- Since:
- 2.2.28
-
register
protected void register()
-
getOpenApiConfiguration
public OpenAPIConfiguration getOpenApiConfiguration()
- Specified by:
getOpenApiConfigurationin interfaceOpenApiContext
-
setOpenApiConfiguration
public void setOpenApiConfiguration(OpenAPIConfiguration openApiConfiguration)
-
buildReader
protected OpenApiReader buildReader(OpenAPIConfiguration openApiConfiguration) throws Exception
- Throws:
Exception
-
buildScanner
protected OpenApiScanner buildScanner(OpenAPIConfiguration openApiConfiguration) throws Exception
- Throws:
Exception
-
buildObjectMapperProcessor
protected ObjectMapperProcessor buildObjectMapperProcessor(OpenAPIConfiguration openApiConfiguration) throws Exception
- Throws:
Exception
-
buildModelConverters
protected Set<ModelConverter> buildModelConverters(OpenAPIConfiguration openApiConfiguration) throws Exception
- Throws:
Exception
-
getKnownLocations
protected List<org.apache.commons.lang3.tuple.ImmutablePair<String,String>> getKnownLocations()
-
getLocationLoaders
protected Map<String,OpenApiConfigurationLoader> getLocationLoaders()
-
loadConfiguration
protected OpenAPIConfiguration loadConfiguration() throws OpenApiConfigurationException
- Throws:
OpenApiConfigurationException
-
init
public T init() throws OpenApiConfigurationException
- Specified by:
initin interfaceOpenApiContext- Throws:
OpenApiConfigurationException
-
read
public OpenAPI read()
- Specified by:
readin interfaceOpenApiContext
-
resetReader
protected void resetReader()
-
-