Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 44 additions & 29 deletions app/swagger/swagger/requests/veteran_status_cards.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,68 +17,83 @@ class VeteranStatusCards
key :description, 'Successful veteran status card retrieval'

schema do
key :required, %i[type veteran_status attributes]
key :required, %i[type attributes]
property :type, type: :string do
key :enum, %w[veteran_status_card veteran_status_alert]
key :description, "'veteran_status_card' or 'veteran_status_alert' depending on the vet eligibility"
end
property :veteran_status, type: :string do
key :enum, ['confirmed', 'not confirmed']
key :description,
"'confirmed' or 'not confirmed' depending on if the veteran is eligible for a status card"
end
property :service_summary_code, type: :string do
key :description, "The veteran's Service Summary Code determined by VAProfile"
end
property :not_confirmed_reason, type: :string do
key :description, 'Displays the reason the veteran is not eligible for a status card'
end
property :attributes, type: :object do
key :required, %i[veteran_status confirmation_status service_summary_code]
key :description, "Displays data specific to either 'confirmed' or 'not confirmed' veteran status card"
property :full_name, type: :string do
property :full_name, type: %i[string null] do
key :description,
'The concatenated full name of the veteran, displayed when eligible for a status card'
key :example, 'John T Doe Jr'
end
property :disability_rating, type: :integer do
property :disability_rating, type: %i[integer null] do
key :description, 'The disability rating for the veteran when eligible for a status card'
key :example, 50
end
property :latest_service, type: :object do
key :required, %i[branch begin_date end_date]
Comment thread
kbog25 marked this conversation as resolved.
key :description,
'The latest branch of service, begin date, and end date when the veteran ' \
'is eligible for a status card'
property :branch, type: :string, description: "The veteran's latest branch of service"
property :begin_date, type: :string, description: "The start date of the veteran's latest service"
property :end_date, type: :string, description: "The end date of the veteran's latest service"
end
property :edipi, type: :string do
property :edipi, type: %i[string null] do
key :description, "The user's EDIPI number when eligible for a veteran status card"
key :example, '001001999'
end
property :header, type: :string do
property :header, type: %i[string null] do
key :description, 'Displays an error/warning title when the veteran is ineligible for a status card'
key :example, "You're not eligible for a Veteran Status Card"
end
property :body, type: :array do
property :body, type: %i[array null] do
key :description,
'A list of message components to display when the veteran is ineligible for a status card'
items do
key :type, :object
key :required, %i[type value]
property :type, type: :string do
key :enum, %w[text phone link]
key :description, "The type of message component - can be 'text', 'phone', or 'link'"
key :example, 'text'
end
property :value, type: :string do
key :description, 'The content to be displayed based on the data type'
key :example, 'Your record is missing information about your service history or discharge status.'
end
property :tty, type: :boolean do
property :tty, type: %i[boolean null] do
key :description, "An optional parameter when data type is 'phone' to signify TTY"
key :example, true
end
property :url, type: :string do
property :url, type: %i[string null] do
key :description, "When data type is 'link', this field contains the hyperlink"
key :example, 'https://www.va.gov'
end
end
end
property :alert_type, type: :string do
property :alert_type, type: %i[string null] do
key :enum, %w[error warning]
key :description, "The type of alert - can either be 'error' or 'warning'"
key :example, 'warning'
end
property :veteran_status, type: :string do
key :enum, ['confirmed', 'not confirmed']
key :description,
"'confirmed' or 'not confirmed' depending on if the veteran is eligible for a status card"
key :example, 'confirmed'
end
property :not_confirmed_reason, type: %i[string null] do
key :enum, %w[ERROR MORE_RESEARCH_REQUIRED NOT_TITLE_38 PERSON_NOT_FOUND]
Comment thread
kbog25 marked this conversation as resolved.
key :description, 'Displays the reason the veteran is not eligible for a status card'
key :example, 'PERSON_NOT_FOUND'
end
property :confirmation_status, type: :string do
key :enum,
%w[DISCHONORABLE_SSC INELIGIBLE_SSC UNKNOWN_SSC EDIPI_NO_PNL_SSC CURRENTLY_SERVING_SSC ERROR_SSC
UNCAUGHT_SSC UNKNOWN_REASON NO_SSC_CHECK AD_DSCH_VAL_SSC AD_VAL_PREV_QUAL_SSC
AD_VAL_PREV_RES_GRD_SSC AD_UNCHAR_DSCH_SSC VAL_PREV_QUAL_SSC]
key :description, 'Displays the confirmation status of the veteran'
key :example, 'INELIGIBLE_SSC_CODE'
end
property :service_summary_code, type: :string do
key :description, "The veteran's Service Summary Code determined by VAProfile"
key :example, 'A5'
end
end
end
Expand Down
Loading
Loading