Skip to content
Snippets Groups Projects

Update openapi specs to be more strict for test validation

Merged Martin Lowe requested to merge malowe/main/fix-spec-fields into main
1 file
+ 108
8
Compare changes
  • Side-by-side
  • Inline
+ 108
8
@@ -252,7 +252,17 @@ components:
@@ -252,7 +252,17 @@ components:
DateTime:
DateTime:
type: string
type: string
format: datetime
format: date-time
 
description: |
 
Date string in the RFC 3339 format. Example, `1990-12-31T15:59:60-08:00`.
 
 
More on this standard can be read at https://tools.ietf.org/html/rfc3339.
 
 
NullableDateTime:
 
type:
 
- string
 
- "null"
 
format: date-time
description: |
description: |
Date string in the RFC 3339 format. Example, `1990-12-31T15:59:60-08:00`.
Date string in the RFC 3339 format. Example, `1990-12-31T15:59:60-08:00`.
@@ -260,6 +270,12 @@ components:
@@ -260,6 +270,12 @@ components:
ValidationRequest:
ValidationRequest:
type: object
type: object
 
additionalProperties: false
 
required:
 
- provider
 
- repoUrl
 
- strictMode
 
- commits
properties:
properties:
provider:
provider:
type: string
type: string
@@ -274,7 +290,7 @@ components:
@@ -274,7 +290,7 @@ components:
strictMode:
strictMode:
type: boolean
type: boolean
description: Whether to strictly apply validation regardless of project matching
description: Whether to strictly apply validation regardless of project matching
estimated_loc:
estimatedLoc:
type:
type:
- integer
- integer
- "null"
- "null"
@@ -284,6 +300,12 @@ components:
@@ -284,6 +300,12 @@ components:
minimum: 1
minimum: 1
items:
items:
type: object
type: object
 
additionalProperties: false
 
required:
 
- hash
 
- author
 
- committer
 
- parents
properties:
properties:
hash:
hash:
type: string
type: string
@@ -300,6 +322,9 @@ components:
@@ -300,6 +322,9 @@ components:
committer:
committer:
$ref: "#/components/schemas/GitUser"
$ref: "#/components/schemas/GitUser"
description: The committer of the Git commit
description: The committer of the Git commit
 
last_modification_date:
 
$ref: "#/components/schemas/NullableDateTime"
 
description: Last time that the commit was updated
head:
head:
type:
type:
- boolean
- boolean
@@ -313,6 +338,10 @@ components:
@@ -313,6 +338,10 @@ components:
GitUser:
GitUser:
type: object
type: object
 
additionalProperties: false
 
required:
 
- name
 
- mail
properties:
properties:
name:
name:
type: string
type: string
@@ -320,9 +349,21 @@ components:
@@ -320,9 +349,21 @@ components:
mail:
mail:
type: string
type: string
description: the email address of the user
description: the email address of the user
 
external_id:
 
$ref: "#/components/schemas/NullableString"
 
description: the email address of the user
ValidationResponse:
ValidationResponse:
type: object
type: object
 
additionalProperties: false
 
required:
 
- time
 
- trackedProject
 
- strictMode
 
- fingerprint
 
- errorCount
 
- passed
 
- commits
properties:
properties:
time:
time:
$ref: "#/components/schemas/DateTime"
$ref: "#/components/schemas/DateTime"
@@ -351,6 +392,11 @@ components:
@@ -351,6 +392,11 @@ components:
Commit:
Commit:
type: object
type: object
 
additionalProperties: false
 
required:
 
- errors
 
- warnings
 
- messages
properties:
properties:
messages:
messages:
type: array
type: array
@@ -370,6 +416,10 @@ components:
@@ -370,6 +416,10 @@ components:
CommitMessage:
CommitMessage:
type: object
type: object
 
additionalProperties: false
 
required:
 
- code
 
- message
properties:
properties:
code:
code:
type: integer
type: integer
@@ -385,13 +435,31 @@ components:
@@ -385,13 +435,31 @@ components:
CommitValidationStatus:
CommitValidationStatus:
type: object
type: object
 
additionalProperties: false
 
required:
 
- id
 
- commit_hash
 
- project
 
- repo_url
 
- provider
 
- creation_date
 
- last_modified
 
- errors
properties:
properties:
id:
id:
type: integer
type: integer
description: internal ID of the commit for tracking
description: internal ID of the commit for tracking
sha:
commit_hash:
type: string
type: string
description: the SHA of the commit that was validated
description: the SHA of the commit that was validated
 
user_mail:
 
type:
 
- string
 
- "null"
 
description: the email of the user associated with the status
 
estimated_loc:
 
type: integer
 
description: the estimated number of lines of code changed by commit if available.
project:
project:
type: string
type: string
description: The short project ID of the project that was detected for the commit, if it exists.
description: The short project ID of the project that was detected for the commit, if it exists.
@@ -418,28 +486,46 @@ components:
@@ -418,28 +486,46 @@ components:
CommitValidationMessage:
CommitValidationMessage:
type: object
type: object
 
additionalProperties: false
 
required:
 
- id
 
- status_code
 
- author_email
properties:
properties:
id:
id:
type: integer
type: integer
description: internal ID of the commit message for tracking
description: internal ID of the commit message for tracking
commit_id:
type: integer
description: internal ID of the commit for tracking
status_code:
status_code:
type: integer
type: integer
description: error code associated with the commit
description: error code associated with the commit
eclipse_id:
eclipse_id:
type: string
$ref: "#/components/schemas/NullableString"
description: the Eclipse Foundation ID of the user
description: the Eclipse Foundation ID of the user
author_email:
author_email:
type: string
type: string
description: Email address of the author of the commit for additional information
description: Email address of the author of the commit for additional information
provider_id:
committer_email:
type: string
type: string
 
description: Email address of the committer of the commit for additional information
 
provider_id:
 
$ref: "#/components/schemas/NullableString"
description: the outward facing URL of the repo the commit belongs to.
description: the outward facing URL of the repo the commit belongs to.
SystemHook:
SystemHook:
type: object
type: object
 
additionalProperties: false
 
required:
 
- created_at
 
- updated_at
 
- event_name
 
- name
 
- owner_email
 
- owner_name
 
- owners
 
- path
 
- path_with_namespace
 
- project_id
 
- project_visibility
properties:
properties:
created_at:
created_at:
$ref: "#/components/schemas/DateTime"
$ref: "#/components/schemas/DateTime"
@@ -496,6 +582,13 @@ components:
@@ -496,6 +582,13 @@ components:
PrivateProjectData:
PrivateProjectData:
type: object
type: object
 
additionalProperties: false
 
required:
 
- user_id
 
- project_id
 
- project_path
 
- ef_username
 
- creation_date
properties:
properties:
user_id:
user_id:
type: integer
type: integer
@@ -558,12 +651,19 @@ components:
@@ -558,12 +651,19 @@ components:
description: The SHA hash of the head of the pull request.
description: The SHA hash of the head of the pull request.
RevalidationRequest:
RevalidationRequest:
type: object
type: object
 
additionalProperties: false
 
required:
 
- h-form-captcha-response
properties:
properties:
h-form-captcha-response:
h-form-captcha-response:
type: string
type: string
description: the hCaptcha challenge response.
description: the hCaptcha challenge response.
Error:
Error:
type: object
type: object
 
additionalProperties: false
 
required:
 
- status_code
 
- message
properties:
properties:
status_code:
status_code:
type: integer
type: integer
Loading