/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(License a) { if (a == null) return true; return allEmpty(a.value()) && allEmpty(a.name(), a.url()); }
@RestResource( title="a-title", description="a-description", swagger=@ResourceSwagger( value= { "info:{", "title:'b-title',", "description:'b-description',", "version:'2.0.0',", "termsOfService:'a-termsOfService',", "contact:{name:'a-name',url:'a-url',email:'a-email'},", "license:{name:'a-name',url:'a-url'}", "}" }, title="c-title", description="c-description", version="3.0.0", termsOfService="b-termsOfService", contact=@Contact(name="b-name",url="b-url",email="b-email"), license=@License(name="b-name",url="b-url") ) ) public static class B05 {}
@RestResource( title="a-title", description="a-description", swagger=@ResourceSwagger( value= { "info:{", "title:'b-title',", "description:'b-description',", "version:'2.0.0',", "termsOfService:'a-termsOfService',", "contact:{name:'a-name',url:'a-url',email:'a-email'},", "license:{name:'a-name',url:'a-url'}", "}" }, title="$L{baz}", description="$L{baz}", version="$L{foo}", termsOfService="$L{foo}", contact=@Contact("{name:'$L{foo}',url:'$L{bar}',email:'$L{baz}'}"), license=@License("{name:'$L{foo}',url:'$L{bar}'}") ), messages="BasicRestInfoProviderTest" ) public static class B06 {}
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(License a) { if (a == null) return true; return allEmpty(a.value()) && allEmpty(a.name(), a.url()); }
Contact x1() default @Contact; ExternalDocs x2() default @ExternalDocs; License x3() default @License; Schema x4() default @Schema; SubItems x5() default @SubItems;
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(License a) { if (a == null) return true; return allEmpty(a.value()) && allEmpty(a.name(), a.url()); }
private ObjectMap toMap(License a, String location, Object...locationArgs) throws ParseException { if (empty(a)) return null; ObjectMap om = newMap(new ObjectMap(), a.value(), location, locationArgs); om.appendSkipEmpty("name", resolve(a.name())); om.appendSkipEmpty("url", resolve(a.url())); return nullIfEmpty(om); }
private ObjectMap toMap(License a, String location, Object...locationArgs) throws ParseException { if (empty(a)) return null; ObjectMap om = newMap(new ObjectMap(), a.value(), location, locationArgs); om.appendSkipEmpty("name", resolve(a.name())); om.appendSkipEmpty("url", resolve(a.url())); return nullIfEmpty(om); }
private ObjectMap toMap(License a, String location, Object...locationArgs) throws ParseException { if (empty(a)) return null; ObjectMap om = newMap(new ObjectMap(), a.value(), location, locationArgs); om.appendSkipEmpty("name", resolve(a.name())); om.appendSkipEmpty("url", resolve(a.url())); return nullIfEmpty(om); }