Skip to content

Conversation

@lukaszgryglicki
Copy link
Member

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a new /user/{userID}/active-signature endpoint to the Go-based API spec, along with its shared response schema.

  • Introduce user-active-signature.yaml defining the response object.
  • Add the /user/{userID}/active-signature GET path with parameters and responses.
  • Reference the new schema in cla.v2.yaml definitions.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
swagger/common/user-active-signature.yaml New schema for “User Active Signature” response
swagger/cla.v2.yaml Added /user/{userID}/active-signature endpoint and wired the schema
Comments suppressed due to low confidence (4)

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

  • The summary field includes a JSON example block; consider moving that example into the description and keeping the summary to a brief one-line overview.
      summary: |

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

  • [nitpick] The path parameter is named userID (camelCase) while the response schema uses user_id (snake_case). Consider standardizing naming conventions across parameters and payload fields.
      - name: userID

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

  • The new getUserActiveSignature endpoint does not appear to have accompanying tests; please add unit/integration tests to cover its behavior.
      operationId: getUserActiveSignature

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

  • There's an extra trailing apostrophe at the end of this line which will break YAML parsing; please remove it.
          'return_url': <url-where-user-initiated-signature-from>'

Signed-off-by: Lukasz Gryglicki <[email protected]>
Signed-off-by: Lukasz Gryglicki <[email protected]>
Signed-off-by: Lukasz Gryglicki <[email protected]>
Signed-off-by: Lukasz Gryglicki <[email protected]>
@mlehotskylf
Copy link
Collaborator

@lukaszgryglicki, LGTM, just make sure Python's API responses are the same as this Golang version. For example Python version also returned 200 with a null body for no signature and returns BadRequest on error, and JSON null on no result. Any change in status code could affect UI.

I assume you checked if this model matches what the Python API returned (field names, types, nesting).

I recommend to use AI/CoPilot to compare these 2 implementations (Python vs. Golang) which should be able to catch any differences.

mlehotskylf
mlehotskylf previously approved these changes Jul 18, 2025
@lukaszgryglicki
Copy link
Member Author

I will also add test coverage that check exactly for this on Tue.
Just like I did in previous API which is already deployed: here.

@mlehotskylf
Copy link
Collaborator

Sounds good, thanks!

@lukaszgryglicki
Copy link
Member Author

I've added test coverage for the new API - PTAL again @mlehotskylf - ty.

Signed-off-by: Lukasz Gryglicki <[email protected]>
@lukaszgryglicki lukaszgryglicki merged commit 622bfd1 into dev Jul 21, 2025
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants