protected Example loadExample(Syntax syntax, MediaTypeDescriptor descriptor) { Example example = ExampleUtils.loadCustomExample(syntax, "requestExample", this.resourceMethod, this.resourceMethod.getContext().getContext()); if (example == null) { example = descriptor.getExample(); if (this.entityParameter != null) { DocumentationExample documentationExample = this.entityParameter.getAnnotation(DocumentationExample.class); if (documentationExample != null) { TypeMirror typeHint = TypeHintUtils.getTypeHint(documentationExample.type(), this.resourceMethod.getContext().getContext().getProcessingEnvironment(), null); if (typeHint instanceof DeclaredType) { Element element = ((DeclaredType) typeHint).asElement(); if (element instanceof TypeElement) { List<DataType> dataTypes = syntax.findDataTypes(((TypeElement) element).getQualifiedName().toString()); if (dataTypes != null && !dataTypes.isEmpty()) { example = dataTypes.get(0).getExample(); } } } } } } return example; }
&& !ExampleUtils.isExcluded(type.getWildcardMember())) { node.put("extension1", "..."); node.put("extension2", "...");
&& !ExampleUtils.isExcluded(type.getWildcardMember())) { node.put("extension1", "..."); node.put("extension2", "...");
protected Example loadExample(Syntax syntax, MediaTypeDescriptor descriptor) { Example example = ExampleUtils.loadCustomExample(syntax, "requestExample", this.requestMapping, this.requestMapping.getContext().getContext()); if (example == null) { example = descriptor.getExample(); if (this.entityParameter != null) { DocumentationExample documentationExample = this.entityParameter.getAnnotation(DocumentationExample.class); if (documentationExample != null) { TypeMirror typeHint = TypeHintUtils.getTypeHint(documentationExample.type(), this.requestMapping.getContext().getContext().getProcessingEnvironment(), null); if (typeHint instanceof DeclaredType) { Element element = ((DeclaredType) typeHint).asElement(); if (element instanceof TypeElement) { List<DataType> dataTypes = syntax.findDataTypes(((TypeElement) element).getQualifiedName().toString()); if (dataTypes != null && !dataTypes.isEmpty()) { example = dataTypes.get(0).getExample(); } } } } } } return example; }
&& !ExampleUtils.isExcluded(type.getWildcardMember())) { node.put("extension1", "..."); node.put("extension2", "...");
protected Example loadExample(Syntax syntax, MediaTypeDescriptor descriptor) { Example example = ExampleUtils.loadCustomExample(syntax, "responseExample", this.requestMapping, this.requestMapping.getContext().getContext());
&& !ExampleUtils.isExcluded(type.getWildcardMember())) { node.put("extension1", "..."); node.put("extension2", "...");
protected Example loadExample(Syntax syntax, MediaTypeDescriptor descriptor) { Example example = ExampleUtils.loadCustomExample(syntax, "responseExample", this.resourceMethod, this.resourceMethod.getContext().getContext());