diff --git a/omod-common/src/main/java/org/openmrs/module/webservices/docs/swagger/SwaggerSpecificationCreator.java b/omod-common/src/main/java/org/openmrs/module/webservices/docs/swagger/SwaggerSpecificationCreator.java index 784bf5d4a..9f235ba9b 100644 --- a/omod-common/src/main/java/org/openmrs/module/webservices/docs/swagger/SwaggerSpecificationCreator.java +++ b/omod-common/src/main/java/org/openmrs/module/webservices/docs/swagger/SwaggerSpecificationCreator.java @@ -132,7 +132,6 @@ private void BuildJSON() { try { initSwagger(); addPaths(); - addDefaultDefinitions(); // addSubclassOperations(); //FIXME uncomment after fixing the method } catch (Exception e) { @@ -253,7 +252,7 @@ private boolean testOperationImplemented(OperationEnum operation, DelegatingReso if (method == null) { return false; } else { - method.invoke(resourceHandler, new RequestContext()); + method.invoke(resourceHandler, RestConstants.SWAGGER_IMPOSSIBLE_UNIQUE_ID, new RequestContext()); } break; @@ -1069,7 +1068,10 @@ private Operation createOperation(DelegatingResourceHandler resourceHandler, operation.setSummary("Fetch all non-retired"); operation.setOperationId("getAll" + getOperationTitle(resourceHandler, true)); - operation.addResponse("200", response200.schema(new RefProperty("#/definitions/FetchAll"))); + operation.addResponse("200", + response200.schema(new ArrayProperty( + new RefProperty(getSchemaRef(resourceName, resourceParentName, OperationEnum.get))))); + operation.setParameters(buildPagingParameters()); operation.parameter(v); if (((BaseDelegatingResource) resourceHandler).hasTypesDefined()) {