private List<Parameter> expandParameter(Map<String, Model> models, RouteParameter it, Supplier<SerializableParameter> factory, String typeName, String prefix, boolean optional) { List<Parameter> parameters = new ArrayList<>(); Model model = models.get(typeName); Map<String, Property> properties = model.getProperties(); Optional.ofNullable(properties).ifPresent(props -> props.values().stream() .flatMap(p -> { SerializableParameter result = complement(p, it, factory.get()); String name = prefix + p.getName(); if (p instanceof RefProperty) { return expandParameter(models, it, factory, ((RefProperty) p).getSimpleRef(), name + ".", optional).stream(); } else { result.setName(name); boolean required; if (optional) { required = false; } else { required = p.getRequired(); } String desc = Strings.emptyToNull(p.getDescription()); result.setRequired(required); result.setDescription(desc); return Stream.of(result); } }) .forEach(parameters::add) ); return parameters; }
parameter.setName(it.name()); parameter.setRequired(!it.optional()); parameter.setDescription(property.getDescription()); it.description().ifPresent(parameter::setDescription); return Stream.of(parameter);
String description = markupDescription(config.getSwaggerMarkupLanguage(), markupDocBuilder, property.getDescription()); if (isNotBlank(description)) descriptionContent.text(description);
PropertyAdapter headerPropertyAdapter = new PropertyAdapter(headerProperty); Type propertyType = headerPropertyAdapter.getType(definitionDocumentResolver); String headerDescription = markupDescription(config.getSwaggerMarkupLanguage(), markupDocBuilder, headerProperty.getDescription()); Optional<Object> optionalDefaultValue = headerPropertyAdapter.getDefaultValue();
private String li_changedProp(ElProperty prop) { Property property = prop.getProperty(); String prefix = "Modify "; String desc = " //" + property.getDescription(); String postfix = (null == property.getDescription() ? "" : desc); StringBuffer sb = new StringBuffer(""); sb.append(prefix).append(prop.getEl()) .append(postfix); return sb.toString(); }
private String li_addProp(ElProperty prop) { Property property = prop.getProperty(); StringBuffer sb = new StringBuffer(""); sb.append("Insert ").append(prop.getEl()) .append(null == property.getDescription() ? "" : (" //" + property.getDescription())); return sb.toString(); }
private String li_missingProp(ElProperty prop) { Property property = prop.getProperty(); StringBuffer sb = new StringBuffer(""); sb.append("Delete ").append(prop.getEl()) .append(null == property.getDescription() ? "" : (" //" + property.getDescription())); return sb.toString(); }
private static String determineTitleOf(final String name, final Property schema) { final String title = schema.getTitle(); if (title != null) { return title; } final String description = schema.getDescription(); if (description != null) { return description; } final String reference = determineSchemaReference(schema); if (reference != null) { return reference.replaceAll("^.*/", ""); } return name; }
private static String determineTitleOf(final String name, final Property schema) { final String title = schema.getTitle(); if (title != null) { return title; } final String description = schema.getDescription(); if (description != null) { return description; } final String reference = JsonSchemaHelper.determineSchemaReference(schema); if (reference != null) { return reference.replaceAll("^.*/", ""); } return name; }
private void createModel(RestApi api, String modelName, Property model, String modelContentType) { LOG.info(format("Creating model for api id %s with name %s", api.getId(), modelName)); createModel(api, modelName, model.getDescription(), generateSchema(model, modelName, swagger.getDefinitions()), modelContentType); }
private List<Parameter> expandParameter(Map<String, Model> models, RouteParameter it, Supplier<SerializableParameter> factory, String typeName, String prefix, boolean optional) { List<Parameter> parameters = new ArrayList<>(); Model model = models.get(typeName); Map<String, Property> properties = model.getProperties(); Optional.ofNullable(properties).ifPresent(props -> props.values().stream() .flatMap(p -> { SerializableParameter result = complement(p, it, factory.get()); String name = prefix + p.getName(); if (p instanceof RefProperty) { return expandParameter(models, it, factory, ((RefProperty) p).getSimpleRef(), name + ".", optional).stream(); } else { result.setName(name); boolean required; if (optional) { required = false; } else { required = p.getRequired(); } String desc = Strings.emptyToNull(p.getDescription()); result.setRequired(required); result.setDescription(desc); return Stream.of(result); } }) .forEach(parameters::add) ); return parameters; }
private ContainerTag li_addProp(ElProperty prop) { Property property = prop.getProperty(); return li().withText("Add " + prop.getEl()).with(span(null == property.getDescription() ? "" : ("//" + property.getDescription())).withClass("comment")); }
private Header convertHeader(Property property) { Schema schema = convert(property); schema.setDescription(null); Header header = new Header(); header.setDescription(property.getDescription()); header.setSchema(schema); return header; }
private Header convertHeader(Property property) { Schema schema = convert(property); schema.setDescription(null); Header header = new Header(); header.setDescription(property.getDescription()); header.setSchema(schema); return header; }
private Header convertHeader(Property property) { Schema schema = convert(property); schema.setDescription(null); Header header = new Header(); header.setDescription(property.getDescription()); header.setSchema(schema); return header; }
private ContainerTag li_missingProp(ElProperty prop) { Property property = prop.getProperty(); return li().withClass("missing").withText("Delete").with(del(prop.getEl())).with(span(null == property.getDescription() ? "" : ("//" + property.getDescription())).withClass("comment")); }
protected ModelImpl createModel(Property property) { return new ModelImpl().type(property.getType()).format(property.getFormat()) .description(property.getDescription()); }
@Override public void execute(String name, String nameInSource, Property property, boolean array) { String type = getPropertyType(property, array); if (procedure.getParameterByName(nameInSource) == null) { ProcedureParameter param = mf.addProcedureParameter(name, type, Type.In, procedure); param.setProperty(PARAMETER_TYPE, parameter.getIn()); if (property != null && !property.getRequired()) { param.setProperty(BaseColumn.DEFAULT_HANDLING, BaseColumn.OMIT_DEFAULT); } param.setNullType(NullType.No_Nulls); param.setAnnotation(property!=null?property.getDescription():null); if (!name.equalsIgnoreCase(nameInSource)) { param.setNameInSource(nameInSource); } } } };
result.setDescription(property.getDescription()); serializable(result).ifPresent(ser -> { ser.setDescription(property.getDescription()); ser.setType(property.getType()); ser.setFormat(property.getFormat());
String _description = null; if (_value_1!=null) { _description=_value_1.getDescription();