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
OpenApiTypeDescriberimplementation 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 theobjectto 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 voiddescribe(JSONObject description, java.lang.reflect.Parameter parameter)Describes a REST event handler method parameter.voiddescribeReturnType(JSONObject description, java.lang.reflect.Method method)Describes a REST event handler method return type.voiddescribeSchema(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:OpenApiTypeDescriberDescribes a REST event handler method parameter.- Specified by:
describein interfaceOpenApiTypeDescriber- Parameters:
description-JSONObjectcontaining 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:OpenApiTypeDescriberDescribes a REST event handler method return type.- Specified by:
describeReturnTypein interfaceOpenApiTypeDescriber- Parameters:
description-JSONObjectcontaining 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:OpenApiTypeDescriberDescribes the schema of a mapped entity class- Specified by:
describeSchemain interfaceOpenApiTypeDescriber- Parameters:
entity- an entity class.schemas-JSONObjectwhere the entity description should be added.- See Also:
MappedEntityManager
-
-