From 67dbf47eb8235e84c88186e87345ae5681a10fc6 Mon Sep 17 00:00:00 2001 From: mherman22 Date: Tue, 3 Dec 2024 22:57:04 +0300 Subject: [PATCH] fix --- .../webservices/docs/swagger/SwaggerGenerationUtil.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/omod-common/src/main/java/org/openmrs/module/webservices/docs/swagger/SwaggerGenerationUtil.java b/omod-common/src/main/java/org/openmrs/module/webservices/docs/swagger/SwaggerGenerationUtil.java index 2079be4dd..4d6b2df8d 100644 --- a/omod-common/src/main/java/org/openmrs/module/webservices/docs/swagger/SwaggerGenerationUtil.java +++ b/omod-common/src/main/java/org/openmrs/module/webservices/docs/swagger/SwaggerGenerationUtil.java @@ -66,7 +66,6 @@ public class SwaggerGenerationUtil { * @param resourceHandler the resource handler to add */ public static void addResourceHandler(DelegatingResourceHandler resourceHandler) { - System.out.println(resourceHandler + " has been added"); resourceHandlers.add(resourceHandler); } @@ -300,7 +299,7 @@ public static Property createPropertyForType(Class type, String operationType if (resourceName == null) { return new StringProperty(); } - return new ArrayProperty(new RefProperty("#/definitions/" + StringUtils.capitalize(getResourceNameBySupportedClass(elementType)) + operationType)); + return new ArrayProperty(new RefProperty("#/definitions/" + StringUtils.capitalize(resourceName) + operationType)); } return new ArrayProperty(); } else { @@ -312,7 +311,7 @@ public static Property createPropertyForType(Class type, String operationType * Retrieves the name of a resource or sub-resource associated with a given class. * * @param supportedClass the class to find the resource name for - * @return the name of the resource or sub-resource associated with the given class, + * @return the name of the {@link Resource} or {@link SubResource} associated with the given class, * or "null" if no match is found */ public static String getResourceNameBySupportedClass(Class supportedClass) {