Skip to content

[TT-11966/TT-12064] update typo in cooldown period#6266

Merged
jeffy-mathew merged 2 commits into
masterfrom
fix/TT-11966/TT-12064/cooldown-period-typo
May 9, 2024
Merged

[TT-11966/TT-12064] update typo in cooldown period#6266
jeffy-mathew merged 2 commits into
masterfrom
fix/TT-11966/TT-12064/cooldown-period-typo

Conversation

@jeffy-mathew

@jeffy-mathew jeffy-mathew commented May 9, 2024

Copy link
Copy Markdown
Contributor

User description

Description

fix typo in coolDownPeriod json tag.
renaming it to cooldownPeriod

Related Issue

Parent task: https://tyktech.atlassian.net/browse/TT-11966
Sub task: https://tyktech.atlassian.net/browse/TT-12064

Motivation and Context

How This Has Been Tested

Screenshots (if appropriate)

Types of changes

  • 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

  • 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

PR Type

Bug fix


Description

  • Updated the field name from coolDownPeriod to cooldownPeriod in both Go struct and JSON schema to maintain consistency and correct a typo.
  • Modified the required fields in the JSON schema to align with the updated field name.

Changes walkthrough 📝

Relevant files
Bug fix
event.go
Update Field Names in WebhookEvent Struct                               

apidef/oas/event.go

  • Changed the JSON and BSON field names from coolDownPeriod to
    cooldownPeriod.
  • +1/-1     
    x-tyk-api-gateway.json
    Update JSON Schema for API Gateway                                             

    apidef/oas/schema/x-tyk-api-gateway.json

  • Updated the field name in JSON schema from coolDownPeriod to
    cooldownPeriod.
  • Adjusted the required fields list to reflect the new field name.
  • +4/-4     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @jeffy-mathew
    jeffy-mathew requested a review from lghiur May 9, 2024 15:55
    @github-actions

    github-actions Bot commented May 9, 2024

    Copy link
    Copy Markdown
    Contributor

    API Changes

    --- prev.txt	2024-05-09 16:12:13.278466911 +0000
    +++ current.txt	2024-05-09 16:12:10.114437897 +0000
    @@ -4513,7 +4513,7 @@
     	// An empty value is interpreted as "0s", implying no cool-down.
     	// It's important to format the string correctly, as invalid formats will
     	// be considered as 0s/empty.
    -	CoolDownPeriod time.ReadableDuration `json:"coolDownPeriod" bson:"coolDownPeriod"`
    +	CoolDownPeriod time.ReadableDuration `json:"cooldownPeriod" bson:"cooldownPeriod"`
     	// BodyTemplate is the template to be used for request payload.
     	BodyTemplate string `json:"bodyTemplate,omitempty" bson:"bodyTemplate,omitempty"`
     	// Headers are the list of request headers to be used.

    @github-actions

    github-actions Bot commented May 9, 2024

    Copy link
    Copy Markdown
    Contributor

    PR Description updated to latest commit (95e6af5)

    @github-actions

    github-actions Bot commented May 9, 2024

    Copy link
    Copy Markdown
    Contributor

    PR Review 🔍

    ⏱️ Estimated effort to review [1-5]

    1, because the PR involves a simple renaming of a field across a few files. The changes are straightforward and limited in scope, making the review process quick and easy.

    🧪 Relevant tests

    No

    ⚡ Possible issues

    No

    🔒 Security concerns

    No

    Code feedback:

    @github-actions

    github-actions Bot commented May 9, 2024

    Copy link
    Copy Markdown
    Contributor

    Failed to generate code suggestions for PR

    @jeffy-mathew
    jeffy-mathew enabled auto-merge (squash) May 9, 2024 15:59
    @jeffy-mathew
    jeffy-mathew disabled auto-merge May 9, 2024 15:59
    @jeffy-mathew
    jeffy-mathew enabled auto-merge (squash) May 9, 2024 15:59
    @github-actions

    github-actions Bot commented May 9, 2024

    Copy link
    Copy Markdown
    Contributor

    💥 CI tests failed 🙈

    git-state

    all ok

    Please look at the run or in the Checks tab.

    @sonarqubecloud

    sonarqubecloud Bot commented May 9, 2024

    Copy link
    Copy Markdown

    Quality Gate Passed Quality Gate passed

    Issues
    0 New issues
    0 Accepted issues

    Measures
    0 Security Hotspots
    No data about Coverage
    0.0% Duplication on New Code

    See analysis details on SonarCloud

    @jeffy-mathew
    jeffy-mathew merged commit 50d4f80 into master May 9, 2024
    @jeffy-mathew
    jeffy-mathew deleted the fix/TT-11966/TT-12064/cooldown-period-typo branch May 9, 2024 16:32
    nerdydread pushed a commit that referenced this pull request Sep 6, 2024
    ### **User description**
    
    ## Description
    
    fix typo in `coolDownPeriod` json tag. 
    renaming it to `cooldownPeriod`
    ## Related Issue
    Parent task: https://tyktech.atlassian.net/browse/TT-11966
    Sub task: https://tyktech.atlassian.net/browse/TT-12064
    
    ## 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
    
    
    ___
    
    ### **PR Type**
    Bug fix
    
    
    ___
    
    ### **Description**
    - Updated the field name from `coolDownPeriod` to `cooldownPeriod` in
    both Go struct and JSON schema to maintain consistency and correct a
    typo.
    - Modified the required fields in the JSON schema to align with the
    updated field name.
    
    
    ___
    
    
    
    ### **Changes walkthrough** 📝
    <table><thead><tr><th></th><th align="left">Relevant
    files</th></tr></thead><tbody><tr><td><strong>Bug
    fix</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>event.go</strong><dd><code>Update Field Names in
    WebhookEvent Struct</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    </dd></summary>
    <hr>
    
    apidef/oas/event.go
    <li>Changed the JSON and BSON field names from
    <code>coolDownPeriod</code> to <br><code>cooldownPeriod</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6266/files#diff-528a9f5b311ff21c0b3a9b273e61398209ca8b51550327e4d437bba81e49d577">+1/-1</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>x-tyk-api-gateway.json</strong><dd><code>Update JSON
    Schema for API Gateway</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    apidef/oas/schema/x-tyk-api-gateway.json
    <li>Updated the field name in JSON schema from
    <code>coolDownPeriod</code> to <br><code>cooldownPeriod</code>.<br> <li>
    Adjusted the required fields list to reflect the new field name.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://github.com/TykTechnologies/tyk/pull/6266/files#diff-78828969c0c04cc1a776dfc93a8bad3c499a8c83e6169f83e96d090bed3e7dd0">+4/-4</a>&nbsp;
    &nbsp; &nbsp; </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
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants