rodrigoluizs commented on issue #8195:
URL: 
https://github.com/apache/incubator-devlake/issues/8195#issuecomment-2485470601

   Thanks @klesh!
   
   I’m already working on it. I’d like to get your input on how we should 
approach this, currently I'm thinking about those 2 potential solutions, each 
with trade-offs.
   
   ### Option 1: Add New Endpoints
   We could introduce new endpoints that explicitly handle connection names, 
such as:
   `GET /connections/by-name/:connectionName/deployments
   `
   
   This approach makes it explicit whether the API expects a connectionId or a 
connectionName, avoiding ambiguity. However, it introduces new endpoint paths 
and slightly increases the API surface area.
   
   ### Option 2: Use Existing Endpoints
   We could use the existing endpoints, like:
   `GET /connections/:connectionIdentifier/deployments
   `
   
   Here, we’d rename the parameter from connectionId to something more generic, 
like connectionIdentifier or connectionKey, to handle both numeric IDs and 
names. This keeps the API surface minimal but relies on clear documentation and 
server-side validation to distinguish between IDs and names.
   
   I’d like to hear your thoughts on which approach aligns better with our API 
design principles. Let me know if you have any other suggestions or concerns.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to