Skip to content

Commit 43610f7

Browse files
Port /v2/user/<user-uuid>/active-signature to golang
Signed-off-by: Lukasz Gryglicki <[email protected]>
1 parent af9859b commit 43610f7

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

cla-backend-go/swagger/cla.v2.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2445,6 +2445,48 @@ paths:
24452445
tags:
24462446
- signatures
24472447

2448+
/user/{userID}/active-signature:
2449+
parameters:
2450+
- $ref: "#/parameters/x-request-id"
2451+
- name: userID
2452+
description: the user ID
2453+
in: path
2454+
type: string
2455+
required: true
2456+
pattern: '^[a-fA-F0-9]{8}-?[a-fA-F0-9]{4}-?4[a-fA-F0-9]{3}-?[89ab][a-fA-F0-9]{3}-?[a-fA-F0-9]{12}$' # uuidv4
2457+
get:
2458+
summary: |
2459+
Returns all metadata associated with a user's active signature.
2460+
{
2461+
'user_id': <user-id>,
2462+
'project_id': <project-id>,
2463+
'repository_id': <repository-id>,
2464+
'pull_request_id': <PR>,
2465+
'return_url': <url-where-user-initiated-signature-from>'
2466+
}
2467+
Returns null if the user does not have an active signature.
2468+
security: [ ]
2469+
operationId: getUserActiveSignature
2470+
responses:
2471+
'200':
2472+
description: 'Success'
2473+
headers:
2474+
x-request-id:
2475+
type: string
2476+
description: The unique request ID value - assigned/set by the API Gateway based on the session
2477+
schema:
2478+
$ref: '#/definitions/user-active-signature'
2479+
'400':
2480+
$ref: '#/responses/invalid-request'
2481+
'401':
2482+
$ref: '#/responses/unauthorized'
2483+
'403':
2484+
$ref: '#/responses/forbidden'
2485+
'404':
2486+
$ref: '#/responses/not-found'
2487+
tags:
2488+
- signatures
2489+
24482490
/signatures/project/{projectSFID}/company/{companyID}/employee:
24492491
get:
24502492
summary: Get project company signatures for the employees
@@ -5006,6 +5048,9 @@ definitions:
50065048
user:
50075049
$ref: './common/user.yaml'
50085050

5051+
user-active-signature:
5052+
$ref: './common/user-active-signature.yaml'
5053+
50095054
signatures:
50105055
$ref: './common/signatures.yaml'
50115056

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright The Linux Foundation and each contributor to CommunityBridge.
2+
# SPDX-License-Identifier: MIT
3+
4+
type: object
5+
x-nullable: true
6+
title: User Active Signature
7+
description: >
8+
Returns all metadata associated with a user's active signature.
9+
Returns `null` if the user does not have an active signature.
10+
properties:
11+
user_id:
12+
$ref: './common/properties/internal-id.yaml'
13+
description: The unique internal ID of the user
14+
project_id:
15+
$ref: './common/properties/internal-id.yaml'
16+
description: The unique ID of the associated project
17+
repository_id:
18+
type: string
19+
description: The unique ID of the associated repository
20+
example: repo-abc123
21+
pull_request_id:
22+
type: string
23+
description: The pull request ID related to the signature
24+
example: '456'
25+
return_url:
26+
type: string
27+
format: uri
28+
description: The return URL where the user initiated the signature
29+
example: https://example.com/return

0 commit comments

Comments
 (0)