This repository was archived by the owner on Jun 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
endpoints-framework/src/main/java/com/google/api/server/spi Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,10 +195,6 @@ private Schema createBeanSchema(
195195 Schema .Builder builder = Schema .builder ()
196196 .setName (Types .getSimpleName (type , config .getSerializationConfig ()))
197197 .setType ("object" );
198- final Description description = type .getRawType ().getAnnotation (Description .class );
199- if (description != null ) {
200- builder .setDescription (description .value ());
201- }
202198 ResourceSchema schema = resourceSchemaProvider .getResourceSchema (type , config );
203199 for (Entry <String , ResourcePropertySchema > entry : schema .getProperties ().entrySet ()) {
204200 String propertyName = entry .getKey ();
Original file line number Diff line number Diff line change @@ -243,7 +243,9 @@ private JsonSchema convertToDiscoverySchema(Schema schema) {
243243
244244 private JsonSchema convertToDiscoverySchema (Field f ) {
245245 if (f .schemaReference () != null ) {
246- return new JsonSchema ().set$ref (f .schemaReference ().get ().name ());
246+ return new JsonSchema ()
247+ .setDescription (f .description ())
248+ .set$ref (f .schemaReference ().get ().name ());
247249 }
248250 JsonSchema fieldSchema = new JsonSchema ()
249251 .setType (f .type ().getDiscoveryType ())
You can’t perform that action at this time.
0 commit comments