Class AbstractOpenAPIMetadata
java.lang.Object
org.brapi.schematools.core.openapi.generator.metadata.AbstractOpenAPIMetadata
- All Implemented Interfaces:
Metadata,Validatable
- Direct Known Subclasses:
DeleteMetadata,ListGetMetadata,PostMetadata,PutMetadata,SearchMetadata,SingleGetMetadata
Base class for OpenAPI metadata
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringgetDescriptionOrDefault(@NonNull String name, String defaultValue) Gets the description for a specific primary modelfinal StringgetDescriptionOrDefault(@NonNull BrAPIType type, String defaultValue) Gets the description for a specific primary modelfinal StringgetSummaryOrDefault(@NonNull String name, String defaultValue) Gets the summary for a specific primary modelfinal StringgetSummaryOrDefault(@NonNull BrAPIType type, String defaultValue) Gets the summary for a specific primary modelvoidoverride(AbstractOpenAPIMetadata overrideMetadata) Overrides the values in this Options Object from the provided Options Object if they are non-nullsetDescriptionFor(String name, String description) Sets the description for a specific primary model.setSummaryFor(String name, String description) Sets the summary for a specific primary model.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.brapi.schematools.core.validiation.Validatable
validate
-
Constructor Details
-
AbstractOpenAPIMetadata
public AbstractOpenAPIMetadata()
-
-
Method Details
-
override
Overrides the values in this Options Object from the provided Options Object if they are non-null- Parameters:
overrideMetadata- the options which will be used to override this Options Object
-
getSummaryOrDefault
Gets the summary for a specific primary model- Parameters:
name- the name of the primary modeldefaultValue- default value used if model is not found in mapsummaries- Returns:
- the summary for a specific primary model
-
getSummaryOrDefault
Gets the summary for a specific primary model- Parameters:
type- the primary modeldefaultValue- default value used if model is not found in mapsummaries- Returns:
- the summary for a specific primary model
-
setSummaryFor
Sets the summary for a specific primary model.- Parameters:
name- the name of the primary modeldescription- the summary for a specific primary model.- Returns:
- the options for chaining
-
getDescriptionOrDefault
Gets the description for a specific primary model- Parameters:
name- the name of the primary modeldefaultValue- default value used if model is not found in mapdescriptions- Returns:
- the description for a specific primary model
-
getDescriptionOrDefault
Gets the description for a specific primary model- Parameters:
type- the primary modeldefaultValue- default value used if model is not found in mapdescriptions- Returns:
- the description for a specific primary model
-
setDescriptionFor
Sets the description for a specific primary model.- Parameters:
name- the name of the primary modeldescription- the description for a specific primary model.- Returns:
- the options for chaining
-