Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Description

Link to Devin run: https://app.devin.ai/sessions/780cc9b46a10467e93de7d459bd7609f
Requested by: William McAdams (@musicpulpite)

Fixes an issue where Go wiremock test generation was not distinguishing between endpoints that share the same URL path and HTTP method but have different names. This caused collisions when APIs have both streaming and non-streaming variants of the same endpoint (e.g., chat and chat_stream both at /v1/chat), or versioned endpoints like /v1/chat and /v2/chat.

Changes Made

  • Modified wiremockMappingKey to include the endpoint name in the key format: ${method} - ${urlPath} - ${endpointName}
  • Updated getWireMockConfigContent to extract the endpoint name from the mapping name when building the lookup key
  • Updated buildBasePath to include the endpoint name when looking up wiremock mappings
  • Added changelog entry for version 1.22.10

Testing

  • Unit tests added/updated
  • Manual testing completed (lint checks pass)

Human Review Checklist

  • Verify key format consistency: getWireMockConfigContent extracts endpoint name via mapping.name.split(" - ")[0], while buildBasePath uses endpoint.displayName ?? endpoint.name.originalName. These should match since mapping names are constructed as ${displayName || originalName} - ${exampleName}.
  • Consider edge case: if an endpoint name contains " - ", the split could produce incorrect results (unlikely but worth noting)

Co-Authored-By: William McAdams <musicpulpite@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

0 participants