Skip to content

[TT-15100][TT-15091] adjusted swagger enum and tyk vendor extension schema name#7535

Merged
lghiur merged 1 commit intomasterfrom
TT-15100-TT-gateway-swagger-fixes
Nov 13, 2025
Merged

[TT-15100][TT-15091] adjusted swagger enum and tyk vendor extension schema name#7535
lghiur merged 1 commit intomasterfrom
TT-15100-TT-gateway-swagger-fixes

Conversation

@lghiur
Copy link
Copy Markdown
Collaborator

@lghiur lghiur commented Nov 12, 2025

  • Schema XTykApiGateway is renamed to TykVendorExtension in the schemas section
  • All $ref references to XTykApiGateway are updated to reference TykVendorExtension
  • BooleanQueryParam schema has enum removed while preserving type: boolean
  • All inline boolean parameter enums are removed from the specification

Ticket Details

TT-15100
Status Ready for Dev
Summary Tyk Dashboard Swagger YAML Schema Discrepancy

Generated at: 2025-11-12 09:34:58

@github-actions
Copy link
Copy Markdown
Contributor

Swagger Changes










  
  
  
  
  
  
  
  
  
  
     _        __  __
    TykVendorExtension:
    enum:
    enum:
    enum:
    enum:
    enum:
    enum:
    enum:
   _| |_   _ / _|/ _|  between swagger-prev.yml
  + one list entry added:
  + one list entry added:
  + one list entry added:
  + one list entry added:
  + one list entry added:
  + one map entry added:
  - one list entry removed:
  - one list entry removed:
  - one list entry removed:
  - one list entry removed:
  - one list entry removed:
  - one map entry removed:
  - one map entry removed:
  - one map entry removed:
  - one map entry removed:
  - one map entry removed:
  - one map entry removed:
  - one map entry removed:
 / _' | | | | |_| |_       and swagger-current.yml
 \__,_|\__, |_| |_|   returned 13 differences
