Java Code Examples for io.swagger.v3.oas.models.parameters.Parameter#getRequired()
The following examples show how to use
io.swagger.v3.oas.models.parameters.Parameter#getRequired() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OASMergeUtil.java From crnk-framework with Apache License 2.0 | 6 votes |
public static Parameter mergeParameter(Parameter thisParameter, Parameter thatParameter) { if (thatParameter.getName() != null) { thisParameter.setName(thatParameter.getName()); } if (thatParameter.getIn() != null) { thisParameter.setIn(thatParameter.getIn()); } if (thatParameter.getDescription() != null) { thisParameter.setDescription(thatParameter.getDescription()); } if (thatParameter.getRequired() != null) { thisParameter.setRequired(thatParameter.getRequired()); } if (thatParameter.getDeprecated() != null) { thisParameter.setDeprecated(thatParameter.getDeprecated()); } if (thatParameter.getAllowEmptyValue() != null) { thisParameter.setAllowEmptyValue(thatParameter.getAllowEmptyValue()); } if (thatParameter.get$ref() != null) { thisParameter.set$ref(thatParameter.get$ref()); } return thisParameter; }
Example 2
Source File: BallerinaParameter.java From product-microgateway with Apache License 2.0 | 5 votes |
@Override public BallerinaParameter buildContext(Parameter parameter, ExtendedAPI api) throws BallerinaServiceGenException { this.name = parameter.getName(); this.in = parameter.getIn(); this.description = parameter.getDescription(); this.required = parameter.getRequired(); this.allowEmptyValue = parameter.getAllowEmptyValue(); return this; }
Example 3
Source File: GenericParameterBuilder.java From springdoc-openapi with Apache License 2.0 | 4 votes |
/** * Merge parameter. * * @param paramCalcul the param calcul * @param paramDoc the param doc */ private static void mergeParameter(Parameter paramCalcul, Parameter paramDoc) { if (StringUtils.isBlank(paramDoc.getDescription())) paramDoc.setDescription(paramCalcul.getDescription()); if (StringUtils.isBlank(paramDoc.getIn())) paramDoc.setIn(paramCalcul.getIn()); if (paramDoc.getExample() == null) paramDoc.setExample(paramCalcul.getExample()); if (paramDoc.getDeprecated() == null) paramDoc.setDeprecated(paramCalcul.getDeprecated()); if (paramDoc.getRequired() == null) paramDoc.setRequired(paramCalcul.getRequired()); if (paramDoc.getAllowEmptyValue() == null) paramDoc.setAllowEmptyValue(paramCalcul.getAllowEmptyValue()); if (paramDoc.getAllowReserved() == null) paramDoc.setAllowReserved(paramCalcul.getAllowReserved()); if (StringUtils.isBlank(paramDoc.get$ref())) paramDoc.set$ref(paramDoc.get$ref()); if (paramDoc.getSchema() == null) paramDoc.setSchema(paramCalcul.getSchema()); if (paramDoc.getExamples() == null) paramDoc.setExamples(paramCalcul.getExamples()); if (paramDoc.getExtensions() == null) paramDoc.setExtensions(paramCalcul.getExtensions()); if (paramDoc.getStyle() == null) paramDoc.setStyle(paramCalcul.getStyle()); if (paramDoc.getExplode() == null) paramDoc.setExplode(paramCalcul.getExplode()); }