Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cb2-11293): updated spec file and type definitions file #124

Merged
merged 4 commits into from
Mar 18, 2024
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
86 changes: 64 additions & 22 deletions docs/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ info:
API spec for technical records v3 api
version: 1.0.0
title: "Technical Record v3"
termsOfService: ''
contact:
email: user@email.com
license:
Expand Down Expand Up @@ -47,7 +46,7 @@ paths:
content:
application/json:
schema:
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v2.0.21/json-schemas/v3/tech-record/get/search/complete/index.json"
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v6.1.0/json-schemas/v3/tech-record/get/search/index.json"
'401':
description: Not authenticated
'403':
Expand Down Expand Up @@ -78,7 +77,7 @@ paths:
content:
application/json:
schema:
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v2.0.21/json-schemas/v3/tech-record/get/psv/complete/index.json"
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v6.1.0/json-schemas/v3/tech-record/get/psv/complete/index.json"
'400':
description: Bad request
'401':
Expand Down Expand Up @@ -114,14 +113,14 @@ paths:
content:
application/json:
schema:
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/develop/json-schemas/v3/tech-record/put/psv/complete/index.json"
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v6.1.0/json-schemas/v3/tech-record/put/psv/complete/index.json"
responses:
'200':
description: Returns the technical record
content:
application/json:
schema:
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v2.0.21/json-schemas/v3/tech-record/get/psv/complete/index.json"
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v6.1.0/json-schemas/v3/tech-record/get/psv/complete/index.json"
'400':
description: Bad request
'401':
Expand All @@ -145,14 +144,14 @@ paths:
content:
application/json:
schema:
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/develop/json-schemas/v3/tech-record/put/psv/complete/index.json"
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v6.1.0/json-schemas/v3/tech-record/put/psv/complete/index.json"
responses:
'200':
description: Returns the created tech record
content:
application/json:
schema:
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v2.0.21/json-schemas/v3/tech-record/get/psv/complete/index.json"
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v6.1.0/json-schemas/v3/tech-record/get/psv/complete/index.json"
'400':
description: Bad request
'401':
Expand Down Expand Up @@ -189,7 +188,7 @@ paths:
content:
application/json:
schema:
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v2.0.21/json-schemas/v3/tech-record/get/psv/complete/index.json"
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v6.1.0/json-schemas/v3/tech-record/get/psv/complete/index.json"
'400':
description: Bad request
'401':
Expand Down Expand Up @@ -220,24 +219,69 @@ paths:
type: string
required: true
description: Date at which the record was created. Sort key of the DynamoDB table.
- in: body
description: The desired status code of the new tech record and the reason for the unarchival
schema:
type: object
required: status, reasonForUnarchiving
properties:
status:
type: string
reasonForUnarchiving:
type: string

requestBody:
description: The desired status code of the new tech record and the reason for the unarchival
content:
application/json:
schema:
type: object
required: [status, reasonForUnarchiving]
properties:
status:
type: string
reasonForUnarchiving:
type: string
responses:
'200':
description: Returns the unarchived tech record with the supplied status
content:
application/json:
schema:
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v2.0.21/json-schemas/v3/tech-record/get/psv/complete/index.json"
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v6.1.0/json-schemas/v3/tech-record/get/psv/complete/index.json"
'400':
description: Bad request
'401':
description: Not authenticated
'403':
description: Unauthorised Access
'404':
description: Operation not supported
'422':
description: Unprocessable request
'500':
description: Validation Error
'/v3/technical-records{systemNumber}/{createdTimestamp}':
patch:
summary: 'Updates and archives record'
tags:
- Update technical record
parameters:
- in: path
name: systemNumber
schema:
type: string
required: true
description: This represents the systemNumber of the vehicle. Partition key of the DynamoDB table.
- in: path
name: createdTimestamp
schema:
type: string
required: true
description: Date at which the record was created. Sort key of the DynamoDB table.
requestBody:
required: true
description: The tech record to be updated
content:
application/json:
schema:
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v6.1.0/json-schemas/v3/tech-record/put/psv/complete/index.json"
responses:
'200':
description: Returns the new upadted tech record
content:
application/json:
schema:
$ref: "https://raw.githubusercontent.com/dvsa/cvs-type-definitions/v6.1.0/json-schemas/v3/tech-record/get/psv/complete/index.json"
'400':
description: Bad request
'401':
Expand Down Expand Up @@ -266,5 +310,3 @@ security:
- OAuth2:
- read
- write
servers:
- url: 'https://url/api/v1'
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
],
"license": "MIT",
"dependencies": {
"@dvsa/cvs-type-definitions": "^5.1.2",
"@dvsa/cvs-type-definitions": "^6.1.0",
"@types/luxon": "^3.3.0",
"jwt-decode": "^3.1.2",
"luxon": "^3.3.0",
Expand Down
Loading