diff --git a/src/integrationTest/java/uk/gov/hmcts/darts/testutils/stubs/TranscriptionDocumentStub.java b/src/integrationTest/java/uk/gov/hmcts/darts/testutils/stubs/TranscriptionDocumentStub.java index 19f7b73ac5..9b3755e828 100644 --- a/src/integrationTest/java/uk/gov/hmcts/darts/testutils/stubs/TranscriptionDocumentStub.java +++ b/src/integrationTest/java/uk/gov/hmcts/darts/testutils/stubs/TranscriptionDocumentStub.java @@ -1,6 +1,7 @@ package uk.gov.hmcts.darts.testutils.stubs; import lombok.RequiredArgsConstructor; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; import uk.gov.hmcts.darts.common.entity.CourtCaseEntity; import uk.gov.hmcts.darts.common.entity.CourtroomEntity; @@ -96,8 +97,8 @@ public List generateTranscriptionEntities(int count .getQueryString(UUID.randomUUID() + Integer.toString(transriptionDocumentCount)), userAccountRepository.getReferenceById(0)); for (int i = 0; i < caseCount; i++) { - caseEntity = courtCaseStub.createAndSaveMinimalCourtCase(TranscriptionDocumentSubStringQueryEnum.COURT_HOUSE.getQueryString( - UUID.randomUUID() + "Case Number" + transriptionDocumentCount + i), courtroomEntity.getCourthouse().getId()); + caseEntity = courtCaseStub.createAndSaveMinimalCourtCase(StringUtils.right(TranscriptionDocumentSubStringQueryEnum.COURT_HOUSE.getQueryString( + UUID.randomUUID() + "Case Number" + transriptionDocumentCount + i), 32), courtroomEntity.getCourthouse().getId()); caseEntityList.add(caseEntity); } diff --git a/src/main/resources/openapi/audio.yaml b/src/main/resources/openapi/audio.yaml index 570dfe9bf8..bd33c0689a 100644 --- a/src/main/resources/openapi/audio.yaml +++ b/src/main/resources/openapi/audio.yaml @@ -476,6 +476,7 @@ components: courtroom_name: type: string example: "1" + maxLength: 64 hearing_start_at: type: string format: date diff --git a/src/main/resources/openapi/audiorequests.yaml b/src/main/resources/openapi/audiorequests.yaml index c875c96a56..525ebad226 100644 --- a/src/main/resources/openapi/audiorequests.yaml +++ b/src/main/resources/openapi/audiorequests.yaml @@ -829,9 +829,12 @@ components: media_request_id: type: integer description: 'The media request id' + minimum: 1 + maximum: 2147483647 case_number: type: string description: 'The case number' + maxLength: 32 courthouse_display_name: type: String description: 'The court house display name' @@ -841,9 +844,11 @@ components: owner: type: string description: 'The media owner' + maxLength: 2000 requested_by: type: string description: 'The person that requested the media' + maxLength: 2000 requested_at_from: type: date description: 'The start date range that the media was requested' diff --git a/src/main/resources/openapi/cases.yaml b/src/main/resources/openapi/cases.yaml index 8d0caca189..895df4ae67 100644 --- a/src/main/resources/openapi/cases.yaml +++ b/src/main/resources/openapi/cases.yaml @@ -739,6 +739,7 @@ components: courtroom_name: type: string example: "1" + maxLength: 64 hearing_start_at: type: string format: date diff --git a/src/main/resources/openapi/courthouse.yaml b/src/main/resources/openapi/courthouse.yaml index ac49b252df..746e6a6dd3 100644 --- a/src/main/resources/openapi/courthouse.yaml +++ b/src/main/resources/openapi/courthouse.yaml @@ -155,6 +155,7 @@ components: properties: courthouse_name: type: string + maxLength: 255 display_name: type: string region_id: @@ -170,6 +171,7 @@ components: properties: courthouse_name: type: string + maxLength: 255 display_name: type: string region_id: diff --git a/src/main/resources/openapi/event.yaml b/src/main/resources/openapi/event.yaml index fc87ae7a83..7a5b5c4f4e 100644 --- a/src/main/resources/openapi/event.yaml +++ b/src/main/resources/openapi/event.yaml @@ -727,6 +727,7 @@ components: type: string courtroom_name: type: string + maxLength: 64 hearing_start_at: type: string format: date diff --git a/src/main/resources/openapi/hearings.yaml b/src/main/resources/openapi/hearings.yaml index 5c7b7e6a33..b9205faa21 100644 --- a/src/main/resources/openapi/hearings.yaml +++ b/src/main/resources/openapi/hearings.yaml @@ -295,6 +295,7 @@ components: courtroom_name: type: string example: some_courthouse + maxLength: 64 hearing_start_at: type: string format: date diff --git a/src/main/resources/openapi/transcriptions.yaml b/src/main/resources/openapi/transcriptions.yaml index a079ce69b7..dbb02e970b 100644 --- a/src/main/resources/openapi/transcriptions.yaml +++ b/src/main/resources/openapi/transcriptions.yaml @@ -1032,9 +1032,12 @@ components: transcription_id: type: integer example: 1234 + minimum: 1 + maximum: 2147483647 case_number: type: string example: C123 + maxLength: 32 courthouse_display_name: type: string example: some_courthouse @@ -1045,9 +1048,11 @@ components: owner: type: string example: 'some-user-name' + maxLength: 2000 requested_by: type: string example: 'some-user-name' + maxLength: 2000 requested_at_from: type: string format: date @@ -1562,6 +1567,7 @@ components: case_number: type: string description: 'The case number' + maxLength: 32 courthouse_display_name: type: String description: 'The court house display name' @@ -1571,9 +1577,11 @@ components: owner: type: string description: 'The media owner' + maxLength: 2000 requested_by: type: string description: 'The person that requested the media' + maxLength: 2000 requested_at_from: type: date description: 'The start date range that the media was requested'