public Property createSwaggerPropertyWithConstraints(final MessageParameter parameter) { Property _xblockexpression = null; { final SourceReference sourceReference = parameter.getSourceReference(); final Property prop = this.getSwaggerProperty(sourceReference.getType().getName()); this.setConstraints(prop, this.getMessageParameterConstraints(parameter)); _xblockexpression = prop; } return _xblockexpression; }
public List<Constraint> getMessageParameterConstraints(final MessageParameter parameter) { final SourceReference ref = parameter.getSourceReference(); boolean _matched = false; if (ref instanceof PropertyReference) { _matched=true; final Function1<PropertyRealization, Boolean> _function = (PropertyRealization it) -> { Feature _baseProperty = it.getBaseProperty(); PrimitiveProperty _conceptualFeature = ((PropertyReference)ref).getConceptualFeature(); return Boolean.valueOf(Objects.equal(_baseProperty, _conceptualFeature)); }; PropertyRealization property = IterableExtensions.<PropertyRealization>findFirst(parameter.getContainingMessage().getIncludedProperties(), _function); if ((property == null)) { return ((PropertyReference)ref).getConceptualFeature().getAllConstraints(); } return property.getAllConstraints(); } return null; }
_builder.append(" "); _builder.append("\"isProperty\": "); SourceReference _sourceReference = parameter.getSourceReference(); _builder.append((_sourceReference instanceof PropertyReference), " "); _builder.append(","); _builder.newLineIfNotEmpty(); SourceReference _sourceReference_1 = parameter.getSourceReference(); if ((_sourceReference_1 instanceof PropertyReference)) { _builder.append(" "); _builder.append("\"property\": \""); SourceReference _sourceReference_2 = parameter.getSourceReference(); String _name = ((PropertyReference) _sourceReference_2).getConceptualFeature().getName(); _builder.append(_name, " "); String _referenceFeatureId = this._xFeatureExtensions.referenceFeatureId(resource, parameter.getSourceReference()); _builder.append(_referenceFeatureId, " "); _builder.append("\",");
_builder.append(" "); _builder.append("<td>"); String _paramType = this.paramHelper.paramType(param.getSourceReference(), this.importHelper); _builder.append(_paramType, " "); _builder.append("</td>");