diff --git a/avni-server-api/src/main/java/org/avni/server/web/EntityApprovalStatusController.java b/avni-server-api/src/main/java/org/avni/server/web/EntityApprovalStatusController.java index 044ae3184..9201ec727 100644 --- a/avni-server-api/src/main/java/org/avni/server/web/EntityApprovalStatusController.java +++ b/avni-server-api/src/main/java/org/avni/server/web/EntityApprovalStatusController.java @@ -78,7 +78,7 @@ public PagedResources> getEntityApprovals( @RequestParam(value = "entityType", required = false) SyncEntityName entityName, @RequestParam(value = "entityTypeUuid", required = false) String entityTypeUuid, Pageable pageable) { - if(entityName == null) { + if (entityName == null) { return wrap(entityApprovalStatusRepository .findByLastModifiedDateTimeIsBetweenOrderByLastModifiedDateTimeAscIdAsc( CHSEntity.toDate(lastModifiedDateTime), CHSEntity.toDate(now), pageable)); @@ -112,7 +112,8 @@ public Resource process(Resource res private String fetchSubjectTypeForEntityNameAndUuid(SyncEntityName entityName, String entityTypeUuid) { switch (entityName) { - case Subject: return entityTypeUuid.isEmpty() ? null : entityTypeUuid; + case Subject: + return entityTypeUuid.isEmpty() ? null : entityTypeUuid; case Encounter: return getSubjectTypeUuidFromEncounterTypeUuid(entityTypeUuid, FormType.Encounter); case ProgramEncounter: @@ -120,7 +121,8 @@ private String fetchSubjectTypeForEntityNameAndUuid(SyncEntityName entityName, S case ProgramEnrolment: case ChecklistItem: return getSubjectTypeUuidFromProgramTypeUuid(entityTypeUuid, FormType.ProgramEnrolment); - default: return null; + default: + return null; } } diff --git a/avni-server-api/src/main/resources/api/external-api.yaml b/avni-server-api/src/main/resources/api/external-api.yaml index 4a3fd791f..f3c605dde 100644 --- a/avni-server-api/src/main/resources/api/external-api.yaml +++ b/avni-server-api/src/main/resources/api/external-api.yaml @@ -1287,7 +1287,7 @@ paths: schema: type: string nullable: true - enum: [Subject,ProgramEnrolment,ProgramEncounter,Encounter,ChecklistItem] + enum: [ Subject,ProgramEnrolment,ProgramEncounter,Encounter,ChecklistItem ] - name: entityTypeId in: query description: "Allows filtering results by entity type id" @@ -1870,13 +1870,13 @@ components: properties: Entity ID: type: string - description: ID of the entity for which the approval status is being returned + description: ID of the entity for which the approval action was done. Entity type: type: string - description: Type of the entity for which the approval status is being returned i.e. Subject / Encounter etc + description: Type of the entity which the approval action was done. Entity type ID: type: string - description: ID of the entity type for which the approval status is being returned + description: ID of the entity type of the entity for which the approval action was done. This will be the ID of the subject type, program, or encounter type - for the entity for which approval action was taken. Approval status: type: string description: Approval status for the entity @@ -1925,18 +1925,18 @@ components: - $ref: '#/components/schemas/Task' - $ref: '#/components/schemas/TaskBody' inline_response_200_locations: - properties: - content: - type: array - items: - $ref: '#/components/schemas/Location' - allOf: - - $ref: '#/components/schemas/ResponsePage' + properties: + content: + type: array + items: + $ref: '#/components/schemas/Location' + allOf: + - $ref: '#/components/schemas/ResponsePage' inline_response_200_eas: - properties: - content: - type: array - items: - $ref: '#/components/schemas/EntityApprovalStatusBody' - allOf: - - $ref: '#/components/schemas/ResponsePage' + properties: + content: + type: array + items: + $ref: '#/components/schemas/EntityApprovalStatusBody' + allOf: + - $ref: '#/components/schemas/ResponsePage'