Package io.swagger.converter
Interface ModelConverterContext
-
- All Known Implementing Classes:
ModelConverterContextImpl
public interface ModelConverterContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
defineModel(String name, Model model)
needs to be called whenever a Model is defined which can be referenced from another Model or Propertyvoid
defineModel(String name, Model model, Type type, String prevName)
needs to be called whenever a Model is defined which can be referenced from another Model or PropertyIterator<ModelConverter>
getConverters()
com.fasterxml.jackson.annotation.JsonView
getJsonView()
Model
resolve(Type type)
Property
resolveProperty(Type type, Annotation[] annotations)
void
setJsonView(com.fasterxml.jackson.annotation.JsonView view)
-
-
-
Method Detail
-
defineModel
void defineModel(String name, Model model)
needs to be called whenever a Model is defined which can be referenced from another Model or Property- Parameters:
name
- the name of the modelmodel
- the Model
-
defineModel
void defineModel(String name, Model model, Type type, String prevName)
needs to be called whenever a Model is defined which can be referenced from another Model or Property- Parameters:
name
- the name of the modelmodel
- the Modeltype
- the TypeprevName
- the (optional) previous name
-
resolveProperty
Property resolveProperty(Type type, Annotation[] annotations)
- Parameters:
type
- the property Class- Returns:
- a property representation of the Class. Any referenced models will be defined already.
-
resolve
Model resolve(Type type)
- Parameters:
type
- The Model Class- Returns:
- a Model representation of the Class. Any referenced models will be defined already.
-
getConverters
Iterator<ModelConverter> getConverters()
- Returns:
- an Iterator of ModelConverters. This iterator is not reused
-
getJsonView
com.fasterxml.jackson.annotation.JsonView getJsonView()
- Returns:
- A nullable JsonView annotation.
-
setJsonView
void setJsonView(com.fasterxml.jackson.annotation.JsonView view)
- Parameters:
view
- A nullable JsonView annotation, which is normally added to the annotated method to filter the response.
-
-