/** * 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(Response a) { if (a == null) return true; return allEmpty(a.description(), a.example(), a.examples(), a.api()) && a.headers().length == 0 && empty(a.schema()) ; }
/** * 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(Response a) { if (a == null) return true; return allEmpty(a.description(), a.example(), a.examples(), a.api()) && a.headers().length == 0 && empty(a.schema()) ; }
/** * 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(Response a) { if (a == null) return true; return allEmpty(a.description(), a.example(), a.examples(), a.api()) && a.headers().length == 0 && empty(a.schema()) ; }
private ObjectMap merge(ObjectMap om, Response a) throws ParseException { if (empty(a)) return om; om = newMap(om); if (a.api().length > 0) om.putAll(parseMap(a.api())); return om .appendSkipEmpty("description", resolve(a.description())) .appendSkipEmpty("x-example", resolve(a.example())) .appendSkipEmpty("examples", parseMap(a.examples())) .appendSkipEmpty("headers", merge(om.getObjectMap("headers"), a.headers())) .appendSkipEmpty("schema", merge(om.getObjectMap("schema"), a.schema())) ; }
private ObjectMap merge(ObjectMap om, Response a) throws ParseException { if (empty(a)) return om; om = newMap(om); if (a.api().length > 0) om.putAll(parseMap(a.api())); return om .appendSkipEmpty("description", resolve(a.description())) .appendSkipEmpty("x-example", resolve(a.example())) .appendSkipEmpty("examples", parseMap(a.examples())) .appendSkipEmpty("headers", merge(om.getObjectMap("headers"), a.headers())) .appendSkipEmpty("schema", merge(om.getObjectMap("schema"), a.schema())) ; }
private ObjectMap merge(ObjectMap om, Response a) throws ParseException { if (empty(a)) return om; om = newMap(om); if (a.api().length > 0) om.putAll(parseMap(a.api())); return om .appendSkipEmpty("description", resolve(a.description())) .appendSkipEmpty("x-example", resolve(a.example())) .appendSkipEmpty("examples", parseMap(a.examples())) .appendSkipEmpty("headers", merge(om.getObjectMap("headers"), a.headers())) .appendSkipEmpty("schema", merge(om.getObjectMap("schema"), a.schema())) ; }