-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TT-13657]: Add protocol and port to oas #6846
Conversation
Knock Knock! 🔍 Just thought I'd let you know that your PR title and story title look quite different. PR titles that closely resemble the story title make it easier for reviewers to understand the context of the PR. An easy-to-understand PR title a day makes the reviewer review away! 😛⚡️
Check out this guide to learn more about PR best-practices. |
API Changes --- prev.txt 2025-01-27 10:17:58.088197873 +0000
+++ current.txt 2025-01-27 10:17:53.220165159 +0000
@@ -3820,6 +3820,14 @@
//
// Tyk classic API definition: `allowed_ips` and `blacklisted_ips`.
IPAccessControl *IPAccessControl `bson:"ipAccessControl,omitempty" json:"ipAccessControl,omitempty"`
+ // Protocol configures the HTTP protocol used by the API.
+ // Possible values are:
+ // - "http": Standard HTTP/1.1 protocol
+ // - "http2": HTTP/2 protocol with TLS
+ // - "h2c": HTTP/2 protocol without TLS (cleartext).
+ Protocol string `bson:"protocol,omitempty" json:"protocol,omitempty"`
+ // Port Setting this value will change the port that Tyk listens on. Default: 8080.
+ Port int `bson:"port,omitempty" json:"port,omitempty"`
}
Server contains the configuration that sets Tyk up to receive requests from
the client applications. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Quality Gate passedIssues Measures |
User description
TT-13657
Description
TT-13657
Related Issue
Motivation and Context
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
Added
protocol
andport
fields to theServer
struct.Updated JSON schema to include
protocol
andport
definitions.Enhanced tests to validate
protocol
andport
functionality.Removed unused fields from migration tests.
Changes walkthrough 📝
linter_test.go
Add default `protocol` value in linter test
apidef/oas/linter_test.go
protocol
field in test settings.oas_test.go
Remove unused fields from migration tests
apidef/oas/oas_test.go
ListenPort
andProtocol
from the list of non-migrated fields.server_test.go
Add tests for `protocol` and `port` in Server
apidef/oas/server_test.go
protocol
andport
functionality.server.go
Add `protocol` and `port` fields to Server struct
apidef/oas/server.go
protocol
andport
fields to theServer
struct.Fill
andExtractTo
methods to handleprotocol
andport
.x-tyk-api-gateway.json
Update JSON schema with `protocol` and `port` definitions
apidef/oas/schema/x-tyk-api-gateway.json
protocol
andport
definitions to the JSON schema.protocol
field.