nameColumnBuilder.add(boldText(markupDocBuilder, crossReference(markupDocBuilder, securityDocumentResolver.apply(securityKey), securityKey, securityKey))); scopeColumnBuilder.add(Joiner.on(",").join(securityEntry.getValue()));
String refName = ((RefParameter) parameter).getSimpleRef(); type = new RefType(definitionDocumentResolver.apply(refName), new ObjectType(refName, null /* FIXME, not used for now */));
return new RefType(definitionDocumentResolver.apply(refName), refType); } else if (model instanceof ArrayModel) { ArrayModel arrayModel = ((ArrayModel) model);
type = new ObjectType(refProperty.getTitle(), null); // FIXME : Workaround for https://github.com/swagger-api/swagger-parser/issues/177 else type = new RefType(definitionDocumentResolver.apply(refProperty.getSimpleRef()), new ObjectType(refProperty.getSimpleRef(), null /* FIXME, not used for now */)); } else if (property instanceof ArrayProperty) { ArrayProperty arrayProperty = (ArrayProperty) property;
public Type getType(DocumentResolver definitionDocumentResolver) { if (schema.get$ref() != null) { String refName = RefUtils.computeSimpleRef(schema.get$ref()); return type = new RefType(definitionDocumentResolver.apply(refName), new ObjectType(refName, null)); } else { return ModelUtils.getType(schema, context.getSwagger().getComponents().getSchemas(), definitionDocumentResolver); } }
/** * Retrieves the type of a parameter, or otherwise null * * @param definitionDocumentResolver the definition document resolver * @return the type of the parameter, or otherwise null */ private Type getType(DocumentResolver definitionDocumentResolver) { Validate.notNull(parameter, "parameter must not be null!"); Type type; if (parameter.get$ref() != null) { String refName = RefUtils.computeSimpleRef(parameter.get$ref()); type = new RefType(definitionDocumentResolver.apply(refName), new ObjectType(refName, null)); } else { Schema serializableParameter = parameter.getSchema(); @SuppressWarnings("unchecked") List<String> enums = serializableParameter.getEnum(); if (CollectionUtils.isNotEmpty(enums)) { type = new EnumType(serializableParameter.getName(), enums); } else { type = new BasicType(serializableParameter.getType(), serializableParameter.getName(), serializableParameter.getFormat()); } if (serializableParameter.getType().equals("array")) { String collectionFormat = serializableParameter.getFormat(); type = new ArrayType(serializableParameter.getName(), new PropertyAdapter(serializableParameter).getType(definitionDocumentResolver), collectionFormat); } } return type; }
nameColumnBuilder.add(boldText(markupDocBuilder, crossReference(markupDocBuilder, securityDocumentResolver.apply(securityKey), securityKey, securityKey))); scopeColumnBuilder.add(Joiner.on(",").join(securityEntry.getValue()));
nameColumnBuilder.add(boldText(markupDocBuilder, crossReference(markupDocBuilder, securityDocumentResolver.apply(securityKey), securityKey, securityKey))); scopeColumnBuilder.add(Joiner.on(",").join(securityEntry.getValue()));
String refName = ((RefParameter) parameter).getSimpleRef(); type = new RefType(definitionDocumentResolver.apply(refName), new ObjectType(refName, null /* FIXME, not used for now */));
return new RefType(definitionDocumentResolver.apply(refName), refType); } else if (model instanceof ArraySchema) { ArraySchema arrayModel = ((ArraySchema) model);
return new RefType(definitionDocumentResolver.apply(refName), refType); } else if (model instanceof ArrayModel) { ArrayModel arrayModel = ((ArrayModel) model);
if (property.get$ref() != null) { String ref = computeSimpleRef(property.get$ref()); type = new RefType(definitionDocumentResolver.apply(ref), new ObjectType(ref, null /*FIXME, not used for now */)); } else if (property instanceof ArraySchema) { ArraySchema arrayProperty = (ArraySchema) property;
type = new ObjectType(refProperty.getTitle(), null); // FIXME : Workaround for https://github.com/swagger-api/swagger-parser/issues/177 else type = new RefType(definitionDocumentResolver.apply(refProperty.getSimpleRef()), new ObjectType(refProperty.getSimpleRef(), null /* FIXME, not used for now */)); } else if (property instanceof ArrayProperty) { ArrayProperty arrayProperty = (ArrayProperty) property;