components.schemas
components.schemas.BooleanQueryParam
components.schemas.TraceRequest.properties.oas.oneOf
paths./tyk/apis/oas.get.responses.200.content.application/json.schema.items.allOf
paths./tyk/apis/oas.post.requestBody.content.application/json.schema.allOf
paths./tyk/apis/oas/{apiID}.get.responses.200.content.application/json.schema.allOf
paths./tyk/apis/oas/{apiID}.put.requestBody.content.application/json.schema.allOf
paths./tyk/keys.post.parameters.hashed.schema
paths./tyk/keys/{keyID}.delete.parameters.hashed.schema
paths./tyk/keys/{keyID}.get.parameters.hashed.schema
paths./tyk/keys/{keyID}.post.parameters.hashed.schema
paths./tyk/keys/{keyID}.put.parameters.hashed.schema
paths./tyk/reload.get.parameters.block.schema
| (_| | |_| |  _|  _|

@github-actions
Copy link
Copy Markdown
Contributor

API Changes

no api changes detected

@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Nov 12, 2025

🔍 Code Analysis Results

This pull request refactors and cleans up the gateway's OpenAPI specification in swagger.yml.

Files Changed Analysis

  • swagger.yml: Modified (10 additions, 26 deletions).
    • The changes are focused on restructuring a schema definition and removing redundant enum declarations for boolean parameters.

Architecture & Impact Assessment

What this PR accomplishes:
This PR improves the correctness and consistency of the OpenAPI (Swagger) specification. It addresses two main issues:

  1. It refactors the custom Tyk vendor extension schema for better clarity and structure.
  2. It removes invalid enum definitions from boolean parameters, which can cause issues with OpenAPI validation and client generation tools.

Key technical changes introduced:

  1. Schema Refactoring: The XTykAPIGateway schema is now wrapped within a new TykVendorExtension schema. This properly associates the Tyk-specific configurations under the x-tyk-api-gateway vendor extension property.
  2. Boolean Enum Removal: The enum: [true, false] has been removed from all boolean parameters and the BooleanQueryParam schema. The type: boolean declaration is sufficient and the enum was redundant and potentially problematic for some tools.

Affected system components:

  • API Specification (swagger.yml): This is the only component directly modified.
  • External Tooling: The changes will affect any external system that consumes the swagger.yml file. This includes:
    • API documentation generators (e.g., Swagger UI, Redocly).
    • API client code generators.
    • Contract testing and validation tools.
  • Gateway Runtime: There is no impact on the gateway's runtime behavior, as this is a change to the API's metadata, not its implementation.

Schema Change Visualization:

The PR changes how the Tyk vendor extension is structured within the OpenAPI specification.

graph TD
    subgraph Before
        A["#/components/schemas/XTykAPIGateway"] -- "Referenced directly" --> B(Tyk-specific config)
    end
    subgraph After
        C["#/components/schemas/TykVendorExtension"] -- "Contains" --> D("x-tyk-api-gateway property")
        D -- "References" --> A
    end
Loading

Scope Discovery & Context Expansion

The scope of this PR is limited to the OpenAPI specification file. However, the impact extends to any process or team that relies on this specification. The bin/ci-swagger.sh script indicates that swagger.yml is a manually edited file that is also partially updated by code generation, making manual corrections like this necessary.

This change will require consumers of the API specification to update their tooling to reference the new TykVendorExtension schema instead of the old XTykAPIGateway schema where applicable. The removal of boolean enums should improve compatibility with a wider range of standard OpenAPI tools without requiring downstream changes.

Metadata
  • Review Effort: 2 / 5
  • Primary Label: enhancement

Powered by Visor from Probelabs

Last updated: 2025-11-12T09:38:06.966Z | Triggered by: opened | Commit: 2ebb37b

💡 TIP: You can chat with Visor using /visor ask <your question>

@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Nov 12, 2025

🔍 Code Analysis Results

✅ Security Check Passed

No security issues found – changes LGTM.

✅ Architecture Check Passed

No architecture issues found – changes LGTM.

✅ Performance Check Passed

No performance issues found – changes LGTM.

✅ Quality Check Passed

No quality issues found – changes LGTM.

✅ Dependency Check Passed

No dependency issues found – changes LGTM.

✅ Connectivity Check Passed

No connectivity issues found – changes LGTM.


Powered by Visor from Probelabs

Last updated: 2025-11-12T09:38:07.971Z | Triggered by: opened | Commit: 2ebb37b

💡 TIP: You can chat with Visor using /visor ask <your question>

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@andyo-tyk andyo-tyk left a comment

Choose a reason for hiding this comment

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

Approved on Stand Up

@lghiur lghiur merged commit b091f91 into master Nov 13, 2025
39 of 53 checks passed
@lghiur lghiur deleted the TT-15100-TT-gateway-swagger-fixes branch November 13, 2025 12:18
@lghiur
Copy link
Copy Markdown
Collaborator Author

lghiur commented Nov 13, 2025

/release to release-5.8

probelabs Bot pushed a commit that referenced this pull request Nov 13, 2025
…chema name (#7535)

- Schema XTykApiGateway is renamed to TykVendorExtension in the schemas
section
- All $ref references to XTykApiGateway are updated to reference
TykVendorExtension
- BooleanQueryParam schema has enum removed while preserving type:
boolean
- All inline boolean parameter enums are removed from the specification
<!---TykTechnologies/jira-linter starts here-->

### Ticket Details

<details>
<summary>
<a href="https://tyktech.atlassian.net/browse/TT-15100" title="TT-15100"
target="_blank">TT-15100</a>
</summary>

|         |    |
|---------|----|
| Status  | Ready for Dev |
| Summary | Tyk Dashboard Swagger YAML Schema Discrepancy |

Generated at: 2025-11-12 09:34:58

</details>

<!---TykTechnologies/jira-linter ends here-->

(cherry picked from commit b091f91)
@probelabs
Copy link
Copy Markdown
Contributor

probelabs Bot commented Nov 13, 2025

✅ Cherry-pick successful. A PR was created: #7537

lghiur added a commit that referenced this pull request Nov 14, 2025
…d tyk vendor extension schema name (#7535) (#7537)

[TT-15100][TT-15091] adjusted swagger enum and tyk vendor extension
schema name (#7535)

- Schema XTykApiGateway is renamed to TykVendorExtension in the schemas
section
- All $ref references to XTykApiGateway are updated to reference
TykVendorExtension
- BooleanQueryParam schema has enum removed while preserving type:
boolean
- All inline boolean parameter enums are removed from the specification

<!---TykTechnologies/jira-linter starts here-->

### Ticket Details

<details>
<summary>
<a href="https://tyktech.atlassian.net/browse/TT-15100" title="TT-15100"
target="_blank">TT-15100</a>
</summary>

|         |    |
|---------|----|
| Status  | In Code Review |
| Summary | Tyk Dashboard Swagger YAML Schema Discrepancy |

Generated at: 2025-11-13 12:19:58

</details>

<!---TykTechnologies/jira-linter ends here-->


[TT-15100]:
https://tyktech.atlassian.net/browse/TT-15100?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: Laurentiu <6229829+lghiur@users.noreply.github.com>
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