-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
812 additions
and
157 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
122 changes: 122 additions & 0 deletions
122
app/swagger/swagger/requests/my_va/submission_statuses.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# app/controllers/v0/my_va/submission_statuses_controller.rb | ||
|
||
# frozen_string_literal: true | ||
|
||
module Swagger | ||
module Requests | ||
module MyVA | ||
class SubmissionStatuses | ||
include Swagger::Blocks | ||
|
||
swagger_path '/v0/my_va/submission_statuses' do | ||
operation :get do | ||
key :description, 'Get list of submitted forms for the current session' | ||
key :operationId, 'getSubmissionStatuses' | ||
key :tags, %w[ | ||
my_va | ||
] | ||
|
||
parameter :authorization | ||
|
||
key :produces, ['application/json'] | ||
|
||
response 200 do | ||
key :description, 'submitted forms and statuses' | ||
|
||
schema do | ||
key :type, :object | ||
|
||
property :data do | ||
key :type, :array | ||
items do | ||
key :required, %i[ | ||
id | ||
type | ||
attributes | ||
] | ||
property :id, type: :string, example: '3b03b5a0-3ad9-4207-b61e-3a13ed1c8b80', | ||
description: 'Form submission UID' | ||
property :type, type: :string, example: 'submission_status', description: 'type of request' | ||
property :attributes do | ||
key :$ref, :SubmissionStatusAttrs | ||
end | ||
end | ||
end | ||
end | ||
end | ||
|
||
response 296 do | ||
key :description, 'submitted forms but errors occured looking up statuses from lighthouse' | ||
|
||
schema do | ||
key :type, :object | ||
key :required, %i[data errors] | ||
property :data do | ||
key :type, :array | ||
items do | ||
key :required, %i[ | ||
id | ||
type | ||
attributes | ||
] | ||
property :id, type: :string, example: '3b03b5a0-3ad9-4207-b61e-3a13ed1c8b80', | ||
description: 'Form submission UID' | ||
property :type, type: :string, example: 'submission_status', description: 'type of request' | ||
property :attributes do | ||
key :$ref, :SubmissionStatusAttrs | ||
end | ||
end | ||
end | ||
|
||
property :errors do | ||
key :type, :array | ||
items do | ||
key :required, %i[ | ||
status | ||
source | ||
title | ||
detail | ||
] | ||
property :status, type: :integer, example: 429, description: 'Error code' | ||
property :source, type: :string, example: 'Lighthouse - Benefits Intake API', | ||
description: 'Error source' | ||
property :title, type: :string, example: 'Form Submission Status: Too Many Requests', | ||
description: 'Error description' | ||
property :detail, type: :string, example: 'API rate limit exceeded', description: 'Error details' | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
|
||
swagger_schema :SubmissionStatusAttrs do | ||
key :type, :object | ||
key :description, 'submitted form attributes' | ||
|
||
property :id, type: :string, example: '3b03b5a0-3ad9-4207-b61e-3a13ed1c8b80', | ||
description: 'Submitted form UID from lighthouse' | ||
property :detail, type: [:string, 'null'], example: '', | ||
description: 'Error details (only when errors are present)' | ||
property :form_type, type: :string, example: '21-0845', description: 'The type of form' | ||
property :message, type: [:string, 'null'] | ||
property :status, type: [:string, 'null'], enum: [ | ||
nil, | ||
'pending', | ||
'uploaded', | ||
'received', | ||
'processing', | ||
'success', | ||
'vbms', | ||
'error', | ||
'expired' | ||
], example: 'received', description: 'The current status of the submission' | ||
property :created_at, type: :string, example: '2023-12-15T20:40:47.583Z', | ||
description: 'The submission record created in VA.gov' | ||
property :updated_at, type: [:string, 'null'], example: '2023-12-15T20:40:54.474Z', | ||
description: 'The last time the submission status was updated' | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.