Package org.springdoc.webmvc.api
Class MultipleOpenApiWebMvcResource
java.lang.Object
org.springdoc.webmvc.api.MultipleOpenApiResource
org.springdoc.webmvc.api.MultipleOpenApiWebMvcResource
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
The type Multiple open api resource.
- Author:
- bnasslahsen
-
Constructor Summary
ConstructorsConstructorDescriptionMultipleOpenApiWebMvcResource
(List<GroupedOpenApi> groupedOpenApis, org.springframework.beans.factory.ObjectFactory<OpenAPIService> defaultOpenAPIBuilder, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders) Instantiates a new Multiple open api resource. -
Method Summary
Modifier and TypeMethodDescriptionopenapiJson
(jakarta.servlet.http.HttpServletRequest request, String apiDocsUrl, String group, Locale locale) Openapi json string.openapiYaml
(jakarta.servlet.http.HttpServletRequest request, String apiDocsUrl, String group, Locale locale) Openapi yaml string.Methods inherited from class org.springdoc.webmvc.api.MultipleOpenApiResource
afterPropertiesSet, getOpenApiResourceOrThrow
-
Constructor Details
-
MultipleOpenApiWebMvcResource
public MultipleOpenApiWebMvcResource(List<GroupedOpenApi> groupedOpenApis, org.springframework.beans.factory.ObjectFactory<OpenAPIService> defaultOpenAPIBuilder, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders) Instantiates a new Multiple open api resource.- Parameters:
groupedOpenApis
- the grouped open apisdefaultOpenAPIBuilder
- the default open api builderrequestBuilder
- the request builderresponseBuilder
- the response builderoperationParser
- the operation parserspringDocConfigProperties
- the spring doc config propertiesspringDocProviders
- the spring doc providers
-
-
Method Details
-
openapiJson
@GetMapping(value="${springdoc.api-docs.path:#{T(org.springdoc.core.utils.Constants).DEFAULT_API_DOCS_URL}}/{group}", produces="application/json") public String openapiJson(jakarta.servlet.http.HttpServletRequest request, @Value("${springdoc.api-docs.path:#{T(org.springdoc.core.utils.Constants).DEFAULT_API_DOCS_URL}}") String apiDocsUrl, @PathVariable String group, Locale locale) throws com.fasterxml.jackson.core.JsonProcessingException Openapi json string.- Parameters:
request
- the requestapiDocsUrl
- the api docs urlgroup
- the grouplocale
- the locale- Returns:
- the string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- the json processing exception
-
openapiYaml
@GetMapping(value="${springdoc.api-docs.path:#{T(org.springdoc.core.utils.Constants).DEFAULT_API_DOCS_URL}}.yaml/{group}", produces="application/vnd.oai.openapi") public String openapiYaml(jakarta.servlet.http.HttpServletRequest request, @Value("${springdoc.api-docs.path:#{T(org.springdoc.core.utils.Constants).DEFAULT_API_DOCS_URL}}.yaml") String apiDocsUrl, @PathVariable String group, Locale locale) throws com.fasterxml.jackson.core.JsonProcessingException Openapi yaml string.- Parameters:
request
- the requestapiDocsUrl
- the api docs urlgroup
- the grouplocale
- the locale- Returns:
- the string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
- the json processing exception
-