Skip to content

Commit

Permalink
Merge pull request #622 from azizdiakite/master
Browse files Browse the repository at this point in the history
Improve Swagger typings for getAll
  • Loading branch information
chibongho authored Sep 10, 2024
2 parents 07fd727 + ce023b3 commit 4a54c44
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ private void BuildJSON() {
try {
initSwagger();
addPaths();
addDefaultDefinitions();
// addSubclassOperations(); //FIXME uncomment after fixing the method
}
catch (Exception e) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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()) {
Expand Down

0 comments on commit 4a54c44

Please sign in to comment.