Package org.springdoc.core
Class OpenAPIService
- java.lang.Object
-
- org.springdoc.core.OpenAPIService
-
public class OpenAPIService extends Object
The type Open api builder.- Author:
- bnasslahsen
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMappings(Map<String,Object> mappings)Add mappings.voidaddTag(Set<org.springframework.web.method.HandlerMethod> handlerMethods, io.swagger.v3.oas.models.tags.Tag tag)Add tag.voidbuild(Locale locale)Build.io.swagger.v3.oas.models.OperationbuildTags(org.springframework.web.method.HandlerMethod handlerMethod, io.swagger.v3.oas.models.Operation operation, io.swagger.v3.oas.models.OpenAPI openAPI, Locale locale)Build tags operation.voidbuildTagsFromClass(Class<?> beanType, Set<io.swagger.v3.oas.models.tags.Tag> tags, Set<String> tagsStr, Locale locale)Build tags from class.io.swagger.v3.oas.models.OpenAPIgetCachedOpenAPI()Gets cached open api.io.swagger.v3.oas.models.OpenAPIgetCalculatedOpenAPI()Gets calculated open api.org.springframework.context.ApplicationContextgetContext()Gets context.Map<String,Object>getControllerAdviceMap()Gets controller advice map.Map<String,Object>getMappingsMap()Gets mappings map.SecurityServicegetSecurityParser()Gets security parser.booleanisAutoTagClasses(io.swagger.v3.oas.models.Operation operation)Is auto tag classes boolean.voidresetCalculatedOpenAPI()Reset calculated open api.io.swagger.v3.oas.models.media.SchemaresolveProperties(io.swagger.v3.oas.models.media.Schema schema, Locale locale)Resolve properties schema.voidsetCachedOpenAPI(io.swagger.v3.oas.models.OpenAPI cachedOpenAPI)Sets cached open api.voidsetServerBaseUrl(String serverBaseUrl)Sets server base url.voidsetServersPresent(boolean serversPresent)Sets servers present.static StringsplitCamelCase(String str)Split camel case string.io.swagger.v3.oas.models.OpenAPIupdateServers(io.swagger.v3.oas.models.OpenAPI openAPI)Update servers open api.
-
-
-
Method Detail
-
splitCamelCase
public static String splitCamelCase(String str)
Split camel case string.- Parameters:
str- the str- Returns:
- the string
-
build
public void build(Locale locale)
Build.- Parameters:
locale- the locale
-
updateServers
public io.swagger.v3.oas.models.OpenAPI updateServers(io.swagger.v3.oas.models.OpenAPI openAPI)
Update servers open api.- Parameters:
openAPI- the open api- Returns:
- the open api
-
setServersPresent
public void setServersPresent(boolean serversPresent)
Sets servers present.- Parameters:
serversPresent- the servers present
-
buildTags
public io.swagger.v3.oas.models.Operation buildTags(org.springframework.web.method.HandlerMethod handlerMethod, io.swagger.v3.oas.models.Operation operation, io.swagger.v3.oas.models.OpenAPI openAPI, Locale locale)Build tags operation.- Parameters:
handlerMethod- the handler methodoperation- the operationopenAPI- the open apilocale- the locale- Returns:
- the operation
-
buildTagsFromClass
public void buildTagsFromClass(Class<?> beanType, Set<io.swagger.v3.oas.models.tags.Tag> tags, Set<String> tagsStr, Locale locale)
Build tags from class.- Parameters:
beanType- the bean typetags- the tagstagsStr- the tags strlocale- the locale
-
resolveProperties
public io.swagger.v3.oas.models.media.Schema resolveProperties(io.swagger.v3.oas.models.media.Schema schema, Locale locale)Resolve properties schema.- Parameters:
schema- the schemalocale- the locale- Returns:
- the schema
-
setServerBaseUrl
public void setServerBaseUrl(String serverBaseUrl)
Sets server base url.- Parameters:
serverBaseUrl- the server base url
-
isAutoTagClasses
public boolean isAutoTagClasses(io.swagger.v3.oas.models.Operation operation)
Is auto tag classes boolean.- Parameters:
operation- the operation- Returns:
- the boolean
-
addTag
public void addTag(Set<org.springframework.web.method.HandlerMethod> handlerMethods, io.swagger.v3.oas.models.tags.Tag tag)
Add tag.- Parameters:
handlerMethods- the handler methodstag- the tag
-
getMappingsMap
public Map<String,Object> getMappingsMap()
Gets mappings map.- Returns:
- the mappings map
-
addMappings
public void addMappings(Map<String,Object> mappings)
Add mappings.- Parameters:
mappings- the mappings
-
getControllerAdviceMap
public Map<String,Object> getControllerAdviceMap()
Gets controller advice map.- Returns:
- the controller advice map
-
getCachedOpenAPI
public io.swagger.v3.oas.models.OpenAPI getCachedOpenAPI()
Gets cached open api.- Returns:
- the cached open api
-
setCachedOpenAPI
public void setCachedOpenAPI(io.swagger.v3.oas.models.OpenAPI cachedOpenAPI)
Sets cached open api.- Parameters:
cachedOpenAPI- the cached open api
-
getCalculatedOpenAPI
public io.swagger.v3.oas.models.OpenAPI getCalculatedOpenAPI()
Gets calculated open api.- Returns:
- the calculated open api
-
resetCalculatedOpenAPI
public void resetCalculatedOpenAPI()
Reset calculated open api.
-
getContext
public org.springframework.context.ApplicationContext getContext()
Gets context.- Returns:
- the context
-
getSecurityParser
public SecurityService getSecurityParser()
Gets security parser.- Returns:
- the security parser
-
-