[jackson-annotations] 133/207: Annotation for defining a human readable description for each property. To be used for JSON Schema generation.

Timo Aaltonen tjaalton at moszumanska.debian.org
Sat Sep 6 13:55:47 UTC 2014


This is an automated email from the git hooks/post-receive script.

tjaalton pushed a commit to branch master
in repository jackson-annotations.

commit 49bbe8ada00c5c675ec67d4c3579a2666cec82fc
Author: Ian Forsey <ian.forsey at net-a-porter.com>
Date:   Wed May 29 09:54:17 2013 +0100

    Annotation for defining a human readable description for each property. To be used for JSON Schema generation.
---
 .../annotation/JsonPropertyDescription.java        | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonPropertyDescription.java b/src/main/java/com/fasterxml/jackson/annotation/JsonPropertyDescription.java
new file mode 100644
index 0000000..19429e1
--- /dev/null
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonPropertyDescription.java
@@ -0,0 +1,25 @@
+package com.fasterxml.jackson.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotaion used to define a human readable description for a logical
+ * property.
+ * Currently used to populate the description field in generated JSON
+ * Schemas.
+ */
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+ at Retention(RetentionPolicy.RUNTIME)
+ at JacksonAnnotation
+public @interface JsonPropertyDescription
+{
+    /**
+     * Defines a human readable description of the logical property.
+     * Currently used to populate the description field in generated JSON
+     * Schemas.
+     */
+    String value() default "";
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jackson-annotations.git



More information about the pkg-java-commits mailing list