diff --git a/modules/mobile/docs/openapi.json b/modules/mobile/docs/openapi.json index 60bc053afbd..1d6b5147797 100644 --- a/modules/mobile/docs/openapi.json +++ b/modules/mobile/docs/openapi.json @@ -8809,11 +8809,13 @@ "type": "string" }, "diagnosticCode": { - "type": "string, null", + "type": "string", + "nullable": true, "example": 8100 }, "lastAction": { "type": "string", + "nullable": true, "enum": [ "field_grant", "withdrawn", @@ -8828,7 +8830,8 @@ ] }, "date": { - "type": "string" + "type": "string", + "nullable": true } } }, @@ -8877,7 +8880,7 @@ "updated" ], "properties": { - "appealsIds": { + "appealIds": { "type": "array", "items": { "type": "string" @@ -8908,7 +8911,8 @@ "type": "string" }, "docket": { - "type": "object" + "type": "object", + "nullable": true }, "events": { "type": "array", @@ -9490,17 +9494,52 @@ "type": "object", "additionalProperties": false, "required": [ - "code", - "message" + "data" ], "properties": { - "code": { - "type": "string", - "example": "check-in-success" - }, - "message": { - "type": "string", - "example": "Check-In successful" + "data": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "id", + "attributes" + ], + "properties": { + "type": { + "type": "string", + "example": "check_in" + }, + "id": { + "type": "string", + "example": "75db6a5c-84ae-4ca4-bba2-ef4c41d563ab", + "description": "user uuid" + }, + "attributes": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "code", + "message" + ], + "properties": { + "id": { + "type": "string", + "example": "75db6a5c-84ae-4ca4-bba2-ef4c41d563ab", + "description": "user uuid" + }, + "code": { + "type": "string", + "example": "check-in-success" + }, + "message": { + "type": "string", + "example": "Check-In successful" + } + } + } + } } } }, @@ -9528,7 +9567,10 @@ "example": "Unsuccessful Operation" }, "detail": { - "type": "array", + "type": [ + "array", + "string" + ], "items": { "type": "object", "additionalProperties": false, @@ -11670,11 +11712,13 @@ "example": "2017-12-08" }, "minEstDate": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "2017-12-08" }, "maxEstDate": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "2017-12-08" }, "open": { @@ -11700,7 +11744,8 @@ } }, "phaseChangeDate": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "2017-12-08" }, "vaRepresentative": { @@ -11835,27 +11880,33 @@ ], "properties": { "seriesId": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "{EC1B5F0C-E3FB-4A41-B93F-E1A88D549CDF}" }, "version": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "1" }, "typeDescription": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "Notification Letter (e.g. VA 20-8993, VA 21-0290, PCGL)" }, "typeId": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "184" }, "docType": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "184" }, "subject": { - "type": "string, null", + "type": "string", + "nullable": true, "example": null }, "receivedAt": { @@ -11863,15 +11914,18 @@ "example": "2022-09-22" }, "source": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "VBMS" }, "mimeType": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "application/pdf" }, "altDocTypes": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "" }, "restricted": { @@ -11879,7 +11933,8 @@ "example": false }, "uploadDate": { - "type": "date, null", + "type": "date", + "nullable": true, "example": "2022-09-23" } } @@ -13257,17 +13312,20 @@ "example": "true" }, "phase": { - "type": "integer, null", + "type": "integer", + "nullable": true, "description": "The phase of processing the claim is in. This does not apply to appeals. The integers used map to the phases as `1 => CLAIM_RECEIVED, 2 => UNDER_REVIEW, 3 => GATHERING_OF_EVIDENCE, 4 => REVIEW_OF_EVIDENCE, 5 => PREPARATION_FOR_DECISION, 6 => PENDING_DECISION_APPROVAL, 7 => PREPARATION_FOR_NOTIFICATION, 8 => COMPLETE`", "example": 1 }, "documentsNeeded": { - "type": "boolean, null", + "type": "boolean", + "nullable": true, "description": "Documents are still needed.", "example": "true" }, "developmentLetterSent": { - "type": "boolean, null", + "type": "boolean", + "nullable": true, "description": "Development letter has been sent.", "example": "true" }, @@ -19173,7 +19231,8 @@ ], "properties": { "refillStatus": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "refillinprocess", "enum": [ "active", @@ -19195,63 +19254,78 @@ ] }, "refillSubmitDate": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "2022-10-28T04:00:00.000Z" }, "refillDate": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "2022-10-28T04:00:00.000Z" }, "refillRemaining": { - "type": "integer, null", + "type": "integer", + "nullable": true, "example": 5 }, "facilityName": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "DAYT29" }, "isRefillable": { - "type": "bool, null", + "type": "bool", + "nullable": true, "example": false }, "isTrackable": { - "type": "bool, null", + "type": "bool", + "nullable": true, "example": false }, "orderedDate": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "2022-10-28T04:00:00.000Z" }, "quantity": { - "type": "integer, null", + "type": "integer", + "nullable": true, "example": 10 }, "expirationDate": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "2022-10-28T04:00:00.000Z" }, "prescriptionNumber": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "2719536" }, "prescriptionName": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "SOMATROPIN 5MG INJ (VI)" }, "instructions": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "INJECT 1MG INTO THE MUSCLE WEEKLY FOR 30 DAYS" }, "dispensedDate": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "2022-10-28T04:00:00.000Z" }, "stationNumber": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "989" }, "facilityPhoneNumber": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "(217) 636-6712" } } @@ -19352,19 +19426,23 @@ ], "properties": { "failedStationList": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "DAYT29, DAYT29" }, "successfulStationList": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "SLC4, VAMCSLC-OUTPTRX" }, "lastUpdatedTime": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "Thu, 08 Dec 2022 12:11:33 EST" }, "prescriptionList": { - "type": "string, null", + "type": "string", + "nullable": true, "example": null }, "failedPrescriptionIds": { @@ -19426,11 +19504,13 @@ ], "properties": { "prescriptionName": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "Ibuprofen 200mg" }, "prescriptionNumber": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "2719551" }, "prescriptionId": { @@ -19438,23 +19518,28 @@ "example": "13650541" }, "trackingNumber": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "657068347565" }, "ndcNumber": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "00781171601" }, "shippedDate": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "2022-10-28T04:00:00.000Z" }, "deliveryService": { - "type": "integer, null", + "type": "string", + "nullable": true, "example": "USPS" }, "otherPrescriptions": { - "type": "array, null", + "type": "array", + "nullable": true, "example": [ { "prescriptionName": "ETHAMBUTOL HCL 100MG TAB", @@ -21582,11 +21667,13 @@ "example": "Compensation & Pension - Recurring" }, "bank": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "PACIFIC PREMIER BANK" }, "account": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "************6464" } } @@ -22099,10 +22186,12 @@ "example": "1493 Martin Luther King Rd" }, "addressLine2": { - "type": "string, null" + "type": "string", + "nullable": true }, "addressLine3": { - "type": "string, null" + "type": "string", + "nullable": true }, "addressPou": { "type": "string", @@ -22130,11 +22219,13 @@ "example": "US" }, "internationalPostalCode": { - "type": "string, null", + "type": "string", + "nullable": true, "example": null }, "province": { - "type": "string, null", + "type": "string", + "nullable": true, "example": null }, "stateCode": { @@ -22146,7 +22237,8 @@ "example": "97062" }, "zipCodeSuffix": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "1234" } } @@ -22417,10 +22509,12 @@ "example": "1493 Martin Luther King Rd" }, "addressLine2": { - "type": "string, null" + "type": "string", + "nullable": true }, "addressLine3": { - "type": "string, null" + "type": "string", + "nullable": true }, "addressPou": { "type": "string", @@ -22448,15 +22542,18 @@ "example": "US" }, "countryCodeIso3": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "USA" }, "internationalPostalCode": { - "type": "string, null", + "type": "string", + "nullable": true, "example": null }, "province": { - "type": "string, null", + "type": "string", + "nullable": true, "example": null }, "stateCode": { @@ -22468,7 +22565,8 @@ "example": "97062" }, "zipCodeSuffix": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "1234" } } @@ -22512,7 +22610,8 @@ "example": "HOME" }, "extension": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "4567" } } @@ -22849,10 +22948,12 @@ "example": "1493 Martin Luther King Rd" }, "addressLine2": { - "type": "string, null" + "type": "string", + "nullable": true }, "addressLine3": { - "type": "string, null" + "type": "string", + "nullable": true }, "addressPou": { "type": "string", @@ -22880,11 +22981,13 @@ "example": "US" }, "internationalPostalCode": { - "type": "string, null", + "type": "string", + "nullable": true, "example": null }, "province": { - "type": "string, null", + "type": "string", + "nullable": true, "example": null }, "stateCode": { @@ -22896,7 +22999,8 @@ "example": "97062" }, "zipCodeSuffix": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "1234" } } @@ -23008,10 +23112,12 @@ "example": "1493 Martin Luther King Rd" }, "addressLine2": { - "type": "string, null" + "type": "string", + "nullable": true }, "addressLine3": { - "type": "string, null" + "type": "string", + "nullable": true }, "addressPou": { "type": "string", @@ -23039,23 +23145,28 @@ "example": "USA" }, "internationalPostalCode": { - "type": "string, null", + "type": "string", + "nullable": true, "example": null }, "province": { - "type": "string, null", + "type": "string", + "nullable": true, "example": null }, "stateCode": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "NY" }, "zipCode": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "97062" }, "zipCodeSuffix": { - "type": "string, null", + "type": "string", + "nullable": true, "example": "1234" } } diff --git a/modules/mobile/docs/schemas/Address.yml b/modules/mobile/docs/schemas/Address.yml index c783da57532..13c84489b2f 100644 --- a/modules/mobile/docs/schemas/Address.yml +++ b/modules/mobile/docs/schemas/Address.yml @@ -22,9 +22,11 @@ properties: type: string example: "1493 Martin Luther King Rd" addressLine2: - type: string, null + type: string + nullable: true addressLine3: - type: string, null + type: string + nullable: true addressPou: type: string enum: [ "RESIDENCE/CHOICE", "CORRESPONDENCE" ] @@ -40,10 +42,12 @@ properties: type: string example: "US" internationalPostalCode: - type: string, null + type: string + nullable: true example: null province: - type: string, null + type: string + nullable: true example: null stateCode: type: string @@ -52,5 +56,6 @@ properties: type: string example: "97062" zipCodeSuffix: - type: string, null + type: string + nullable: true example: "1234" diff --git a/modules/mobile/docs/schemas/AddressCreate.yml b/modules/mobile/docs/schemas/AddressCreate.yml index b2f6b7500d0..9b7e3f6e85a 100644 --- a/modules/mobile/docs/schemas/AddressCreate.yml +++ b/modules/mobile/docs/schemas/AddressCreate.yml @@ -33,9 +33,11 @@ properties: type: string example: "1493 Martin Luther King Rd" addressLine2: - type: string, null + type: string + nullable: true addressLine3: - type: string, null + type: string + nullable: true addressPou: type: string enum: [ "RESIDENCE/CHOICE", "CORRESPONDENCE" ] @@ -51,17 +53,22 @@ properties: type: string example: "USA" internationalPostalCode: - type: string, null + type: string + nullable: true example: null province: - type: string, null + type: string + nullable: true example: null stateCode: - type: string, null + type: string + nullable: true example: "NY" zipCode: - type: string, null + type: string + nullable: true example: "97062" zipCodeSuffix: - type: string, null + type: string + nullable: true example: "1234" diff --git a/modules/mobile/docs/schemas/AddressUpdate.yml b/modules/mobile/docs/schemas/AddressUpdate.yml index 0eaa17ba824..bff60e257e9 100644 --- a/modules/mobile/docs/schemas/AddressUpdate.yml +++ b/modules/mobile/docs/schemas/AddressUpdate.yml @@ -34,9 +34,11 @@ properties: type: string example: "1493 Martin Luther King Rd" addressLine2: - type: string, null + type: string + nullable: true addressLine3: - type: string, null + type: string + nullable: true addressPou: type: string enum: [ "RESIDENCE/CHOICE", "CORRESPONDENCE" ] @@ -52,10 +54,12 @@ properties: type: string example: "US" internationalPostalCode: - type: string, null + type: string + nullable: true example: null province: - type: string, null + type: string + nullable: true example: null stateCode: type: string @@ -64,5 +68,6 @@ properties: type: string example: "97062" zipCodeSuffix: - type: string, null + type: string + nullable: true example: "1234" diff --git a/modules/mobile/docs/schemas/Appeal.yml b/modules/mobile/docs/schemas/Appeal.yml index 1eb8d793ec5..48f1a464aba 100644 --- a/modules/mobile/docs/schemas/Appeal.yml +++ b/modules/mobile/docs/schemas/Appeal.yml @@ -37,7 +37,7 @@ properties: - type - updated properties: - appealsIds: + appealIds: type: array items: type: string @@ -60,6 +60,7 @@ properties: type: string docket: type: object + nullable: true events: type: array items: diff --git a/modules/mobile/docs/schemas/AppealIssue.yml b/modules/mobile/docs/schemas/AppealIssue.yml index 5edfe2047de..49c4db2ed52 100644 --- a/modules/mobile/docs/schemas/AppealIssue.yml +++ b/modules/mobile/docs/schemas/AppealIssue.yml @@ -5,10 +5,12 @@ properties: description: type: string diagnosticCode: - type: string, null + type: string + nullable: true example: 8100 lastAction: type: string + nullable: true enum: - field_grant - withdrawn @@ -22,3 +24,5 @@ properties: - Deferred date: type: string + nullable: true + diff --git a/modules/mobile/docs/schemas/AppointmentCheckin.yml b/modules/mobile/docs/schemas/AppointmentCheckin.yml index 05559217004..4a3f0f4e0e7 100644 --- a/modules/mobile/docs/schemas/AppointmentCheckin.yml +++ b/modules/mobile/docs/schemas/AppointmentCheckin.yml @@ -1,12 +1,38 @@ type: object additionalProperties: false required: - - code - - message + - data properties: - code: - type: string - example: 'check-in-success' - message: - type: string - example: 'Check-In successful' + data: + type: object + additionalProperties: false + required: + - type + - id + - attributes + properties: + type: + type: string + example: "check_in" + id: + type: string + example: "75db6a5c-84ae-4ca4-bba2-ef4c41d563ab" + description: user uuid + attributes: + type: object + additionalProperties: false + required: + - id + - code + - message + properties: + id: + type: string + example: "75db6a5c-84ae-4ca4-bba2-ef4c41d563ab" + description: user uuid + code: + type: string + example: 'check-in-success' + message: + type: string + example: 'Check-In successful' diff --git a/modules/mobile/docs/schemas/AppointmentCheckinErrors400.yml b/modules/mobile/docs/schemas/AppointmentCheckinErrors400.yml index 7a757d02340..31e36c6462e 100644 --- a/modules/mobile/docs/schemas/AppointmentCheckinErrors400.yml +++ b/modules/mobile/docs/schemas/AppointmentCheckinErrors400.yml @@ -18,7 +18,7 @@ properties: type: string example: 'Unsuccessful Operation' detail: - type: array + type: [array, string] items: type: object additionalProperties: false diff --git a/modules/mobile/docs/schemas/Claim.yml b/modules/mobile/docs/schemas/Claim.yml index 8cda776f368..7c8a25f33d2 100644 --- a/modules/mobile/docs/schemas/Claim.yml +++ b/modules/mobile/docs/schemas/Claim.yml @@ -46,10 +46,12 @@ properties: type: string example: "2017-12-08" minEstDate: - type: string, null + type: string + nullable: true example: "2017-12-08" maxEstDate: - type: string, null + type: string + nullable: true example: "2017-12-08" open: type: boolean @@ -67,7 +69,8 @@ properties: items: $ref: "./claimEventTimeline.yml" phaseChangeDate: - type: string, null + type: string + nullable: true example: "2017-12-08" vaRepresentative: type: string diff --git a/modules/mobile/docs/schemas/ClaimsAndAppeals.yml b/modules/mobile/docs/schemas/ClaimsAndAppeals.yml index 24fd54bbe41..70aa51fe903 100644 --- a/modules/mobile/docs/schemas/ClaimsAndAppeals.yml +++ b/modules/mobile/docs/schemas/ClaimsAndAppeals.yml @@ -48,15 +48,18 @@ properties: description: decision letter will be available from endpoint /v0/claims/decision-letters if true example: "true" phase: - type: integer, null + type: integer + nullable: true description: The phase of processing the claim is in. This does not apply to appeals. The integers used map to the phases as `1 => CLAIM_RECEIVED, 2 => UNDER_REVIEW, 3 => GATHERING_OF_EVIDENCE, 4 => REVIEW_OF_EVIDENCE, 5 => PREPARATION_FOR_DECISION, 6 => PENDING_DECISION_APPROVAL, 7 => PREPARATION_FOR_NOTIFICATION, 8 => COMPLETE` example: 1 documentsNeeded: - type: boolean, null + type: boolean + nullable: true description: Documents are still needed. example: "true" developmentLetterSent: - type: boolean, null + type: boolean + nullable: true description: Development letter has been sent. example: "true" claimTypeCode: diff --git a/modules/mobile/docs/schemas/DecisionLetterRecord.yml b/modules/mobile/docs/schemas/DecisionLetterRecord.yml index 9695a9ba14f..9718735cc20 100644 --- a/modules/mobile/docs/schemas/DecisionLetterRecord.yml +++ b/modules/mobile/docs/schemas/DecisionLetterRecord.yml @@ -30,40 +30,50 @@ properties: - uploadDate properties: seriesId: - type: string, null + type: string + nullable: true example: "{EC1B5F0C-E3FB-4A41-B93F-E1A88D549CDF}" version: - type: string, null + type: string + nullable: true example: "1" typeDescription: - type: string, null + type: string + nullable: true example: "Notification Letter (e.g. VA 20-8993, VA 21-0290, PCGL)" typeId: - type: string, null + type: string + nullable: true example: "184" docType: - type: string, null + type: string + nullable: true example: "184" subject: - type: string, null + type: string + nullable: true example: null receivedAt: type: date example: "2022-09-22" source: - type: string, null + type: string + nullable: true example: "VBMS" mimeType: - type: string, null + type: string + nullable: true example: "application/pdf" altDocTypes: - type: string, null + type: string + nullable: true example: "" restricted: type: boolean example: false uploadDate: - type: date, null + type: date + nullable: true example: "2022-09-23" diff --git a/modules/mobile/docs/schemas/PaymentHistory.yml b/modules/mobile/docs/schemas/PaymentHistory.yml index d53acfe1f97..03376ea0a58 100644 --- a/modules/mobile/docs/schemas/PaymentHistory.yml +++ b/modules/mobile/docs/schemas/PaymentHistory.yml @@ -42,10 +42,12 @@ properties: type: string example: "Compensation & Pension - Recurring" bank: - type: string, null + type: string + nullable: true example: "PACIFIC PREMIER BANK" account: - type: string, null + type: string + nullable: true example: "************6464" meta: type: object diff --git a/modules/mobile/docs/schemas/PrescriptionRecord.yml b/modules/mobile/docs/schemas/PrescriptionRecord.yml index 16194e3c838..46716826f96 100644 --- a/modules/mobile/docs/schemas/PrescriptionRecord.yml +++ b/modules/mobile/docs/schemas/PrescriptionRecord.yml @@ -33,7 +33,8 @@ properties: - facilityPhoneNumber properties: refillStatus: - type: string, null + type: string + nullable: true example: "refillinprocess" enum: - active @@ -53,48 +54,63 @@ properties: - dateOfDeathEntered - transferred refillSubmitDate: - type: string, null + type: string + nullable: true example: "2022-10-28T04:00:00.000Z" refillDate: - type: string, null + type: string + nullable: true example: "2022-10-28T04:00:00.000Z" refillRemaining: - type: integer, null + type: integer + nullable: true example: 5 facilityName: - type: string, null + type: string + nullable: true example: "DAYT29" isRefillable: - type: bool, null + type: bool + nullable: true example: false isTrackable: - type: bool, null + type: bool + nullable: true example: false orderedDate: - type: string, null + type: string + nullable: true example: "2022-10-28T04:00:00.000Z" quantity: - type: integer, null + type: integer + nullable: true example: 10 expirationDate: - type: string, null + type: string + nullable: true example: "2022-10-28T04:00:00.000Z" prescriptionNumber: - type: string, null + type: string + nullable: true example: "2719536" prescriptionName: - type: string, null + type: string + nullable: true example: "SOMATROPIN 5MG INJ (VI)" instructions: - type: string, null + type: string + nullable: true example: "INJECT 1MG INTO THE MUSCLE WEEKLY FOR 30 DAYS" dispensedDate: - type: string, null + type: string + nullable: true example: "2022-10-28T04:00:00.000Z" stationNumber: - type: string, null + type: string + nullable: true example: "989" facilityPhoneNumber: - type: string, null + type: string + nullable: true example: "(217) 636-6712" diff --git a/modules/mobile/docs/schemas/PrescriptionTrackingRecord.yml b/modules/mobile/docs/schemas/PrescriptionTrackingRecord.yml index 566d44add57..7346d783332 100644 --- a/modules/mobile/docs/schemas/PrescriptionTrackingRecord.yml +++ b/modules/mobile/docs/schemas/PrescriptionTrackingRecord.yml @@ -26,28 +26,35 @@ properties: - otherPrescriptions properties: prescriptionName: - type: string, null + type: string + nullable: true example: "Ibuprofen 200mg" prescriptionNumber: - type: string, null + type: string + nullable: true example: "2719551" prescriptionId: type: integer example: "13650541" trackingNumber: - type: string, null + type: string + nullable: true example: "657068347565" ndcNumber: - type: string, null + type: string + nullable: true example: "00781171601" shippedDate: - type: string, null + type: string + nullable: true example: "2022-10-28T04:00:00.000Z" deliveryService: - type: integer, null + type: string + nullable: true example: 'USPS' otherPrescriptions: - type: array, null + type: array + nullable: true example: [{ prescriptionName: 'ETHAMBUTOL HCL 100MG TAB', prescriptionNumber: '2719553' }] items: type: object diff --git a/modules/mobile/docs/schemas/PrescriptionsRefill.yml b/modules/mobile/docs/schemas/PrescriptionsRefill.yml index 3c3ce43ac1c..96c49abbffa 100644 --- a/modules/mobile/docs/schemas/PrescriptionsRefill.yml +++ b/modules/mobile/docs/schemas/PrescriptionsRefill.yml @@ -25,16 +25,20 @@ properties: - infoMessages properties: failedStationList: - type: string, null + type: string + nullable: true example: "DAYT29, DAYT29" successfulStationList: - type: string, null + type: string + nullable: true example: "SLC4, VAMCSLC-OUTPTRX" lastUpdatedTime: - type: string, null + type: string + nullable: true example: "Thu, 08 Dec 2022 12:11:33 EST" prescriptionList: - type: string, null + type: string + nullable: true example: null failedPrescriptionIds: type: array diff --git a/modules/mobile/docs/schemas/UserContactInfoAddress.yml b/modules/mobile/docs/schemas/UserContactInfoAddress.yml index d6612052712..7306d49532f 100644 --- a/modules/mobile/docs/schemas/UserContactInfoAddress.yml +++ b/modules/mobile/docs/schemas/UserContactInfoAddress.yml @@ -24,9 +24,11 @@ properties: type: string example: "1493 Martin Luther King Rd" addressLine2: - type: string, null + type: string + nullable: true addressLine3: - type: string, null + type: string + nullable: true addressPou: type: string enum: [ "RESIDENCE/CHOICE", "CORRESPONDENCE" ] @@ -42,13 +44,16 @@ properties: type: string example: "US" countryCodeIso3: - type: string, null + type: string + nullable: true example: "USA" internationalPostalCode: - type: string, null + type: string + nullable: true example: null province: - type: string, null + type: string + nullable: true example: null stateCode: type: string @@ -57,5 +62,6 @@ properties: type: string example: "97062" zipCodeSuffix: - type: string, null + type: string + nullable: true example: "1234" \ No newline at end of file diff --git a/modules/mobile/docs/schemas/UserContactInfoPhone.yml b/modules/mobile/docs/schemas/UserContactInfoPhone.yml index 336a8a32afd..afce0ecc92d 100644 --- a/modules/mobile/docs/schemas/UserContactInfoPhone.yml +++ b/modules/mobile/docs/schemas/UserContactInfoPhone.yml @@ -25,5 +25,6 @@ properties: enum: [ "HOME", "FAX", "MOBILE", "WORK" ] example: "HOME" extension: - type: string, null + type: string + nullable: true example: "4567" diff --git a/modules/mobile/spec/requests/mobile/v0/appeal_spec.rb b/modules/mobile/spec/requests/mobile/v0/appeal_spec.rb index 27694ca09e8..53adae35b30 100644 --- a/modules/mobile/spec/requests/mobile/v0/appeal_spec.rb +++ b/modules/mobile/spec/requests/mobile/v0/appeal_spec.rb @@ -1,9 +1,11 @@ # frozen_string_literal: true require_relative '../../../support/helpers/rails_helper' +require_relative '../../../support/helpers/committee_helper' RSpec.describe 'Mobile::V0::Appeal', type: :request do include JsonSchemaMatchers + include CommitteeHelper describe 'GET /v0/appeal/:id' do let!(:user) { sis_user } @@ -74,7 +76,7 @@ it 'and a result that matches our schema is successfully returned with the 200 status' do VCR.use_cassette('caseflow/appeals') do get '/mobile/v0/appeal/3294289', headers: sis_headers - expect(response).to have_http_status(:ok) + assert_schema_conform(200) expect(response.parsed_body).to eq(appeal_response) end end @@ -82,8 +84,7 @@ it 'and attempting to access a nonexistent appeal returns a 404 with an error' do VCR.use_cassette('caseflow/appeals') do get '/mobile/v0/appeal/1234567', headers: sis_headers - expect(response).to have_http_status(:not_found) - expect(response.body).to match_json_schema('evss_errors') + assert_schema_conform(404) end end end @@ -94,7 +95,7 @@ it 'and a result that matches our schema is successfully returned with the 200 status' do VCR.use_cassette('caseflow/appeals') do get '/mobile/v0/appeal/3294289', headers: sis_headers - expect(response).to have_http_status(:ok) + assert_schema_conform(200) appeal_response['data']['attributes']['docket'] = nil expect(response.parsed_body).to eq(appeal_response) end @@ -103,8 +104,7 @@ it 'and attempting to access a nonexistant appeal returns a 404 wtih an error' do VCR.use_cassette('caseflow/appeals') do get '/mobile/v0/appeal/1234567', headers: sis_headers - expect(response).to have_http_status(:not_found) - expect(response.body).to match_json_schema('evss_errors') + assert_schema_conform(404) end end end @@ -116,7 +116,7 @@ it 'returns 403 status' do VCR.use_cassette('caseflow/appeals') do get '/mobile/v0/appeal/3294289', headers: sis_headers - expect(response).to have_http_status(:forbidden) + assert_schema_conform(403) end end end diff --git a/modules/mobile/spec/requests/mobile/v0/appointments/check_in_spec.rb b/modules/mobile/spec/requests/mobile/v0/appointments/check_in_spec.rb index e619e4a574e..bc8ab516655 100644 --- a/modules/mobile/spec/requests/mobile/v0/appointments/check_in_spec.rb +++ b/modules/mobile/spec/requests/mobile/v0/appointments/check_in_spec.rb @@ -1,7 +1,11 @@ # frozen_string_literal: true require_relative '../../../../support/helpers/rails_helper' +require_relative '../../../../support/helpers/committee_helper' + RSpec.describe 'Mobile::V0::Appointments::CheckIn', type: :request do + include CommitteeHelper + let(:attributes) { response.parsed_body.dig('data', 'attributes') } let!(:user) { sis_user } @@ -13,8 +17,7 @@ params: { 'appointmentIEN' => '516', 'locationId' => '516' } end end - - expect(response).to have_http_status(:ok) + assert_schema_conform(200) expect(attributes['code']).to match('check-in-success') expect(attributes['message']).to match('Check-In successful') end @@ -26,8 +29,7 @@ params: { 'appointmentIEN' => nil, 'locationId' => '516' } end end - - expect(response).to have_http_status(:bad_request) + assert_schema_conform(400) expect(response.parsed_body.dig('errors', 0, 'title')).to match('Missing parameter') end @@ -38,8 +40,7 @@ params: { 'appointmentIEN' => '516', 'locationId' => nil } end end - - expect(response).to have_http_status(:bad_request) + assert_schema_conform(400) expect(response.parsed_body.dig('errors', 0, 'title')).to match('Missing parameter') end @@ -68,7 +69,7 @@ post '/mobile/v0/appointments/check-in', headers: sis_headers, params: end end - expect(response).to have_http_status(:bad_request) + assert_schema_conform(400) expect(JSON.parse(response.body).dig('errors', 0)).to eq(response_values) end end @@ -92,7 +93,7 @@ post '/mobile/v0/appointments/check-in', headers: sis_headers, params: end end - expect(response).to have_http_status(:internal_server_error) + assert_schema_conform(500) expect(response.parsed_body).to eq(expected_body) end end @@ -120,7 +121,7 @@ post '/mobile/v0/appointments/check-in', headers: sis_headers, params: end - expect(response).to have_http_status(:internal_server_error) + assert_schema_conform(500) expect(response.parsed_body).to eq(expected_body) end end diff --git a/modules/mobile/spec/support/helpers/committee_helper.rb b/modules/mobile/spec/support/helpers/committee_helper.rb index 0d0209bc715..03f28576f2c 100644 --- a/modules/mobile/spec/support/helpers/committee_helper.rb +++ b/modules/mobile/spec/support/helpers/committee_helper.rb @@ -7,7 +7,8 @@ def committee_options @committee_options ||= { schema_path: Rails.root.join('modules', 'mobile', 'docs', 'openapi.json').to_s, prefix: '/mobile', - strict_reference_validation: true + strict_reference_validation: true, + check_content_type: false } end end