diff --git a/public/api/docs/v3/swagger.yaml b/public/api/docs/v3/swagger.yaml index d4365e324d..2010ac8e45 100644 --- a/public/api/docs/v3/swagger.yaml +++ b/public/api/docs/v3/swagger.yaml @@ -328,26 +328,6 @@ paths: description: The participant declaration being created content: application/json: - examples: - success: - value: - data: - id: d0b4a32e-a272-489e-b30a-cb17131457fc - type: participant-declaration - attributes: - participant_id: db3a7848-7308-4879-942a-c4a70ced400a - declaration_type: started - declaration_date: '2021-05-31T02:21:32.000Z' - course_identifier: npq-leading-teaching - state: submitted - updated_at: '2021-05-31T02:22:32.000Z' - created_at: '2021-05-31T02:22:32.000Z' - statement_id: cd3a12347-7308-4879-942a-c4a70ced400a - clawback_statement_id: cd3a12347-7308-4879-942a-c4a70ced400a - ineligible_for_funding_reason: duplicate_declaration - uplift_paid: true - has_passed: true - lead_provider_name: schema: "$ref": "#/components/schemas/ParticipantDeclarationResponse" '401': @@ -972,12 +952,6 @@ components: cohort or cohorts. This is a comma delimited string of years. type: string example: '2021,2022' - delivery_partner_id: - description: Return participant declarations associated to the specified - delivery partner or delivery partners. This is a comma delimited string - of delivery partner IDs. - type: string - example: 7e5bcdbf-c818-4961-8da5-439cab1984e0 ListStatementsFilter: description: Filter statements to return more specific results type: object diff --git a/spec/swagger_schemas/filters/list_participant_declarations.rb b/spec/swagger_schemas/filters/list_participant_declarations.rb index c00bdc77d0..26cf9db2c2 100644 --- a/spec/swagger_schemas/filters/list_participant_declarations.rb +++ b/spec/swagger_schemas/filters/list_participant_declarations.rb @@ -23,6 +23,6 @@ description: "Return participant declarations associated to the specified cohort or cohorts. This is a comma delimited string of years.", type: :string, example: "2021,2022", - } + }, }) }.freeze diff --git a/spec/swagger_schemas/models/participant_declaration.rb b/spec/swagger_schemas/models/participant_declaration.rb index 7a34af43a3..d743afb1d5 100644 --- a/spec/swagger_schemas/models/participant_declaration.rb +++ b/spec/swagger_schemas/models/participant_declaration.rb @@ -38,17 +38,7 @@ type: :string, nullable: false, example: "started", - enum: %w[ - started - retained-1 - retained-2 - retained-3 - retained-4 - completed - extended-1 - extended-2 - extended-3 - ], + enum: Schedule::DECLARATION_TYPES, }, declaration_date: { description: "The event declaration date", @@ -60,21 +50,8 @@ description: "The NPQ course this NPQ application relates to", type: :string, nullable: false, - example: "npq-leading-teaching", - enum: %w[ - npq-leading-teaching - npq-leading-behaviour-culture - npq-leading-teaching-development - npq-leading-literacy - npq-senior-leadership - npq-headship - npq-executive-leadership - npq-early-years-leadership - npq-additional-support-offer - npq-early-headship-coaching-offer - npq-leading-primary-mathematics - npq-senco - ], + example: Course::IDENTIFIERS.first, + enum: Course::IDENTIFIERS, }, eligible_for_payment: { description: "[Deprecated - use state instead] Indicates whether this declaration would be eligible for funding from the DfE", @@ -93,16 +70,7 @@ type: :string, nullable: false, example: "submitted", - enum: %w[ - submitted - eligible - payable - paid - voided - ineligible - awaiting-clawback - clawed-back - ], + enum: Declaration.states.keys, }, updated_at: { description: "The date the application was last updated", @@ -112,7 +80,7 @@ example: "2021-05-31T02:22:32.000Z", }, has_passed: { - description: "The date the declaration was last updated", + description: "Whether the participant has failed or passed", type: :string, nullable: true, example: true,