Skip to content

Commit 67dbf47

Browse files
committed
fix
1 parent d4ce8b1 commit 67dbf47

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

omod-common/src/main/java/org/openmrs/module/webservices/docs/swagger/SwaggerGenerationUtil.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public class SwaggerGenerationUtil {
6666
* @param resourceHandler the resource handler to add
6767
*/
6868
public static void addResourceHandler(DelegatingResourceHandler<?> resourceHandler) {
69-
System.out.println(resourceHandler + " has been added");
7069
resourceHandlers.add(resourceHandler);
7170
}
7271

@@ -300,7 +299,7 @@ public static Property createPropertyForType(Class<?> type, String operationType
300299
if (resourceName == null) {
301300
return new StringProperty();
302301
}
303-
return new ArrayProperty(new RefProperty("#/definitions/" + StringUtils.capitalize(getResourceNameBySupportedClass(elementType)) + operationType));
302+
return new ArrayProperty(new RefProperty("#/definitions/" + StringUtils.capitalize(resourceName) + operationType));
304303
}
305304
return new ArrayProperty();
306305
} else {
@@ -312,7 +311,7 @@ public static Property createPropertyForType(Class<?> type, String operationType
312311
* Retrieves the name of a resource or sub-resource associated with a given class.
313312
*
314313
* @param supportedClass the class to find the resource name for
315-
* @return the name of the resource or sub-resource associated with the given class,
314+
* @return the name of the {@link Resource} or {@link SubResource} associated with the given class,
316315
* or "null" if no match is found
317316
*/
318317
public static String getResourceNameBySupportedClass(Class<?> supportedClass) {

0 commit comments

Comments
 (0)