public class Reader extends Object implements io.swagger.v3.oas.integration.api.OpenApiReader
Modifier and Type | Field and Description |
---|---|
protected io.swagger.v3.oas.integration.api.OpenAPIConfiguration |
config |
static String |
DEFAULT_DESCRIPTION |
static String |
DEFAULT_MEDIA_TYPE_VALUE |
Constructor and Description |
---|
Reader() |
Reader(io.swagger.v3.oas.models.OpenAPI openAPI) |
Reader(io.swagger.v3.oas.integration.api.OpenAPIConfiguration openApiConfiguration) |
Modifier and Type | Method and Description |
---|---|
io.swagger.v3.oas.models.OpenAPI |
getOpenAPI() |
protected String |
getOperationId(String operationId) |
protected ResolvedParameter |
getParameters(Type type,
List<Annotation> annotations,
io.swagger.v3.oas.models.Operation operation,
javax.ws.rs.Consumes classConsumes,
javax.ws.rs.Consumes methodConsumes,
com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation) |
protected Optional<List<io.swagger.v3.oas.models.parameters.Parameter>> |
getParametersListFromAnnotation(io.swagger.v3.oas.annotations.Parameter[] parameters,
javax.ws.rs.Consumes classConsumes,
javax.ws.rs.Consumes methodConsumes,
io.swagger.v3.oas.models.Operation operation,
com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation) |
protected Class<?> |
getSubResourceWithJaxRsSubresourceLocatorSpecs(Method method) |
protected boolean |
ignoreOperationPath(String path,
String parentPath) |
protected boolean |
isOperationHidden(Method method) |
protected io.swagger.v3.oas.models.Operation |
parseMethod(Class<?> cls,
Method method,
List<io.swagger.v3.oas.models.parameters.Parameter> globalParameters,
javax.ws.rs.Produces methodProduces,
javax.ws.rs.Produces classProduces,
javax.ws.rs.Consumes methodConsumes,
javax.ws.rs.Consumes classConsumes,
List<io.swagger.v3.oas.models.security.SecurityRequirement> classSecurityRequirements,
Optional<io.swagger.v3.oas.models.ExternalDocumentation> classExternalDocs,
Set<String> classTags,
List<io.swagger.v3.oas.models.servers.Server> classServers,
boolean isSubresource,
io.swagger.v3.oas.models.parameters.RequestBody parentRequestBody,
io.swagger.v3.oas.models.responses.ApiResponses parentResponses,
com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
io.swagger.v3.oas.annotations.responses.ApiResponse[] classResponses,
com.fasterxml.jackson.databind.introspect.AnnotatedMethod annotatedMethod) |
io.swagger.v3.oas.models.Operation |
parseMethod(Method method,
List<io.swagger.v3.oas.models.parameters.Parameter> globalParameters,
com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation) |
io.swagger.v3.oas.models.Operation |
parseMethod(Method method,
List<io.swagger.v3.oas.models.parameters.Parameter> globalParameters,
javax.ws.rs.Produces methodProduces,
javax.ws.rs.Produces classProduces,
javax.ws.rs.Consumes methodConsumes,
javax.ws.rs.Consumes classConsumes,
List<io.swagger.v3.oas.models.security.SecurityRequirement> classSecurityRequirements,
Optional<io.swagger.v3.oas.models.ExternalDocumentation> classExternalDocs,
Set<String> classTags,
List<io.swagger.v3.oas.models.servers.Server> classServers,
boolean isSubresource,
io.swagger.v3.oas.models.parameters.RequestBody parentRequestBody,
io.swagger.v3.oas.models.responses.ApiResponses parentResponses,
com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
io.swagger.v3.oas.annotations.responses.ApiResponse[] classResponses) |
io.swagger.v3.oas.models.Operation |
parseMethod(Method method,
List<io.swagger.v3.oas.models.parameters.Parameter> globalParameters,
javax.ws.rs.Produces methodProduces,
javax.ws.rs.Produces classProduces,
javax.ws.rs.Consumes methodConsumes,
javax.ws.rs.Consumes classConsumes,
List<io.swagger.v3.oas.models.security.SecurityRequirement> classSecurityRequirements,
Optional<io.swagger.v3.oas.models.ExternalDocumentation> classExternalDocs,
Set<String> classTags,
List<io.swagger.v3.oas.models.servers.Server> classServers,
boolean isSubresource,
io.swagger.v3.oas.models.parameters.RequestBody parentRequestBody,
io.swagger.v3.oas.models.responses.ApiResponses parentResponses,
com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
io.swagger.v3.oas.annotations.responses.ApiResponse[] classResponses,
com.fasterxml.jackson.databind.introspect.AnnotatedMethod annotatedMethod) |
protected io.swagger.v3.oas.models.media.Content |
processContent(io.swagger.v3.oas.models.media.Content content,
io.swagger.v3.oas.models.media.Schema schema,
javax.ws.rs.Consumes methodConsumes,
javax.ws.rs.Consumes classConsumes) |
protected void |
processRequestBody(io.swagger.v3.oas.models.parameters.Parameter requestBodyParameter,
io.swagger.v3.oas.models.Operation operation,
javax.ws.rs.Consumes methodConsumes,
javax.ws.rs.Consumes classConsumes,
List<io.swagger.v3.oas.models.parameters.Parameter> operationParameters,
Annotation[] paramAnnotations,
Type type,
com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation) |
io.swagger.v3.oas.models.OpenAPI |
read(Class<?> cls)
Scans a single class for Swagger annotations - does not invoke ReaderListeners
|
io.swagger.v3.oas.models.OpenAPI |
read(Class<?> cls,
String parentPath,
String parentMethod,
boolean isSubresource,
io.swagger.v3.oas.models.parameters.RequestBody parentRequestBody,
io.swagger.v3.oas.models.responses.ApiResponses parentResponses,
Set<String> parentTags,
List<io.swagger.v3.oas.models.parameters.Parameter> parentParameters,
Set<Class<?>> scannedResources) |
io.swagger.v3.oas.models.OpenAPI |
read(Set<Class<?>> classes)
Scans a set of classes for both ReaderListeners and OpenAPI annotations.
|
io.swagger.v3.oas.models.OpenAPI |
read(Set<Class<?>> classes,
Map<String,Object> resources) |
protected String |
resolveApplicationPath() |
void |
setApplication(javax.ws.rs.core.Application application) |
void |
setConfiguration(io.swagger.v3.oas.integration.api.OpenAPIConfiguration openApiConfiguration) |
public static final String DEFAULT_MEDIA_TYPE_VALUE
public static final String DEFAULT_DESCRIPTION
protected io.swagger.v3.oas.integration.api.OpenAPIConfiguration config
public Reader()
public Reader(io.swagger.v3.oas.models.OpenAPI openAPI)
public Reader(io.swagger.v3.oas.integration.api.OpenAPIConfiguration openApiConfiguration)
public io.swagger.v3.oas.models.OpenAPI getOpenAPI()
public io.swagger.v3.oas.models.OpenAPI read(Class<?> cls)
public io.swagger.v3.oas.models.OpenAPI read(Set<Class<?>> classes)
classes
- a set of classes to scanpublic void setConfiguration(io.swagger.v3.oas.integration.api.OpenAPIConfiguration openApiConfiguration)
setConfiguration
in interface io.swagger.v3.oas.integration.api.OpenApiReader
public io.swagger.v3.oas.models.OpenAPI read(Set<Class<?>> classes, Map<String,Object> resources)
read
in interface io.swagger.v3.oas.integration.api.OpenApiReader
protected String resolveApplicationPath()
public io.swagger.v3.oas.models.OpenAPI read(Class<?> cls, String parentPath, String parentMethod, boolean isSubresource, io.swagger.v3.oas.models.parameters.RequestBody parentRequestBody, io.swagger.v3.oas.models.responses.ApiResponses parentResponses, Set<String> parentTags, List<io.swagger.v3.oas.models.parameters.Parameter> parentParameters, Set<Class<?>> scannedResources)
protected io.swagger.v3.oas.models.media.Content processContent(io.swagger.v3.oas.models.media.Content content, io.swagger.v3.oas.models.media.Schema schema, javax.ws.rs.Consumes methodConsumes, javax.ws.rs.Consumes classConsumes)
protected void processRequestBody(io.swagger.v3.oas.models.parameters.Parameter requestBodyParameter, io.swagger.v3.oas.models.Operation operation, javax.ws.rs.Consumes methodConsumes, javax.ws.rs.Consumes classConsumes, List<io.swagger.v3.oas.models.parameters.Parameter> operationParameters, Annotation[] paramAnnotations, Type type, com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
public io.swagger.v3.oas.models.Operation parseMethod(Method method, List<io.swagger.v3.oas.models.parameters.Parameter> globalParameters, com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
public io.swagger.v3.oas.models.Operation parseMethod(Method method, List<io.swagger.v3.oas.models.parameters.Parameter> globalParameters, javax.ws.rs.Produces methodProduces, javax.ws.rs.Produces classProduces, javax.ws.rs.Consumes methodConsumes, javax.ws.rs.Consumes classConsumes, List<io.swagger.v3.oas.models.security.SecurityRequirement> classSecurityRequirements, Optional<io.swagger.v3.oas.models.ExternalDocumentation> classExternalDocs, Set<String> classTags, List<io.swagger.v3.oas.models.servers.Server> classServers, boolean isSubresource, io.swagger.v3.oas.models.parameters.RequestBody parentRequestBody, io.swagger.v3.oas.models.responses.ApiResponses parentResponses, com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation, io.swagger.v3.oas.annotations.responses.ApiResponse[] classResponses)
public io.swagger.v3.oas.models.Operation parseMethod(Method method, List<io.swagger.v3.oas.models.parameters.Parameter> globalParameters, javax.ws.rs.Produces methodProduces, javax.ws.rs.Produces classProduces, javax.ws.rs.Consumes methodConsumes, javax.ws.rs.Consumes classConsumes, List<io.swagger.v3.oas.models.security.SecurityRequirement> classSecurityRequirements, Optional<io.swagger.v3.oas.models.ExternalDocumentation> classExternalDocs, Set<String> classTags, List<io.swagger.v3.oas.models.servers.Server> classServers, boolean isSubresource, io.swagger.v3.oas.models.parameters.RequestBody parentRequestBody, io.swagger.v3.oas.models.responses.ApiResponses parentResponses, com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation, io.swagger.v3.oas.annotations.responses.ApiResponse[] classResponses, com.fasterxml.jackson.databind.introspect.AnnotatedMethod annotatedMethod)
protected io.swagger.v3.oas.models.Operation parseMethod(Class<?> cls, Method method, List<io.swagger.v3.oas.models.parameters.Parameter> globalParameters, javax.ws.rs.Produces methodProduces, javax.ws.rs.Produces classProduces, javax.ws.rs.Consumes methodConsumes, javax.ws.rs.Consumes classConsumes, List<io.swagger.v3.oas.models.security.SecurityRequirement> classSecurityRequirements, Optional<io.swagger.v3.oas.models.ExternalDocumentation> classExternalDocs, Set<String> classTags, List<io.swagger.v3.oas.models.servers.Server> classServers, boolean isSubresource, io.swagger.v3.oas.models.parameters.RequestBody parentRequestBody, io.swagger.v3.oas.models.responses.ApiResponses parentResponses, com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation, io.swagger.v3.oas.annotations.responses.ApiResponse[] classResponses, com.fasterxml.jackson.databind.introspect.AnnotatedMethod annotatedMethod)
protected Optional<List<io.swagger.v3.oas.models.parameters.Parameter>> getParametersListFromAnnotation(io.swagger.v3.oas.annotations.Parameter[] parameters, javax.ws.rs.Consumes classConsumes, javax.ws.rs.Consumes methodConsumes, io.swagger.v3.oas.models.Operation operation, com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
protected ResolvedParameter getParameters(Type type, List<Annotation> annotations, io.swagger.v3.oas.models.Operation operation, javax.ws.rs.Consumes classConsumes, javax.ws.rs.Consumes methodConsumes, com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
protected boolean isOperationHidden(Method method)
public void setApplication(javax.ws.rs.core.Application application)
Copyright © 2019. All rights reserved.