2 * Copyright (c) 2014, Danilo Reinert (daniloreinert@growbit.com)
4 * This software is dual-licensed under:
6 * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any
8 * - the Apache Software License (ASL) version 2.0.
10 * The text of both licenses is available under the src/resources/ directory of
11 * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively).
13 * Direct link to the sources:
15 * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt
16 * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
19 package com.github.reinert.jjschema;
21 import java.lang.annotation.ElementType;
22 import java.lang.annotation.Retention;
23 import java.lang.annotation.RetentionPolicy;
24 import java.lang.annotation.Target;
27 * Annotation for the attributes of JSON Schema
31 @Retention(RetentionPolicy.RUNTIME)
32 @Target({ ElementType.METHOD, ElementType.FIELD, ElementType.TYPE })
33 public @interface Attributes
35 String $ref() default "";
37 String id() default "";
39 String title() default "";
41 String description() default "";
43 long maximum() default -1l;
45 boolean exclusiveMaximum() default false;
47 int minimum() default -1;
49 boolean exclusiveMinimum() default false;
51 String pattern() default "";
53 boolean required() default false;
55 String[] enums() default {};
57 int minItems() default 0;
59 long maxItems() default -1l;
61 boolean uniqueItems() default false;
63 int multipleOf() default 0;
65 int minLength() default 0;
67 long maxLength() default -1l;