public class ModelBuilder extends Object
| 构造器和说明 |
|---|
ModelBuilder() |
| 限定符和类型 | 方法和说明 |
|---|---|
ModelBuilder |
baseModel(String baseModel)
Update the based model
|
Model |
build() |
ModelBuilder |
description(String description)
Update the description of the model
|
ModelBuilder |
discriminator(String discriminator)
Updates inheritance discriminator, used to identify inherited subclasses.
|
ModelBuilder |
example(Object example)
Updates the Example for the model
|
ModelBuilder |
example(String example)
已过时。
@since 2.8.1 Use the one which takes in an Object instead
|
ModelBuilder |
id(String id)
Updates the Id of the model, usually the type name
|
ModelBuilder |
name(String name)
Updates the Name of the model
|
ModelBuilder |
properties(Map<String,ModelProperty> properties)
Updates the model properties
|
ModelBuilder |
qualifiedType(String qualifiedType)
Fully package qualified name of the model
|
ModelBuilder |
subTypes(List<ModelReference> subTypes)
Updates the subclasses for this model.
|
ModelBuilder |
type(com.fasterxml.classmate.ResolvedType modelType)
Represents the type information with full fidelity of generics
|
ModelBuilder |
xml(Xml xml) |
public ModelBuilder id(String id)
id - - identifier for the modelpublic ModelBuilder name(String name)
name - - name of the modelpublic ModelBuilder qualifiedType(String qualifiedType)
qualifiedType - - package qualified namepublic ModelBuilder properties(Map<String,ModelProperty> properties)
properties - - map of properties by namepublic ModelBuilder description(String description)
description - - descriptionpublic ModelBuilder baseModel(String baseModel)
baseModel - - based model as in inherited parent model. We currently don't implement this featurepublic ModelBuilder discriminator(String discriminator)
discriminator - - inheritance discriminatorpublic ModelBuilder subTypes(List<ModelReference> subTypes)
subTypes - - Models inheriting from this model@Deprecated public ModelBuilder example(String example)
example - - example of the modelpublic ModelBuilder example(Object example)
example - - example of the modelpublic ModelBuilder type(com.fasterxml.classmate.ResolvedType modelType)
modelType - - resolved type that represents the modelpublic ModelBuilder xml(Xml xml)
public Model build()
Copyright © 2023. All rights reserved.