use of org.glassfish.jersey.server.wadl.internal.generators.resourcedoc.model.RequestDocType in project jersey by jersey.
the class ResourceDoclet method addRequestRepresentationDoc.
private static void addRequestRepresentationDoc(final MethodDoc methodDoc, final MethodDocType methodDocType) {
final Tag requestElement = getSingleTagOrNull(methodDoc, "request.representation.qname");
final Tag requestExample = getSingleTagOrNull(methodDoc, "request.representation.example");
if (requestElement != null || requestExample != null) {
final RequestDocType requestDoc = new RequestDocType();
final RepresentationDocType representationDoc = new RepresentationDocType();
/* requestElement exists
*/
if (requestElement != null) {
representationDoc.setElement(QName.valueOf(requestElement.text()));
}
/* requestExample exists
*/
if (requestExample != null) {
final String example = getSerializedExample(requestExample);
if (!isEmpty(example)) {
representationDoc.setExample(example);
} else {
LOG.warning("Could not get serialized example for method " + methodDoc.qualifiedName());
}
}
requestDoc.setRepresentationDoc(representationDoc);
methodDocType.setRequestDoc(requestDoc);
}
}
Aggregations