Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/lint-commit-msg.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Lint Commit Messages

on: [push, pull_request]
on: [workflow_dispatch, push, pull_request]

permissions:
contents: read
Expand Down
4 changes: 2 additions & 2 deletions example/example.1.0.0.oas.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
openapi: '3.0.4'
info:
title: Test Results Api
version: '1.0.0'
description: This API is for obtaining or submitting test results.
x-audience: public-external
x-contains-sensitive-data: false
x-value-chain: detect
contact:
name: Result API contact
url: https://url-to-api-team-confluence-support-page
email: result@api.ukhsa.gov.uk

Check notice on line 12 in example/example.1.0.0.oas.yml

View workflow job for this annotation

GitHub Actions / Lint Example OpenAPI

may-have-info-x-api-type

Missing or wrong 'info.x-api-type'. Assuming 'standard'. Valid values: standard, pygeoapi.
servers:
- url: https://azgw.api.ukhsa.gov.uk/detect/testing/v1
description: UKHSA Test Results API Server.
Expand All @@ -32,8 +32,8 @@
description: This response returns a information about the API.
content:
application/json:
schema:

Check failure on line 35 in example/example.1.0.0.oas.yml

View workflow job for this annotation

GitHub Actions / Lint Example OpenAPI

oas3-schema

"schema" property must be object.
$ref: '#/components/schemas/ApiInfo'
#$ref: '#/components/schemas/ApiInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
Expand All @@ -48,60 +48,60 @@
$ref: '#/components/responses/UnexpectedError'

/results:
get:
summary: List all test results
description: List all test results.
operationId: getResults
#operationId: getResults
tags:
- Test Results
parameters:
- $ref: '#/components/parameters/limitParam'
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/sortParam'
- $ref: '#/components/parameters/fieldsParam'
- in: query
name: type
required: false
description: The type of test to filter by.
schema:
$ref: '#/components/schemas/RHSFilterExpression'
example: eq:Lateral Flow Test
- in: query
name: result
required: false
description: The result type of test to filter by.
schema:
type: string
x-extensible-enum:
- POSITIVE
- NEGATIVE
- UNREADABLE
examples:
positive:
value: POSITIVE
negative:
value: NEGATIVE
unreadable:
value: UNREADABLE
responses:
'200':
description: This response returns a list of all test results that match the request.
content:
application/json:
schema:
$ref: '#/components/schemas/ResultsResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/UnexpectedError'
default:
$ref: '#/components/responses/UnexpectedError'

Check warning on line 104 in example/example.1.0.0.oas.yml

View workflow job for this annotation

GitHub Actions / Lint Example OpenAPI

operation-operationId

Operation must have "operationId".
post:
summary: Submit a new test result
description: Submit a new test result.
Expand Down Expand Up @@ -298,50 +298,50 @@
- total
- limit

ApiInfo:
type: object
description: Schema for detailing API information.
properties:
name:
type: string
description: The name of the API.
example: Test Results API
version:
type: string
pattern: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'
description: The version of the API.
example: 1.0.0
status:
type: string
description: The status of the API version.
x-extensible-enum:
- ALPHA
- BETA
- LIVE
- DEPRECATED
example: LIVE
releaseDate:
type: string
format: date
description: The release date of this API version.
example: 2025-02-26
documentation:
type: string
format: uri
description: A URL to the API documentation.
example: https://developer.ukhsa.gov.uk/namespace/product/v1/docs
releaseNotes:
type: string
format: uri
description: A URL to the API release notes.
example: https://developer.ukhsa.gov.uk/namespace/product/v1/releaseNotes
required:
- name
- version
- status
- releaseDate
- documentation
- releaseNotes

Check warning on line 344 in example/example.1.0.0.oas.yml

View workflow job for this annotation

GitHub Actions / Lint Example OpenAPI

oas3-unused-component

Potentially unused component has been detected.

ProblemDetails:
type: object
Expand Down
Loading