Skip to content

Commit

Permalink
improve swagger typings for getAll
Browse files Browse the repository at this point in the history
  • Loading branch information
azizdiakite committed Sep 10, 2024
1 parent 8764f60 commit aa4b38e
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private void BuildJSON() {
try {
initSwagger();
addPaths();
addDefaultDefinitions();
//addDefaultDefinitions();
// addSubclassOperations(); //FIXME uncomment after fixing the method
}
catch (Exception e) {
Expand Down Expand Up @@ -253,7 +253,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 +1069,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 aa4b38e

Please sign in to comment.