[TT-11440/TT-11461] Add functionName to replace name in OAS virtual endpoint and endpoint post plugin#6098
Conversation
|
PR Description updated to latest commit (dcd71f8) |
|
API Changes --- prev.txt 2024-03-07 10:21:37.552528783 +0000
+++ current.txt 2024-03-07 10:21:34.772509738 +0000
@@ -2850,12 +2850,20 @@
// Enabled activates post plugin.
Enabled bool `bson:"enabled" json:"enabled"` // required.
// Name is the name of plugin function to be executed.
- Name string `bson:"name" json:"name"` // required.
+ // Deprecated: Use FunctionName instead.
+ Name string `bson:"name,omitempty" json:"name,omitempty"`
+ // FunctionName is the name of plugin function to be executed.
+ FunctionName string `bson:"functionName" json:"functionName"` // required.
// Path is the path to plugin.
Path string `bson:"path" json:"path"` // required.
}
EndpointPostPlugin contains endpoint level post plugin configuration.
+func (ep *EndpointPostPlugin) MarshalJSON() ([]byte, error)
+ MarshalJSON is a custom JSON marshaler for the EndpointPostPlugin struct.
+ It is implemented to facilitate a smooth migration from deprecated fields
+ that were previously used to represent the same data.
+
type EndpointPostPlugins []EndpointPostPlugin
func (e EndpointPostPlugins) ExtractTo(meta *apidef.GoPluginMeta)
@@ -4266,8 +4274,11 @@
type VirtualEndpoint struct {
// Enabled activates virtual endpoint.
Enabled bool `bson:"enabled" json:"enabled"` // required.
- // Name is the name of JS function.
- Name string `bson:"name" json:"name"` // required.
+ // Name is the name of plugin function to be executed.
+ // Deprecated: Use FunctionName instead.
+ Name string `bson:"name,omitempty" json:"name,omitempty"`
+ // FunctionName is the name of plugin function to be executed.
+ FunctionName string `bson:"functionName" json:"functionName"` // required.
// Path is the path to JS file.
Path string `bson:"path,omitempty" json:"path,omitempty"`
// Body is the JS function to execute encoded in base64 format.
@@ -4285,6 +4296,11 @@
func (v *VirtualEndpoint) Fill(meta apidef.VirtualMeta)
Fill fills *VirtualEndpoint from apidef.VirtualMeta.
+func (v *VirtualEndpoint) MarshalJSON() ([]byte, error)
+ MarshalJSON is a custom JSON marshaler for the VirtualEndpoint struct.
+ It is implemented to facilitate a smooth migration from deprecated fields
+ that were previously used to represent the same data.
+
type XTykAPIGateway struct {
// Info contains the main metadata for the API definition.
Info Info `bson:"info" json:"info"` // required |
PR Review
Code feedback:
✨ Review tool usage guide:Overview: With a configuration file, use the following template:
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview: With a configuration file, use the following template:
See the improve usage page for a more comprehensive guide on using this tool. |
💥 CI tests failed 🙈git-stateall okPlease look at the run or in the Checks tab. |
1 similar comment
💥 CI tests failed 🙈git-stateall okPlease look at the run or in the Checks tab. |
|
API tests result - postgres15-sha256 env: success ✅ User descriptionAdd functionName to replace name in OAS virtual endpoint and endpoint Related Issuehttps://tyktech.atlassian.net/browse/TT-11440 Motivation and ContextHow This Has Been TestedScreenshots (if appropriate)Types of changes
Checklist
Typeenhancement Description
Changes walkthrough
|
|
API tests result - mongo44-sha256 env: success ✅ User descriptionAdd functionName to replace name in OAS virtual endpoint and endpoint Related Issuehttps://tyktech.atlassian.net/browse/TT-11440 Motivation and ContextHow This Has Been TestedScreenshots (if appropriate)Types of changes
Checklist
Typeenhancement Description
Changes walkthrough
|
💥 CI tests failed 🙈git-stateall okPlease look at the run or in the Checks tab. |
829e3fc to
3e7bf2e
Compare
💥 CI tests failed 🙈git-stateall okPlease look at the run or in the Checks tab. |
💥 CI tests failed 🙈git-stateall okPlease look at the run or in the Checks tab. |
💥 CI tests failed 🙈git-stateall okPlease look at the run or in the Checks tab. |
💥 CI tests failed 🙈git-stateall okPlease look at the run or in the Checks tab. |
| // the same data. | ||
| func (v *VirtualEndpoint) MarshalJSON() ([]byte, error) { | ||
| if v.FunctionName == "" && v.Name != "" { | ||
| v.FunctionName = v.Name |
There was a problem hiding this comment.
This is probablly not great, marshaller writing out to v may cause side effects; all fields are primitives so it makes sense to make a copy into the Alias type?
a625089 to
38c8b06
Compare
|
💥 CI tests failed 🙈git-stateall okPlease look at the run or in the Checks tab. |
|
/release to release-5.3 |
|
/release to release-5.3.0 |
|
Working on it! Note that it can take a few minutes. |
…ndpoint and endpoint post plugin (#6098) ## **User description** <!-- Provide a general summary of your changes in the Title above --> Add functionName to replace name in OAS virtual endpoint and endpoint post plugin <!-- Describe your changes in detail --> ## Related Issue https://tyktech.atlassian.net/browse/TT-11440 https://tyktech.atlassian.net/browse/TT-11461 ## Motivation and Context <!-- Why is this change required? What problem does it solve? --> ## How This Has Been Tested <!-- Please describe in detail how you tested your changes --> <!-- Include details of your testing environment, and the tests --> <!-- you ran to see how your change affects other areas of the code, etc. --> <!-- This information is helpful for reviewers and QA. --> ## Screenshots (if appropriate) ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply --> <!-- If there are no documentation updates required, mark the item as checked. --> <!-- Raise up any additional concerns not covered by the checklist. --> - [ ] I ensured that the documentation is up to date - [ ] I explained why this PR updates go.mod in detail with reasoning why it's required - [ ] I would like a code coverage CI quality gate exception and have explained why ___ ## **Type** enhancement ___ ## **Description** - Deprecated `Name` field in favor of `FunctionName` for both `VirtualEndpoint` and `EndpointPostPlugin` configurations to clarify the purpose and usage. - Ensured backward compatibility by retaining the `Name` field but marking it as deprecated. - Updated related methods (`Fill` and `ExtractTo`) to prioritize `FunctionName` over `Name` when both are provided. - Modified and added unit tests to reflect changes and validate the precedence of `FunctionName` over `Name`. ___ ## **Changes walkthrough** <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>middleware.go</strong><dd><code>Deprecate Name in Favor of FunctionName for Plugin Configurations</code></dd></summary> <hr> apidef/oas/middleware.go <li>Deprecated <code>Name</code> in favor of <code>FunctionName</code> for both <code>VirtualEndpoint</code> and <br><code>EndpointPostPlugin</code>.<br> <li> Added handling to prefer <code>FunctionName</code> over <code>Name</code> if both are provided.<br> <li> Updated <code>Fill</code> and <code>ExtractTo</code> methods to support the new <code>FunctionName</code> <br>field. </details> </td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6098/files#diff-992ec7c28d25fd54f6491d295389757705cd114bc869a35cba50d42e548cdc6e">+26/-9</a> </td> </tr> </table></td></tr><tr><td><strong>Tests</strong></td><td><table> <tr> <td> <details> <summary><strong>middleware_test.go</strong><dd><code>Update Tests for FunctionName Precedence and Usage</code> </dd></summary> <hr> apidef/oas/middleware_test.go <li>Updated tests to use <code>FunctionName</code> instead of <code>Name</code>.<br> <li> Added tests to ensure <code>FunctionName</code> has precedence over <code>Name</code>. </details> </td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6098/files#diff-0af31cb29ae298a6ac3e402b283ab364a6fd793fd04f253ef7c4983234c17bef">+59/-6</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > ✨ **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions (cherry picked from commit f101b1d)
|
Working on it! Note that it can take a few minutes. |
|
@jeffy-mathew Seems like there is conflict and it require manual merge. |
…ndpoint and endpoint post plugin (#6098) ## **User description** <!-- Provide a general summary of your changes in the Title above --> Add functionName to replace name in OAS virtual endpoint and endpoint post plugin <!-- Describe your changes in detail --> ## Related Issue https://tyktech.atlassian.net/browse/TT-11440 https://tyktech.atlassian.net/browse/TT-11461 ## Motivation and Context <!-- Why is this change required? What problem does it solve? --> ## How This Has Been Tested <!-- Please describe in detail how you tested your changes --> <!-- Include details of your testing environment, and the tests --> <!-- you ran to see how your change affects other areas of the code, etc. --> <!-- This information is helpful for reviewers and QA. --> ## Screenshots (if appropriate) ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply --> <!-- If there are no documentation updates required, mark the item as checked. --> <!-- Raise up any additional concerns not covered by the checklist. --> - [ ] I ensured that the documentation is up to date - [ ] I explained why this PR updates go.mod in detail with reasoning why it's required - [ ] I would like a code coverage CI quality gate exception and have explained why ___ ## **Type** enhancement ___ ## **Description** - Deprecated `Name` field in favor of `FunctionName` for both `VirtualEndpoint` and `EndpointPostPlugin` configurations to clarify the purpose and usage. - Ensured backward compatibility by retaining the `Name` field but marking it as deprecated. - Updated related methods (`Fill` and `ExtractTo`) to prioritize `FunctionName` over `Name` when both are provided. - Modified and added unit tests to reflect changes and validate the precedence of `FunctionName` over `Name`. ___ ## **Changes walkthrough** <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>middleware.go</strong><dd><code>Deprecate Name in Favor of FunctionName for Plugin Configurations</code></dd></summary> <hr> apidef/oas/middleware.go <li>Deprecated <code>Name</code> in favor of <code>FunctionName</code> for both <code>VirtualEndpoint</code> and <br><code>EndpointPostPlugin</code>.<br> <li> Added handling to prefer <code>FunctionName</code> over <code>Name</code> if both are provided.<br> <li> Updated <code>Fill</code> and <code>ExtractTo</code> methods to support the new <code>FunctionName</code> <br>field. </details> </td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6098/files#diff-992ec7c28d25fd54f6491d295389757705cd114bc869a35cba50d42e548cdc6e">+26/-9</a> </td> </tr> </table></td></tr><tr><td><strong>Tests</strong></td><td><table> <tr> <td> <details> <summary><strong>middleware_test.go</strong><dd><code>Update Tests for FunctionName Precedence and Usage</code> </dd></summary> <hr> apidef/oas/middleware_test.go <li>Updated tests to use <code>FunctionName</code> instead of <code>Name</code>.<br> <li> Added tests to ensure <code>FunctionName</code> has precedence over <code>Name</code>. </details> </td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6098/files#diff-0af31cb29ae298a6ac3e402b283ab364a6fd793fd04f253ef7c4983234c17bef">+59/-6</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > ✨ **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions (cherry picked from commit f101b1d)
…lace name in OAS virtual endpoint and endpoint post plugin (#6098) [TT-11440/TT-11461] Add functionName to replace name in OAS virtual endpoint and endpoint post plugin (#6098) ## **User description** <!-- Provide a general summary of your changes in the Title above --> Add functionName to replace name in OAS virtual endpoint and endpoint post plugin <!-- Describe your changes in detail --> ## Related Issue https://tyktech.atlassian.net/browse/TT-11440 https://tyktech.atlassian.net/browse/TT-11461 ## Motivation and Context <!-- Why is this change required? What problem does it solve? --> ## How This Has Been Tested <!-- Please describe in detail how you tested your changes --> <!-- Include details of your testing environment, and the tests --> <!-- you ran to see how your change affects other areas of the code, etc. --> <!-- This information is helpful for reviewers and QA. --> ## Screenshots (if appropriate) ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply --> <!-- If there are no documentation updates required, mark the item as checked. --> <!-- Raise up any additional concerns not covered by the checklist. --> - [ ] I ensured that the documentation is up to date - [ ] I explained why this PR updates go.mod in detail with reasoning why it's required - [ ] I would like a code coverage CI quality gate exception and have explained why ___ ## **Type** enhancement ___ ## **Description** - Deprecated `Name` field in favor of `FunctionName` for both `VirtualEndpoint` and `EndpointPostPlugin` configurations to clarify the purpose and usage. - Ensured backward compatibility by retaining the `Name` field but marking it as deprecated. - Updated related methods (`Fill` and `ExtractTo`) to prioritize `FunctionName` over `Name` when both are provided. - Modified and added unit tests to reflect changes and validate the precedence of `FunctionName` over `Name`. ___ ## **Changes walkthrough** <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>middleware.go</strong><dd><code>Deprecate Name in Favor of FunctionName for Plugin Configurations</code></dd></summary> <hr> apidef/oas/middleware.go <li>Deprecated <code>Name</code> in favor of <code>FunctionName</code> for both <code>VirtualEndpoint</code> and <br><code>EndpointPostPlugin</code>.<br> <li> Added handling to prefer <code>FunctionName</code> over <code>Name</code> if both are provided.<br> <li> Updated <code>Fill</code> and <code>ExtractTo</code> methods to support the new <code>FunctionName</code> <br>field. </details> </td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6098/files#diff-992ec7c28d25fd54f6491d295389757705cd114bc869a35cba50d42e548cdc6e">+26/-9</a> </td> </tr> </table></td></tr><tr><td><strong>Tests</strong></td><td><table> <tr> <td> <details> <summary><strong>middleware_test.go</strong><dd><code>Update Tests for FunctionName Precedence and Usage</code> </dd></summary> <hr> apidef/oas/middleware_test.go <li>Updated tests to use <code>FunctionName</code> instead of <code>Name</code>.<br> <li> Added tests to ensure <code>FunctionName</code> has precedence over <code>Name</code>. </details> </td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6098/files#diff-0af31cb29ae298a6ac3e402b283ab364a6fd793fd04f253ef7c4983234c17bef">+59/-6</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > ✨ **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions
|
@jeffy-mathew Succesfully merged PR |
…ce name in OAS virtual endpoint and endpoint post plugin (#6098) (#6113) ## **User description** [TT-11440/TT-11461] Add functionName to replace name in OAS virtual endpoint and endpoint post plugin (#6098) ## **User description** <!-- Provide a general summary of your changes in the Title above --> Add functionName to replace name in OAS virtual endpoint and endpoint post plugin <!-- Describe your changes in detail --> ## Related Issue https://tyktech.atlassian.net/browse/TT-11440 https://tyktech.atlassian.net/browse/TT-11461 ## Motivation and Context <!-- Why is this change required? What problem does it solve? --> ## How This Has Been Tested <!-- Please describe in detail how you tested your changes --> <!-- Include details of your testing environment, and the tests --> <!-- you ran to see how your change affects other areas of the code, etc. --> <!-- This information is helpful for reviewers and QA. --> ## Screenshots (if appropriate) ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply --> <!-- If there are no documentation updates required, mark the item as checked. --> <!-- Raise up any additional concerns not covered by the checklist. --> - [ ] I ensured that the documentation is up to date - [ ] I explained why this PR updates go.mod in detail with reasoning why it's required - [ ] I would like a code coverage CI quality gate exception and have explained why ___ ## **Type** enhancement ___ ## **Description** - Deprecated `Name` field in favor of `FunctionName` for both `VirtualEndpoint` and `EndpointPostPlugin` configurations to clarify the purpose and usage. - Ensured backward compatibility by retaining the `Name` field but marking it as deprecated. - Updated related methods (`Fill` and `ExtractTo`) to prioritize `FunctionName` over `Name` when both are provided. - Modified and added unit tests to reflect changes and validate the precedence of `FunctionName` over `Name`. ___ ## **Changes walkthrough** <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>middleware.go</strong><dd><code>Deprecate Name in Favor of FunctionName for Plugin Configurations</code></dd></summary> <hr> apidef/oas/middleware.go <li>Deprecated <code>Name</code> in favor of <code>FunctionName</code> for both <code>VirtualEndpoint</code> and <br><code>EndpointPostPlugin</code>.<br> <li> Added handling to prefer <code>FunctionName</code> over <code>Name</code> if both are provided.<br> <li> Updated <code>Fill</code> and <code>ExtractTo</code> methods to support the new <code>FunctionName</code> <br>field. </details> </td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6098/files#diff-992ec7c28d25fd54f6491d295389757705cd114bc869a35cba50d42e548cdc6e">+26/-9</a> </td> </tr> </table></td></tr><tr><td><strong>Tests</strong></td><td><table> <tr> <td> <details> <summary><strong>middleware_test.go</strong><dd><code>Update Tests for FunctionName Precedence and Usage</code> </dd></summary> <hr> apidef/oas/middleware_test.go <li>Updated tests to use <code>FunctionName</code> instead of <code>Name</code>.<br> <li> Added tests to ensure <code>FunctionName</code> has precedence over <code>Name</code>. </details> </td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6098/files#diff-0af31cb29ae298a6ac3e402b283ab364a6fd793fd04f253ef7c4983234c17bef">+59/-6</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > ✨ **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions ___ ## **Type** enhancement ___ ## **Description** - Deprecated `Name` field in `VirtualEndpoint` and `EndpointPostPlugin`, replaced with `FunctionName` to better reflect its purpose. - Added custom JSON marshaling to handle the transition from `Name` to `FunctionName`, ensuring backward compatibility. - Updated tests and JSON schema to align with the changes introduced for `FunctionName`. ___ ## **Changes walkthrough** <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>middleware.go</strong><dd><code>Deprecate Name Field in Favor of FunctionName for VirtualEndpoint and </code><br><code>EndpointPostPlugin</code></dd></summary> <hr> apidef/oas/middleware.go <li>Added JSON marshaling logic for <code>VirtualEndpoint</code> and <code>EndpointPostPlugin</code> <br>to handle deprecated <code>Name</code> field and prioritize <code>FunctionName</code>.<br> <li> Deprecated <code>Name</code> field in <code>VirtualEndpoint</code> and <code>EndpointPostPlugin</code>, <br>replaced with <code>FunctionName</code>.<br> <li> Updated <code>Fill</code> and <code>ExtractTo</code> methods to support the new <code>FunctionName</code> <br>field. </details> </td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6113/files#diff-992ec7c28d25fd54f6491d295389757705cd114bc869a35cba50d42e548cdc6e">+68/-9</a> </td> </tr> <tr> <td> <details> <summary><strong>x-tyk-api-gateway.json</strong><dd><code>Update JSON Schema to Reflect FunctionName Changes</code> </dd></summary> <hr> apidef/oas/schema/x-tyk-api-gateway.json <li>Updated JSON schema to include <code>functionName</code> and mark it as required <br>for <code>VirtualEndpoint</code> and <code>EndpointPostPlugin</code>.<br> <li> Deprecated <code>name</code> field in JSON schema for <code>VirtualEndpoint</code> and <br><code>EndpointPostPlugin</code>. </details> </td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6113/files#diff-78828969c0c04cc1a776dfc93a8bad3c499a8c83e6169f83e96d090bed3e7dd0">+8/-2</a> </td> </tr> </table></td></tr><tr><td><strong>Tests</strong></td><td><table> <tr> <td> <details> <summary><strong>middleware_test.go</strong><dd><code>Update Tests for VirtualEndpoint and EndpointPostPlugin to Reflect </code><br><code>FunctionName Changes</code></dd></summary> <hr> apidef/oas/middleware_test.go <li>Updated tests to use <code>FunctionName</code> instead of <code>Name</code>.<br> <li> Added tests to ensure <code>FunctionName</code> has precedence over <code>Name</code>.<br> <li> Added JSON marshaling tests to verify <code>functionName</code> is included and <br><code>name</code> is excluded. </details> </td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6113/files#diff-0af31cb29ae298a6ac3e402b283ab364a6fd793fd04f253ef7c4983234c17bef">+82/-6</a> </td> </tr> <tr> <td> <details> <summary><strong>operation_test.go</strong><dd><code>Update Operation Tests to Ignore Deprecated Name Field</code> </dd></summary> <hr> apidef/oas/operation_test.go <li>Updated tests to ignore deprecated <code>Name</code> field in <code>VirtualEndpoint</code> and <br><code>EndpointPostPlugin</code>. </details> </td> <td><a href="https://github.com/TykTechnologies/tyk/pull/6113/files#diff-cd234db716d6d2edc97c135ef546021c9ab4fa9282d63964bd155d41635cf964">+2/-0</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > ✨ **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions Co-authored-by: Jeffy Mathew <[email protected]>
|
API tests result - postgres15-murmur64 env: success ✅ User descriptionAdd functionName to replace name in OAS virtual endpoint and endpoint Related Issuehttps://tyktech.atlassian.net/browse/TT-11440 Motivation and ContextHow This Has Been TestedScreenshots (if appropriate)Types of changes
Checklist
Typeenhancement Description
Changes walkthrough
|
|
API tests result - mongo44-murmur64 env: success ✅ User descriptionAdd functionName to replace name in OAS virtual endpoint and endpoint Related Issuehttps://tyktech.atlassian.net/browse/TT-11440 Motivation and ContextHow This Has Been TestedScreenshots (if appropriate)Types of changes
Checklist
Typeenhancement Description
Changes walkthrough
|
|
API tests result - postgres15-murmur64 env: success ✅ User descriptionAdd functionName to replace name in OAS virtual endpoint and endpoint Related Issuehttps://tyktech.atlassian.net/browse/TT-11440 Motivation and ContextHow This Has Been TestedScreenshots (if appropriate)Types of changes
Checklist
Typeenhancement Description
Changes walkthrough
|



User description
Add functionName to replace name in OAS virtual endpoint and endpoint post plugin
Related Issue
https://tyktech.atlassian.net/browse/TT-11440
https://tyktech.atlassian.net/browse/TT-11461
Motivation and Context
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
Checklist
Type
enhancement
Description
Namefield in favor ofFunctionNamefor bothVirtualEndpointandEndpointPostPluginconfigurations to clarify the purpose and usage.Namefield but marking it as deprecated.FillandExtractTo) to prioritizeFunctionNameoverNamewhen both are provided.FunctionNameoverName.Changes walkthrough
middleware.go
Deprecate Name in Favor of FunctionName for Plugin Configurationsapidef/oas/middleware.go
Namein favor ofFunctionNamefor bothVirtualEndpointandEndpointPostPlugin.FunctionNameoverNameif both are provided.FillandExtractTomethods to support the newFunctionNamefield.
middleware_test.go
Update Tests for FunctionName Precedence and Usageapidef/oas/middleware_test.go
FunctionNameinstead ofName.FunctionNamehas precedence overName.