Skip to content
Snippets Groups Projects
Commit e04f9e1a authored by Martin Lowe's avatar Martin Lowe :flag_ca:
Browse files

Cleanup openapi spec to match more strict measures

Measures are applied through Insomnia on import, and while we could add
exceptions, being more specific with the fields isn't a bad thing to do
in this case.
parent c001ecdd
No related branches found
No related tags found
1 merge request!140Iss #132 - Projects and auth token code migrations, update openapi spec
...@@ -2,6 +2,10 @@ openapi: "3.1.0" ...@@ -2,6 +2,10 @@ openapi: "3.1.0"
info: info:
version: 1.1.0 version: 1.1.0
title: Eclipse Foundation Git ECA API title: Eclipse Foundation Git ECA API
description: Collection of API endpoints used in the validation and management of external Git services, such as Gitlab and Github.
contact:
name: IT support
url: https://gitlab.eclipse.org/eclipsefdn/it/api/git-eca-rest-api/-/issues
license: license:
name: Eclipse Public License - 2.0 name: Eclipse Public License - 2.0
url: https://www.eclipse.org/legal/epl-2.0/ url: https://www.eclipse.org/legal/epl-2.0/
...@@ -11,10 +15,15 @@ servers: ...@@ -11,10 +15,15 @@ servers:
tags: tags:
- name: ECA Validation - name: ECA Validation
description: Definitions in relation to the validation of Git commits through ECA signage description: Definitions in relation to the validation of Git commits through ECA signage
- name: Reports
description: Reports on metadata associated with Git systems managed by the Eclipse Foundation
- name: Integration Webhooks
description: Endpoints related to binding to external Git services through a webhook
paths: paths:
/eca: /eca:
post: post:
operationId: validate
tags: tags:
- ECA Validation - ECA Validation
summary: ECA validation summary: ECA validation
...@@ -25,29 +34,36 @@ paths: ...@@ -25,29 +34,36 @@ paths:
schema: schema:
$ref: "#/components/schemas/ValidationRequest" $ref: "#/components/schemas/ValidationRequest"
responses: responses:
200: "200":
description: Success description: Success
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/ValidationResponse" $ref: "#/components/schemas/ValidationResponse"
500: "500":
description: Error while retrieving data description: Error while retrieving data
/eca/status/{fingerprint}: /eca/status/{fingerprint}:
parameters:
- name: fingerprint
in: path
description: Unique ID for the request group
required: true
schema:
type: string
get: get:
operationId: getCommitValidation
tags: tags:
- ECA Validation Status - ECA Validation
summary: Historic ECA validation status summary: Historic ECA validation status
description: Returns a set of validation messages for the given unique fingerprint description: Returns a set of validation messages for the given unique fingerprint
responses: responses:
200: "200":
description: Success description: Success
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/CommitValidationStatuses" $ref: "#/components/schemas/CommitValidationStatuses"
500: "500":
description: Error while retrieving data description: Error while retrieving data
/eca/status/{fingerprint}/ui: /eca/status/{fingerprint}/ui:
...@@ -59,34 +75,41 @@ paths: ...@@ -59,34 +75,41 @@ paths:
schema: schema:
type: string type: string
get: get:
operationId: getCommitValidationUI
tags:
- ECA Validation
summary: Historic ECA validation status in a HTML format summary: Historic ECA validation status in a HTML format
description: Returns an HTMl page containing validation messages description: Returns an HTMl page containing validation messages
responses: responses:
200: "200":
description: Success. An HTML page containing status info description: Success. An HTML page containing status info
404: "404":
description: Not Found description: Not Found
500: "500":
description: Error while retrieving data description: Error while retrieving data
/eca/lookup: /eca/lookup:
get: get:
operationId: getUserStatus
tags:
- ECA Validation
summary: User status lookup summary: User status lookup
description: Returns wether or not the user has a signed ECA description: Returns wether or not the user has a signed ECA
responses: responses:
200: "200":
description: Success description: Success
403: "403":
description: User exists with no ECA description: User exists with no ECA
404: "404":
description: User not found description: User not found
500: "500":
description: Error while retrieving data description: Error while retrieving data
/webhooks/github: /webhooks/github:
post: post:
operationId: processGithubWebhook
tags: tags:
- Github validation processing - Integration Webhooks
summary: Github incoming hook event processing summary: Github incoming hook event processing
description: Process incoming pull request hook events from Github description: Process incoming pull request hook events from Github
parameters: parameters:
...@@ -111,9 +134,9 @@ paths: ...@@ -111,9 +134,9 @@ paths:
schema: schema:
$ref: "#/components/schemas/GithubWebhookEvent" $ref: "#/components/schemas/GithubWebhookEvent"
responses: responses:
200: "200":
description: Success description: Success
500: "500":
description: Error while processing data description: Error while processing data
/webhooks/github/revalidate/{fingerprint}: /webhooks/github/revalidate/{fingerprint}:
parameters: parameters:
...@@ -124,8 +147,9 @@ paths: ...@@ -124,8 +147,9 @@ paths:
schema: schema:
type: string type: string
post: post:
operationId: revalidateWebhookRequest
tags: tags:
- Github validation processing - Integration Webhooks
summary: Gitlab webhook revalidation request summary: Gitlab webhook revalidation request
description: Process incoming system hooks from GitLab description: Process incoming system hooks from GitLab
requestBody: requestBody:
...@@ -134,20 +158,21 @@ paths: ...@@ -134,20 +158,21 @@ paths:
schema: schema:
$ref: '#/components/schemas/RevalidationRequest' $ref: '#/components/schemas/RevalidationRequest'
responses: responses:
200: "200":
description: Success description: Success
400: "400":
description: Bad request description: Bad request
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
404: "404":
description: Not found description: Not found
/webhooks/gitlab/system: /webhooks/gitlab/system:
post: post:
operationId: processGitlabHook
tags: tags:
- Gitlab system event processing - Integration Webhooks
summary: Gitlab event processing summary: Gitlab event processing
description: Process incoming system hooks from GitLab description: Process incoming system hooks from GitLab
parameters: parameters:
...@@ -162,9 +187,9 @@ paths: ...@@ -162,9 +187,9 @@ paths:
schema: schema:
$ref: "#/components/schemas/SystemHook" $ref: "#/components/schemas/SystemHook"
responses: responses:
200: "200":
description: Success description: Success
500: "500":
description: Error while processing data description: Error while processing data
/reports/gitlab/private-projects: /reports/gitlab/private-projects:
...@@ -194,26 +219,27 @@ paths: ...@@ -194,26 +219,27 @@ paths:
schema: schema:
type: string type: string
get: get:
operationId: getPrivateProjectEvents
tags: tags:
- Private project event report - Reports
summary: Gitlab private project event report summary: Gitlab private project event report
description: Returns list of private project events using desired filters description: Returns list of private project events using desired filters
responses: responses:
200: "200":
description: Success description: Success
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/PrivateProjectEvents" $ref: "#/components/schemas/PrivateProjectEvents"
400: "400":
description: Bad Request - invalid non-null prams description: Bad Request - invalid non-null prams
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
401: "401":
description: Unauthorized - invalid key description: Unauthorized - invalid key
500: "500":
description: Error while processing request description: Error while processing request
components: components:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment