You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Description
I use my custom implementation of the OpenApiCustomiser interface to complete the auto-generated Open API specification. I inject the ResponseBuilder object to calculate Schema instances that describe non-2xx response bodies. Since ResponseBuilder's calculateSchema method is a private method, it can only be called through reflection.
To Reproduce
Steps to reproduce the behavior:
Inject ResponseBuilder into a @Component
Try to call ResponseBuilder::calculateSchema(...)
Compiler error: 'calculateSchema(io.swagger.v3.oas.models.Components, java.lang.reflect.ParameterizedType, com.fasterxml.jackson.annotation.JsonView)' has private access in 'org.springdoc.core.AbstractResponseBuilder'
Expected behavior ResponseBuilder::calculateSchema(...) should be a public method.
One of the core functionalities of ResponseBuilder is providing schema calculation functionality. I see no other way of easily calculating the schema of an arbitrary type, thus ResponseBuilder::calculateSchema(...) should be public, not private.
The text was updated successfully, but these errors were encountered:
calculateSchema, is private, because its internally used by ResponseBuilder.
There was no reason to expose it. You are asking for new feature...
Plese, note that people can just use: SpringDocAnnotationsUtils.extractSchema or AnnotationsUtils.resolveSchemaFromType to resovle the Schema directly.
bnasslahsen
changed the title
calculateSchema method is private
Make calculateSchema method is private
Feb 23, 2020
bnasslahsen
changed the title
Make calculateSchema method is private
Make calculateSchema methodprivate
Feb 23, 2020
bnasslahsen
changed the title
Make calculateSchema methodprivate
Make calculateSchema method public
Feb 23, 2020
Feature Description
I use my custom implementation of the
OpenApiCustomiser
interface to complete the auto-generated Open API specification. I inject theResponseBuilder
object to calculateSchema
instances that describe non-2xx response bodies. SinceResponseBuilder
'scalculateSchema
method is a private method, it can only be called through reflection.To Reproduce
Steps to reproduce the behavior:
ResponseBuilder
into a@Component
ResponseBuilder::calculateSchema(...)
'calculateSchema(io.swagger.v3.oas.models.Components, java.lang.reflect.ParameterizedType, com.fasterxml.jackson.annotation.JsonView)' has private access in 'org.springdoc.core.AbstractResponseBuilder'
Expected behavior
ResponseBuilder::calculateSchema(...)
should be a public method.One of the core functionalities of
ResponseBuilder
is providing schema calculation functionality. I see no other way of easily calculating the schema of an arbitrary type, thusResponseBuilder::calculateSchema(...)
should be public, not private.The text was updated successfully, but these errors were encountered: