Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

fix: Default operation names no longer cause collisions #332

Merged
merged 2 commits into from
Sep 12, 2019

Conversation

wbreza
Copy link
Contributor

@wbreza wbreza commented Sep 12, 2019

APIM uses the operation name as the key when upserting operations into an API. By default we were using the function name as the operation name. During default configuration inference with multiple HTTP methods this caused a collision resulting in the last operation in always one.

This fix generates a unique operation name taking into account the function name + the HTTP method.

@wbreza wbreza requested a review from tbarlow12 September 12, 2019 20:08
@codecov
Copy link

codecov bot commented Sep 12, 2019

Codecov Report

Merging #332 into dev will increase coverage by 0.76%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             dev     #332      +/-   ##
=========================================
+ Coverage   93.9%   94.67%   +0.76%     
=========================================
  Files         47       47              
  Lines       1724     1727       +3     
  Branches     240      242       +2     
=========================================
+ Hits        1619     1635      +16     
+ Misses       105       92      -13
Impacted Files Coverage Δ
src/armTemplates/compositeArmTemplate.ts 100% <ø> (ø) ⬆️
src/plugins/invoke/azureInvokePlugin.ts 92.3% <ø> (ø) ⬆️
src/services/apimService.ts 94.07% <100%> (+8.84%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c505c2d...d40b53e. Read the comment docs.

Copy link
Contributor

@tbarlow12 tbarlow12 left a comment

Choose a reason for hiding this comment

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

LGTM! Let's just close my default method PR and use this one

@wbreza wbreza merged commit 374925e into dev Sep 12, 2019
@wbreza wbreza deleted the wabrez/apim-operation-name branch September 12, 2019 20:35
tbarlow12 pushed a commit that referenced this pull request Sep 13, 2019
APIM uses the operation name as the key when upserting operations into an API. By default we were using the function name as the operation name. During default configuration inference with multiple HTTP methods this caused a collision resulting in the last operation in always one.

This fix generates a unique operation name taking into account the function name + the HTTP method.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants