Class DefaultOpenApiTypeDescriber
- java.lang.Object
-
- org.apache.tapestry5.internal.services.rest.DefaultOpenApiTypeDescriber
-
- All Implemented Interfaces:
OpenApiTypeDescriber
public class DefaultOpenApiTypeDescriber extends java.lang.Object implements OpenApiTypeDescriber
OpenApiTypeDescriber
implementation that handles some basic types, mostly primitives and String. Since this is the fallback, if the parameter doesn't have any handled type, it defaults to give theobject
to it without providing properties.
-
-
Constructor Summary
Constructors Constructor Description DefaultOpenApiTypeDescriber(MappedEntityManager mappedEntityManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
describe(JSONObject description, java.lang.reflect.Parameter parameter)
Describes a REST event handler method parameter.void
describeReturnType(JSONObject description, java.lang.reflect.Method method)
Describes a REST event handler method return type.void
describeSchema(java.lang.Class<?> entity, JSONObject schemas)
Describes the schema of a mapped entity class
-
-
-
Constructor Detail
-
DefaultOpenApiTypeDescriber
public DefaultOpenApiTypeDescriber(MappedEntityManager mappedEntityManager)
-
-
Method Detail
-
describe
public void describe(JSONObject description, java.lang.reflect.Parameter parameter)
Description copied from interface:OpenApiTypeDescriber
Describes a REST event handler method parameter.- Specified by:
describe
in interfaceOpenApiTypeDescriber
- Parameters:
description
-JSONObject
containing the description of an event handler parameter.parameter
- the event handler method parameter.
-
describeReturnType
public void describeReturnType(JSONObject description, java.lang.reflect.Method method)
Description copied from interface:OpenApiTypeDescriber
Describes a REST event handler method return type.- Specified by:
describeReturnType
in interfaceOpenApiTypeDescriber
- Parameters:
description
-JSONObject
containing the description of a path response.method
- the event handler method itself.
-
describeSchema
public void describeSchema(java.lang.Class<?> entity, JSONObject schemas)
Description copied from interface:OpenApiTypeDescriber
Describes the schema of a mapped entity class- Specified by:
describeSchema
in interfaceOpenApiTypeDescriber
- Parameters:
entity
- an entity class.schemas
-JSONObject
where the entity description should be added.- See Also:
MappedEntityManager
-
-