generated from DFE-Digital/govuk-rails-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Swagger support for V3 declarations
- Loading branch information
Showing
6 changed files
with
673 additions
and
430 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -367,22 +367,15 @@ paths: | |
value: | ||
data: | ||
id: d0b4a32e-a272-489e-b30a-cb17131457fc | ||
type: npq-participant | ||
type: participant-declaration | ||
attributes: | ||
email: [email protected] | ||
full_name: Isabelle MacDonald | ||
teacher_reference_number: '1234567' | ||
participant_id: db3a7848-7308-4879-942a-c4a70ced400a | ||
declaration_type: started | ||
declaration_date: '2022-04-30' | ||
course_identifier: npq-leading-teaching | ||
state: submitted | ||
updated_at: '2021-05-31T02:22:32.000Z' | ||
npq_enrolments: | ||
- course_identifier: npq-leading-teaching | ||
schedule_identifier: npq-leadership-spring | ||
cohort: '2022' | ||
eligible_for_funding: true | ||
npq_application_id: db3a7848-7308-4879-942a-c4a70ced400a | ||
training_status: active | ||
school_urn: '106286' | ||
targeted_delivery_funding_eligibility: true | ||
funded_place: true | ||
has_passed: true | ||
schema: | ||
"$ref": "#/components/schemas/ParticipantDeclarationResponse" | ||
'401': | ||
|
@@ -1916,8 +1909,7 @@ components: | |
- expected-commitment-unclear | ||
- other | ||
ParticipantDeclaration: | ||
description: The details of an NPQ Participant | ||
type: object | ||
description: The data attributes associated with a participant declaration response | ||
required: | ||
- id | ||
- type | ||
|
@@ -1926,132 +1918,88 @@ components: | |
id: | ||
"$ref": "#/components/schemas/IDAttribute" | ||
type: | ||
description: The data type | ||
type: string | ||
example: npq-participant | ||
enum: | ||
- npq-participant | ||
- participant-declaration | ||
example: participant-declaration | ||
attributes: | ||
required: | ||
- participant_id | ||
- declaration_type | ||
- declaration_date | ||
- course_identifier | ||
- state | ||
- updated_at | ||
properties: | ||
email: | ||
description: The email address registered for this NPQ participant | ||
participant_id: | ||
description: The unique identifier of this participant declaration record | ||
type: string | ||
format: uuid | ||
nullable: false | ||
example: [email protected] | ||
full_name: | ||
description: The full name of this NPQ participant | ||
example: db3a7848-7308-4879-942a-c4a70ced400a | ||
declaration_type: | ||
description: The event declaration type | ||
type: string | ||
nullable: false | ||
example: Isabelle MacDonald | ||
teacher_reference_number: | ||
description: The Teacher Reference Number (TRN) for this NPQ participant | ||
example: started | ||
enum: | ||
- started | ||
- retained-1 | ||
- retained-2 | ||
- retained-3 | ||
- retained-4 | ||
- completed | ||
- extended-1 | ||
- extended-2 | ||
- extended-3 | ||
declaration_date: | ||
description: The event declaration date | ||
type: string | ||
example: '1234567' | ||
nullable: false | ||
example: '2022-04-30' | ||
course_identifier: | ||
description: The NPQ course this NPQ application relates to | ||
type: string | ||
nullable: false | ||
example: npq-leading-teaching | ||
enum: | ||
- 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 | ||
state: | ||
description: Indicates the state of this payment declaration | ||
type: string | ||
nullable: false | ||
example: submitted | ||
enum: | ||
- submitted | ||
- eligible | ||
- payable | ||
- paid | ||
- voided | ||
- ineligible | ||
- awaiting-clawback | ||
- clawed-back | ||
updated_at: | ||
description: The date the application was last updated | ||
type: string | ||
nullable: false | ||
format: date-time | ||
example: '2021-05-31T02:22:32.000Z' | ||
npq_enrolments: | ||
description: Information about the course(s) the participant is enroled | ||
in | ||
type: array | ||
items: | ||
description: The details of an NPQ Participant enrolment | ||
type: object | ||
required: | ||
- course_identifier | ||
- npq_application_id | ||
- eligible_for_funding | ||
- training_status | ||
- targeted_delivery_funding_eligibility | ||
properties: | ||
course_identifier: | ||
description: The NPQ course this NPQ application relates to | ||
type: string | ||
nullable: false | ||
example: npq-leading-teaching | ||
enum: | ||
- 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 | ||
schedule_identifier: | ||
description: The new schedule of the participant | ||
nullable: true | ||
type: string | ||
example: npq-leadership-spring | ||
enum: | ||
- npq-aso-march | ||
- npq-aso-june | ||
- npq-aso-november | ||
- npq-aso-december | ||
- npq-ehco-march | ||
- npq-ehco-june | ||
- npq-ehco-november | ||
- npq-ehco-december | ||
- npq-leadership-autumn | ||
- npq-leadership-spring | ||
- npq-specialist-autumn | ||
- npq-specialist-spring | ||
cohort: | ||
description: Indicates which call-off contract would fund this | ||
participant's training. 2021 indicates a participant that has | ||
started, or will start, their training in the 2021/22 academic | ||
year. Once a provider accepts an application, they may change | ||
a participant's cohort up until the point of submitting a started | ||
declaration. | ||
type: string | ||
nullable: true | ||
example: '2022' | ||
eligible_for_funding: | ||
description: Indicates whether this NPQ participant would be eligible | ||
for funding from the DfE | ||
type: boolean | ||
nullable: false | ||
example: true | ||
npq_application_id: | ||
description: The ID of the NPQ application that was accepted to | ||
create this enrolment | ||
type: string | ||
format: uuid | ||
nullable: false | ||
example: db3a7848-7308-4879-942a-c4a70ced400a | ||
training_status: | ||
description: The training status of the NPQ participant | ||
type: string | ||
enum: | ||
- active | ||
- deferred | ||
- withdrawn | ||
example: active | ||
school_urn: | ||
description: The Unique Reference Number (URN) of the school where | ||
this NPQ participant is employed | ||
type: string | ||
nullable: true | ||
example: '106286' | ||
targeted_delivery_funding_eligibility: | ||
description: Whether or not this application is eligible for Targeted | ||
Delivery Funding uplift | ||
nullable: false | ||
type: boolean | ||
example: true | ||
funded_place: | ||
description: Indicates whether this NPQ participant is funded | ||
by DfE | ||
nullable: true | ||
type: boolean | ||
example: true | ||
has_passed: | ||
description: The date the declaration was last updated | ||
type: string | ||
nullable: true | ||
example: true | ||
ParticipantDeclarationRequest: | ||
description: A participant declaration data request | ||
type: object | ||
|
Oops, something went wrong.