Skip to content
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-11185] release docs 5.3.0 update #6079

Merged
merged 12 commits into from
Feb 28, 2024

Conversation

titpetric
Copy link
Contributor

@titpetric titpetric commented Feb 28, 2024

This PR addresses feedback raised up in DX review.

  • fixes typos
  • removes oxford comma
  • rewords some unclear docs
  • adds docs
  • consistent docs for enabled fields

Focuses on x-tyk-gateway.md docs (apidef/oas).


Type

enhancement, documentation


Description

  • Updated comments across various structs for better clarity and consistency.
  • Changed phrasing from "Enabled enables" to "Enabled activates" to improve readability.
  • Enhanced documentation for authentication modes, middleware configurations, operation structs, security configurations, server configurations, upstream configurations, and URL rewriting.
  • Added detailed examples and explanations where necessary to aid understanding.

Changes walkthrough

Relevant files
Documentation
authentication.go
Improved Authentication Structs Documentation and Clarity

apidef/oas/authentication.go

  • Updated comments for clarity and consistency across authentication
    structs.
  • Changed "Enabled enables" to "Enabled activates" for various
    authentication modes.
  • Improved documentation for HMAC, OIDC, CustomPluginAuthentication, and
    AuthenticationPlugin.
  • +12/-10 
    middleware.go
    Enhanced Middleware Documentation and Consistency               

    apidef/oas/middleware.go

  • Updated comments for clarity and consistency across middleware
    structs.
  • Changed "Enabled enables" to "Enabled activates" for various
    middleware configurations.
  • Added detailed comments for AllowedAlgorithms in HMAC and improved
    documentation for custom plugins.
  • +20/-16 
    operation.go
    Refined Operation Structs Documentation for Better Clarity

    apidef/oas/operation.go

  • Updated comments for clarity and consistency across operation structs.
  • Changed "Enabled enables" to "Enabled activates" for mock response and
    FromOASExamples.
  • Improved documentation for MockResponse and FromOASExamples.
  • +3/-3     
    security.go
    Updated Security Structs Documentation for Enhanced Clarity

    apidef/oas/security.go

  • Updated comments for clarity and consistency across security structs.
  • Changed "Enabled enables" to "Enabled activates" for token, basic
    authentication, and OAuthProvider.
  • Enhanced documentation for JWTValidation and Introspection structs.
  • +18/-11 
    server.go
    Improved Server Configuration Documentation and Consistency

    apidef/oas/server.go

  • Updated comments for clarity and consistency across server
    configuration structs.
  • Changed "Enabled enables" to "Enabled activates" for various server
    configurations.
  • Improved documentation for ListenPath, ClientCertificates, and
    GatewayTags.
  • +9/-9     
    upstream.go
    Enhanced Upstream Configuration Documentation for Better Understanding

    apidef/oas/upstream.go

  • Updated comments for clarity and consistency across upstream
    configuration structs.
  • Changed "Enabled enables" to "Enabled activates" for ServiceDiscovery
    and MutualTLS.
  • Enhanced documentation for RateLimit and ServiceDiscoveryCache.
  • +6/-6     
    url_rewrite.go
    Refined URL Rewrite Documentation with Detailed Examples 

    apidef/oas/url_rewrite.go

  • Updated comments for clarity and consistency in URLRewrite struct.
  • Changed "Enabled enables" to "Enabled activates" for URL rewriting.
  • Added detailed examples and explanations for URLRewriteRule fields.
  • +8/-4     

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

    Copy link
    Contributor

    github-actions bot commented Feb 28, 2024

    API Changes

    --- prev.txt	2024-02-28 11:56:18.381376473 +0000
    +++ current.txt	2024-02-28 11:56:15.345381762 +0000
    @@ -2360,8 +2360,8 @@
         RetainOldServerURL can be used when API def is patched.
     
     func ShouldOmit(i interface{}) bool
    -    ShouldOmit checks whether a field should be set to empty and omitted from
    -    OAS JSON.
    +    ShouldOmit checks if a field should be set to empty and omitted from OAS
    +    JSON.
     
     func ValidateOASObject(documentBody []byte, oasVersion string) error
         ValidateOASObject validates an OAS document against a particular OAS
    @@ -2403,7 +2403,7 @@
         AllowanceType holds the valid allowance types values.
     
     type AuthSource struct {
    -	// Enabled enables the auth source.
    +	// Enabled activates the auth source.
     	// Tyk classic API definition: `auth_configs[X].use_param/use_cookie`
     	Enabled bool `bson:"enabled" json:"enabled"` // required
     	// Name is the name of the auth source.
    @@ -2503,11 +2503,11 @@
         Fill fills *Authentication from apidef.APIDefinition.
     
     type AuthenticationPlugin struct {
    -	// Enabled enables custom authentication plugin.
    +	// Enabled activates custom authentication plugin.
     	Enabled bool `bson:"enabled" json:"enabled"` // required.
     	// FunctionName is the name of authentication method.
     	FunctionName string `bson:"functionName" json:"functionName"` // required.
    -	// Path is the path to shared object file in case of gopluign mode or path to js code in case of otto auth plugin.
    +	// Path is the path to shared object file in case of goplugin mode or path to JS code in case of otto auth plugin.
     	Path string `bson:"path" json:"path"`
     	// RawBodyOnly if set to true, do not fill body in request or response object.
     	RawBodyOnly bool `bson:"rawBodyOnly,omitempty" json:"rawBodyOnly,omitempty"`
    @@ -2522,7 +2522,7 @@
     func (ap *AuthenticationPlugin) Fill(api apidef.APIDefinition)
     
     type Basic struct {
    -	// Enabled enables the basic authentication mode.
    +	// Enabled activates the basic authentication mode.
     	// Tyk classic API definition: `use_basic_auth`
     	Enabled     bool `bson:"enabled" json:"enabled"` // required
     	AuthSources `bson:",inline" json:",inline"`
    @@ -2552,7 +2552,7 @@
     	// Tyk classic API definition: `CORS.max_age`.
     	MaxAge int `bson:"maxAge,omitempty" json:"maxAge,omitempty"`
     
    -	// AllowCredentials indicates whether the request can include user credentials like cookies,
    +	// AllowCredentials indicates if the request can include user credentials like cookies,
     	// HTTP authentication or client side SSL certificates.
     	//
     	// Tyk classic API definition: `CORS.allow_credentials`.
    @@ -2691,7 +2691,7 @@
         Fill fills *CertificatePinning from apidef.APIDefinition.
     
     type CircuitBreaker struct {
    -	// Enabled enables the Circuit Breaker functionality.
    +	// Enabled activates the Circuit Breaker functionality.
     	// Tyk classic API definition: `version_data.versions..extended_paths.circuit_breakers[*].disabled`.
     	Enabled bool `bson:"enabled" json:"enabled"`
     	// Threshold is the proportion from each `sampleSize` requests that must fail for the breaker to be tripped. This must be a value between 0.0 and 1.0. If `sampleSize` is 100 then a threshold of 0.4 means that the breaker will be tripped if 40 out of every 100 requests fails.
    @@ -2718,7 +2718,7 @@
         Fill fills *CircuitBreaker from apidef.CircuitBreakerMeta.
     
     type ClientCertificates struct {
    -	// Enabled enables static mTLS for the API.
    +	// Enabled activates static mTLS for the API.
     	Enabled bool `bson:"enabled" json:"enabled"`
     	// Allowlist is the list of client certificates which are allowed.
     	Allowlist []string `bson:"allowlist" json:"allowlist"`
    @@ -2742,11 +2742,11 @@
         ClientToPolicy contains a 1-1 mapping between Client ID and Policy ID.
     
     type CustomPlugin struct {
    -	// Enabled enables the custom pre plugin.
    +	// Enabled activates the custom pre plugin.
     	Enabled bool `bson:"enabled" json:"enabled"` // required.
     	// FunctionName is the name of authentication method.
     	FunctionName string `bson:"functionName" json:"functionName"` // required.
    -	// Path is the path to shared object file in case of gopluign mode or path to js code in case of otto auth plugin.
    +	// Path is the path to shared object file in case of goplugin mode or path to JS code in case of otto auth plugin.
     	Path string `bson:"path" json:"path"`
     	// RawBodyOnly if set to true, do not fill body in request or response object.
     	RawBodyOnly bool `bson:"rawBodyOnly,omitempty" json:"rawBodyOnly,omitempty"`
    @@ -2757,7 +2757,7 @@
         CustomPlugin configures custom plugin.
     
     type CustomPluginAuthentication struct {
    -	// Enabled enables the CustomPluginAuthentication authentication mode.
    +	// Enabled activates the CustomPluginAuthentication authentication mode.
     	//
     	// Tyk classic API definition: `enable_coprocess_auth`/`use_go_plugin_auth`.
     	Enabled bool `bson:"enabled" json:"enabled"` // required
    @@ -2779,7 +2779,7 @@
         Fill fills *CustomPluginAuthentication from apidef.AuthConfig.
     
     type CustomPlugins []CustomPlugin
    -    CustomPlugins is a list of CustomPlugin.
    +    CustomPlugins is a list of CustomPlugin objects.
     
     func (c CustomPlugins) ExtractTo(mwDefs []apidef.MiddlewareDefinition)
         ExtractTo extracts CustomPlugins into supplied Middleware definitions.
    @@ -2788,7 +2788,7 @@
         Fill fills CustomPlugins from supplied Middleware definitions.
     
     type DetailedActivityLogs struct {
    -	// Enabled enables/disables detailed activity logs.
    +	// Enabled activates detailed activity logs.
     	//
     	// Tyk classic API definition: `enable_detailed_recording`
     	Enabled bool `bson:"enabled" json:"enabled"`
    @@ -2803,7 +2803,7 @@
         Fill fills *DetailedActivityLogs from apidef.APIDefinition.
     
     type DetailedTracing struct {
    -	// Enabled enables detailed tracing.
    +	// Enabled activates detailed tracing.
     	Enabled bool `bson:"enabled" json:"enabled"`
     }
         DetailedTracing holds the configuration of the detailed tracing.
    @@ -2820,7 +2820,7 @@
     	// Name is the name of the domain.
     	Name string `bson:"name" json:"name"`
     	// Certificates defines a field for specifying certificate IDs or file paths
    -	// that the Gateway can utilize to dynamically load certificates for your custom domain.
    +	// that the Gateway can utilise to dynamically load certificates for your custom domain.
     	//
     	// Tyk classic API definition: `certificates`
     	Certificates []string `bson:"certificates,omitempty" json:"certificates,omitempty"`
    @@ -2845,7 +2845,7 @@
         certificate.
     
     type EndpointPostPlugin struct {
    -	// Enabled enables post plugin.
    +	// 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.
    @@ -2884,7 +2884,7 @@
     }
     
     type ExtractCredentialsFromBody struct {
    -	// Enabled enables extracting credentials from body.
    +	// Enabled activates extracting credentials from body.
     	// Tyk classic API definition: `basic_auth.extract_from_body`
     	Enabled bool `bson:"enabled" json:"enabled"` // required
     	// UserRegexp is the regex for username e.g. `<User>(.*)</User>`.
    @@ -2905,7 +2905,7 @@
         Fill fills *ExtractCredentialsFromBody from apidef.APIDefinition.
     
     type FromOASExamples struct {
    -	// Enabled enables getting a mock response from OAS examples or schemas documented in OAS.
    +	// Enabled activates getting a mock response from OAS examples or schemas documented in OAS.
     	Enabled bool `bson:"enabled" json:"enabled"`
     	// Code is the default HTTP response code that the gateway reads from the path responses documented in OAS.
     	Code int `bson:"code,omitempty" json:"code,omitempty"`
    @@ -2914,11 +2914,11 @@
     	// ExampleName is the default example name among multiple path response examples documented in OAS.
     	ExampleName string `bson:"exampleName,omitempty" json:"exampleName,omitempty"`
     }
    -    FromOASExamples configures mock responses should be returned from OAS
    +    FromOASExamples configures mock responses that should be returned from OAS
         example responses.
     
     type GatewayTags struct {
    -	// Enabled enables use of segment tags.
    +	// Enabled activates use of segment tags.
     	Enabled bool `bson:"enabled" json:"enabled"`
     	// Tags is a list of segment tags
     	Tags []string `bson:"tags" json:"tags"`
    @@ -2977,21 +2977,23 @@
         Fill fills *Global from apidef.APIDefinition.
     
     type HMAC struct {
    -	// Enabled enables the HMAC authentication mode.
    +	// Enabled activates the HMAC authentication mode.
     	// Tyk classic API definition: `enable_signature_checking`
     	Enabled bool `bson:"enabled" json:"enabled"` // required
     
     	// AuthSources contains authentication token source configuration (header, cookie, query).
     	AuthSources `bson:",inline" json:",inline"`
     
    -	// AllowedAlgorithms is the array of HMAC algorithms which are allowed. Tyk supports the following HMAC algorithms:
    +	// AllowedAlgorithms is the array of HMAC algorithms which are allowed.
    +	//
    +	// Tyk supports the following HMAC algorithms:
     	//
     	// - `hmac-sha1`
     	// - `hmac-sha256`
     	// - `hmac-sha384`
     	// - `hmac-sha512`
     	//
    -	// and reads the value from algorithm header.
    +	// and reads the value from the algorithm header.
     	//
     	// Tyk classic API definition: `hmac_allowed_algorithms`
     	AllowedAlgorithms []string `bson:"allowedAlgorithms,omitempty" json:"allowedAlgorithms,omitempty"`
    @@ -3018,7 +3020,7 @@
         Header holds a header name and value pair.
     
     type IDExtractor struct {
    -	// Enabled enables ID extractor with coprocess authentication.
    +	// Enabled activates ID extractor with coprocess authentication.
     	Enabled bool `bson:"enabled" json:"enabled"` // required
     	// Source is the source from which ID to be extracted from.
     	Source apidef.IdExtractorSource `bson:"source" json:"source"` // required
    @@ -3099,13 +3101,13 @@
         Fill fills *Internal receiver with data from apidef.InternalMeta.
     
     type Introspection struct {
    -	// Enabled enables OAuth access token validation by introspection to a third party.
    +	// Enabled activates OAuth access token validation by introspection to a third party.
     	Enabled bool `bson:"enabled" json:"enabled"`
     	// URL is the URL of the third party provider's introspection endpoint.
     	URL string `bson:"url" json:"url"`
     	// ClientID is the public identifier for the client, acquired from the third party.
     	ClientID string `bson:"clientId" json:"clientId"`
    -	// ClientSecret is a secret known only to the client and the authorization server, acquired from the third party.
    +	// ClientSecret is a secret known only to the client and the authorisation server, acquired from the third party.
     	ClientSecret string `bson:"clientSecret" json:"clientSecret"`
     	// IdentityBaseField is the key showing where to find the user id in the claims. If it is empty, the `sub` key is looked at.
     	IdentityBaseField string `bson:"identityBaseField,omitempty" json:"identityBaseField,omitempty"`
    @@ -3118,7 +3120,7 @@
     func (i *Introspection) Fill(intros apidef.Introspection)
     
     type IntrospectionCache struct {
    -	// Enabled enables the caching mechanism for introspection responses.
    +	// Enabled activates the caching mechanism for introspection responses.
     	Enabled bool `bson:"enabled" json:"enabled"`
     	// Timeout is the duration in seconds of how long the cached value stays.
     	// For introspection caching, it is suggested to use a short interval.
    @@ -3154,22 +3156,29 @@
         Import populates *JWT based on arguments.
     
     type JWTValidation struct {
    -	// Enabled enables OAuth access token validation by introspection to a third party.
    +	// Enabled activates OAuth access token validation by introspection to a third party.
     	Enabled bool `bson:"enabled" json:"enabled"`
    +
     	// SigningMethod to verify signing method used in jwt - allowed values HMAC/RSA/ECDSA.
     	SigningMethod string `bson:"signingMethod" json:"signingMethod"`
    -	// Source is the secret to verify signature, it could be one among:
    +
    +	// Source is the secret to verify signature. Valid values are:
    +	//
     	// - a base64 encoded static secret,
     	// - a valid JWK URL in plain text,
     	// - a valid JWK URL in base64 encoded format.
     	Source string `bson:"source" json:"source"`
    +
     	// IdentityBaseField is the identity claim name.
     	IdentityBaseField string `bson:"identityBaseField,omitempty" json:"identityBaseField,omitempty"`
    -	// IssuedAtValidationSkew is the clock skew to be considered while validating iat claim.
    +
    +	// IssuedAtValidationSkew is the clock skew to be considered while validating the iat claim.
     	IssuedAtValidationSkew uint64 `bson:"issuedAtValidationSkew,omitempty" json:"issuedAtValidationSkew,omitempty"`
    -	// NotBeforeValidationSkew is the clock skew to be considered while validating nbf claim.
    +
    +	// NotBeforeValidationSkew is the clock skew to be considered while validating the nbf claim.
     	NotBeforeValidationSkew uint64 `bson:"notBeforeValidationSkew,omitempty" json:"notBeforeValidationSkew,omitempty"`
    -	// ExpiresAtValidationSkew is the clock skew to be considered while validating exp claim.
    +
    +	// ExpiresAtValidationSkew is the clock skew to be considered while validating the exp claim.
     	ExpiresAtValidationSkew uint64 `bson:"expiresAtValidationSkew,omitempty" json:"expiresAtValidationSkew,omitempty"`
     }
     
    @@ -3182,9 +3191,9 @@
     	// Tyk classic API definition: `proxy.listen_path`
     	Value string `bson:"value" json:"value"` // required
     
    -	// Strip removes the inbound listen path (as accessed by the client) when generating the outgoing request (to the upstream service).
    +	// Strip removes the inbound listen path (as accessed by the client) when generating the outbound request for the upstream service.
     	//
    -	// For example, a scenario where the Tyk base address is `http://acme.com/', the listen path is `example/` and the upstream URL is `http://httpbin.org/`:
    +	// For example, consider the scenario where the Tyk base address is `http://acme.com/', the listen path is `example/` and the upstream URL is `http://httpbin.org/`:
     	//
     	// - If the client application sends a request to `http://acme.com/example/get` then the request will be proxied to `http://httpbin.org/example/get`
     	// - If stripListenPath is set to `true`, the `example` listen path is removed and the request would be proxied to `http://httpbin.org/get`.
    @@ -3194,7 +3203,7 @@
     }
         ListenPath is the base path on Tyk to which requests for this API should be
         sent. Tyk listens out for any requests coming into the host at this path, on
    -    the port that Tyk is configured to run on, and processes these accordingly.
    +    the port that Tyk is configured to run on and processes these accordingly.
     
     func (lp *ListenPath) ExtractTo(api *apidef.APIDefinition)
         ExtractTo extracts *ListenPath into *apidef.APIDefinition.
    @@ -3218,7 +3227,7 @@
         Fill fills *Middleware from apidef.APIDefinition.
     
     type MockResponse struct {
    -	// Enabled enables the mock response middleware.
    +	// Enabled activates the mock response middleware.
     	Enabled bool `bson:"enabled" json:"enabled"`
     	// Code is the HTTP response code that will be returned.
     	Code int `bson:"code,omitempty" json:"code,omitempty"`
    @@ -3235,7 +3244,7 @@
         Import populates *MockResponse with enabled argument for FromOASExamples.
     
     type MutualTLS struct {
    -	// Enabled enables/disables upstream mutual TLS for the API.
    +	// Enabled activates upstream mutual TLS for the API.
     	// Tyk classic API definition: `upstream_certificates_disabled`
     	Enabled bool `bson:"enabled" json:"enabled"`
     
    @@ -3243,8 +3252,8 @@
     	// Tyk classic API definition: `upstream_certificates`
     	DomainToCertificates []DomainToCertificate `bson:"domainToCertificateMapping" json:"domainToCertificateMapping"`
     }
    -    MutualTLS contains the configuration for establishment of mutual TLS between
    -    Tyk and the upstream server.
    +    MutualTLS contains the configuration for establishing a mutual TLS
    +    connection between Tyk and the upstream server.
     
     func (m *MutualTLS) ExtractTo(api *apidef.APIDefinition)
         ExtractTo extracts *MutualTLS into *apidef.APIDefinition.
    @@ -3329,7 +3338,7 @@
     }
     
     type OIDC struct {
    -	// Enabled enables the OIDC authentication mode.
    +	// Enabled activates the OIDC authentication mode.
     	//
     	// Tyk classic API definition: `use_openid`
     	Enabled bool `bson:"enabled" json:"enabled"` // required
    @@ -3342,7 +3351,7 @@
     	// Tyk classic API definition: `openid_options.segregate_by_client`.
     	SegregateByClientId bool `bson:"segregateByClientId,omitempty" json:"segregateByClientId,omitempty"`
     
    -	// Providers contains a list of authorised providers and their Client IDs, and matched policies.
    +	// Providers contains a list of authorised providers, their Client IDs and matched policies.
     	//
     	// Tyk classic API definition: `openid_options.providers`.
     	Providers []Provider `bson:"providers,omitempty" json:"providers,omitempty"`
    @@ -3483,7 +3492,7 @@
         Fill fills *PinnerPublicKeys (slice) from publicKeys argument.
     
     type PluginBundle struct {
    -	// Enabled enables the custom plugin bundles.
    +	// Enabled activates the custom plugin bundles.
     	//
     	// Tyk classic API definition: `custom_middleware_bundle_disabled`
     	Enabled bool `bson:"enabled" json:"enabled"` // required.
    @@ -3527,7 +3536,7 @@
         Fill fills PluginConfig from apidef.
     
     type PluginConfigData struct {
    -	// Enabled enables custom plugin config data.
    +	// Enabled activates custom plugin config data.
     	Enabled bool `bson:"enabled" json:"enabled"` // required.
     
     	// Value is the value of custom plugin config data.
    @@ -3598,7 +3607,11 @@
     	// The plugins would be executed in the order of configuration in the list.
     	Plugins CustomPlugins `bson:"plugins,omitempty" json:"plugins,omitempty"`
     }
    -    PrePlugin configures pre stage plugins.
    +    PrePlugin configures pre-request plugins.
    +
    +    Pre-request plugins are executed before the request is sent to the upstream
    +    target and before any authentication information is extracted from the
    +    header or parameter list of the request.
     
     func (p *PrePlugin) ExtractTo(api *apidef.APIDefinition)
         ExtractTo extracts PrePlugin into Tyk classic api definition.
    @@ -3617,7 +3630,7 @@
         mappings.
     
     type RateLimit struct {
    -	// Enabled enables/disables API level rate limiting for this API.
    +	// Enabled activates API level rate limiting for this API.
     	//
     	// Tyk classic API definition: `!disable_rate_limit`.
     	Enabled bool `json:"enabled" bson:"enabled"`
    @@ -3633,7 +3646,7 @@
     	Rate int `json:"rate" bson:"rate"`
     	// Per defines the time interval for rate limiting using shorthand notation.
     	// The value of Per is a string that specifies the interval in a compact form,
    -	// where hours, minutes, and seconds are denoted by 'h', 'm', and 's' respectively.
    +	// where hours, minutes and seconds are denoted by 'h', 'm' and 's' respectively.
     	// Multiple units can be combined to represent the duration.
     	//
     	// Examples of valid shorthand notations:
    @@ -3643,7 +3656,7 @@
     	// - "1m29s": one minute and twenty-nine seconds
     	// - "1h30m" : one hour and thirty minutes
     	//
    -	// An empty value is interpreted as "0s", implying no rate limiting interval effectively disabling the API-level rate limit.
    +	// An empty value is interpreted as "0s", implying no rate limiting interval, which disables the API-level rate limit.
     	// It's important to format the string correctly, as invalid formats will
     	// be considered as 0s/empty.
     	//
    @@ -3663,7 +3676,7 @@
         Fill fills *RateLimit from apidef.APIDefinition.
     
     type RequestSizeLimit struct {
    -	// Enabled enables the Request Size Limit functionality.
    +	// Enabled activates the Request Size Limit functionality.
     	Enabled bool `bson:"enabled" json:"enabled"`
     	// Value is the maximum allowed size of the request body in bytes.
     	Value int64 `bson:"value" json:"value"`
    @@ -3735,7 +3748,7 @@
     type Server struct {
     	// ListenPath is the base path on Tyk to which requests for this API should
     	// be sent. Tyk listens for any requests coming into the host at this
    -	// path, on the port that Tyk is configured to run on, and processes these
    +	// path, on the port that Tyk is configured to run on and processes these
     	// accordingly.
     	ListenPath ListenPath `bson:"listenPath" json:"listenPath"` // required
     
    @@ -3771,7 +3784,7 @@
         Fill fills *Server from apidef.APIDefinition.
     
     type ServiceDiscovery struct {
    -	// Enabled enables Service Discovery.
    +	// Enabled activates Service Discovery.
     	//
     	// Tyk classic API definition: `service_discovery.use_discovery_service`
     	Enabled bool `bson:"enabled" json:"enabled"` // required
    @@ -3875,7 +3888,7 @@
         ServiceDiscovery holds configuration required for service discovery.
     
     func (sd *ServiceDiscovery) CacheOptions() (int64, bool)
    -    CacheOptions returns the timeout value in effect, and a bool if cache is
    +    CacheOptions returns the timeout value in effect and a bool if cache is
         enabled.
     
     func (sd *ServiceDiscovery) ExtractTo(serviceDiscovery *apidef.ServiceDiscoveryConfiguration)
    @@ -3924,8 +3937,8 @@
     	// Tyk classic API definition: `internal`
     	Internal bool `bson:"internal,omitempty" json:"internal,omitempty"`
     }
    -    State holds configuration for the status of the API within Tyk - whether it
    -    is currently active and whether it is exposed externally.
    +    State holds configuration for the status of the API within Tyk - if it is
    +    currently active and if it is exposed externally.
     
     func (s *State) ExtractTo(api *apidef.APIDefinition)
         ExtractTo extracts *State to *apidef.APIDefinition.
    @@ -3947,7 +3960,7 @@
         Fill fills *Test from apidef.UptimeTests.
     
     type Token struct {
    -	// Enabled enables the token based authentication mode.
    +	// Enabled activates the token based authentication mode.
     	//
     	// Tyk classic API definition: `auth_configs["authToken"].use_standard_auth`
     	Enabled bool `bson:"enabled" json:"enabled"` // required
    @@ -3987,7 +4000,7 @@
         Fill fills *TrackEndpoint receiver with data from apidef.TrackEndpointMeta.
     
     type TransformBody struct {
    -	// Enabled enables transform request/request body middleware.
    +	// Enabled activates transform request/request body middleware.
     	Enabled bool `bson:"enabled" json:"enabled"`
     	// Format of the request/response body, xml or json.
     	Format apidef.RequestInputType `bson:"format" json:"format"`
    @@ -4006,7 +4019,7 @@
         Fill fills *TransformBody from apidef.TemplateMeta.
     
     type TransformHeaders struct {
    -	// Enabled enables Header Transform for the given path and method.
    +	// Enabled activates Header Transform for the given path and method.
     	Enabled bool `bson:"enabled" json:"enabled"`
     	// Remove specifies header names to be removed from the request/response.
     	Remove []string `bson:"remove,omitempty" json:"remove,omitempty"`
    @@ -4023,7 +4036,7 @@
         Fill fills *TransformHeaders from apidef.HeaderInjectionMeta.
     
     type TransformRequestMethod struct {
    -	// Enabled enables Method Transform for the given path and method.
    +	// Enabled activates Method Transform for the given path and method.
     	Enabled bool `bson:"enabled" json:"enabled"`
     	// ToMethod is the http method value to which the method of an incoming request will be transformed.
     	ToMethod string `bson:"toMethod" json:"toMethod"`
    @@ -4054,7 +4067,7 @@
         *http.Request.
     
     type URLRewrite struct {
    -	// Enabled enables URL rewriting if set to true.
    +	// Enabled activates URL rewriting if set to true.
     	Enabled bool `bson:"enabled" json:"enabled"`
     
     	// Pattern is the regular expression against which the request URL is compared for the primary rewrite check.
    @@ -4122,9 +4135,13 @@
     	// - `requestContext`, match pattern against request context
     	In URLRewriteInput `bson:"in" json:"in"`
     
    -	// Name is the index in the input identified in `in` that should be used to
    -	// locate the value for this rule. When `in` is set to `requestBody`, the
    -	// value is ignored.
    +	// Name is the index in the value declared inside `in`.
    +	//
    +	// Example: for `in=query`, `name=q`, the parameter `q` would
    +	// be read from the request query parameters.
    +	//
    +	// The value of name is unused when `in` is set to `requestBody`,
    +	// as the request body is a single value and not a set of values.
     	Name string `bson:"name,omitempty" json:"name,omitempty"`
     
     	// Pattern is the regular expression against which the `in` values are compared for this rule check.
    @@ -4145,7 +4162,7 @@
     	Condition URLRewriteCondition `bson:"condition" json:"condition"`
     
     	// Rules contain individual checks that are combined according to the
    -	// `condition` to determine whether the URL rewrite will be triggered.
    +	// `condition` to determine if the URL rewrite will be triggered.
     	// If empty, the trigger is ignored.
     	Rules []*URLRewriteRule `bson:"rules,omitempty" json:"rules,omitempty"`
     
    @@ -4156,7 +4173,7 @@
         URLRewriteTrigger represents a set of matching rules for a rewrite.
     
     type Upstream struct {
    -	// URL defines the upstream address (or Target URL) to which requests should be proxied.
    +	// URL defines the upstream address (or target URL) to which requests should be proxied.
     	// Tyk classic API definition: `proxy.target_url`
     	URL string `bson:"url" json:"url"` // required
     
    @@ -4167,7 +4184,7 @@
     	// Test contains the configuration related to uptime tests.
     	Test *Test `bson:"test,omitempty" json:"test,omitempty"`
     
    -	// MutualTLS contains the configuration for establishment of mutual TLS between Tyk and the upstream server.
    +	// MutualTLS contains the configuration for establishing a mutual TLS connection between Tyk and the upstream server.
     	MutualTLS *MutualTLS `bson:"mutualTLS,omitempty" json:"mutualTLS,omitempty"`
     
     	// CertificatePinning contains the configuration related to certificate pinning.
    @@ -4245,13 +4262,13 @@
         Fill fills *Versioning from apidef.APIDefinition.
     
     type VirtualEndpoint struct {
    -	// Enabled enables virtual endpoint.
    +	// Enabled activates virtual endpoint.
     	Enabled bool `bson:"enabled" json:"enabled"` // required.
    -	// Name is the name of js function.
    +	// Name is the name of JS function.
     	Name string `bson:"name" json:"name"` // required.
    -	// Path is the path to js file.
    +	// 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.
    +	// Body is the JS function to execute encoded in base64 format.
     	Body string `bson:"body,omitempty" json:"body,omitempty"`
     	// ProxyOnError proxies if virtual endpoint errors out.
     	ProxyOnError bool `bson:"proxyOnError,omitempty" json:"proxyOnError,omitempty"`

    Copy link
    Contributor

    PR Description updated to latest commit (2067065)

    Copy link
    Contributor

    PR Review

    ⏱️ Estimated effort to review [1-5]

    2, because the PR primarily involves textual changes in comments and documentation strings across various Go files. The changes are straightforward and mostly involve replacing or rephrasing words for clarity and consistency. However, understanding the context and ensuring that the changes accurately reflect the intended functionality requires some domain knowledge.

    🧪 Relevant tests

    No

    🔍 Possible issues

    No

    🔒 Security concerns

    No

    Code feedback:
    relevant fileapidef/oas/authentication.go
    suggestion      

    Consider using constants for repeated strings such as "Enabled activates" to ensure consistency and ease future modifications. For example, define a constant like const enabledActivatesDescription = "Enabled activates" and use it across all struct comments where applicable. [important]

    relevant line// Enabled activates the auth source.

    relevant fileapidef/oas/middleware.go
    suggestion      

    For the PluginConfigData struct, ensure that the Value map's usage is clearly documented or consider providing an example. Complex structures like maps can benefit from explicit examples or detailed documentation, especially when they are intended for plugin configuration. [medium]

    relevant lineValue map[string]interface{} `bson:"value" json:"value"` // required.

    relevant fileapidef/oas/server.go
    suggestion      

    For the Strip field in ListenPath, consider renaming it to StripListenPath for clarity and to match the comment description more closely. This makes it immediately clear what the field does without needing to read the comment. [medium]

    relevant line// Strip removes the inbound listen path (as accessed by the client) when generating the outbound request for the upstream service.

    relevant fileapidef/oas/upstream.go
    suggestion      

    In the RateLimit struct, consider adding validation to ensure that the Per string follows the expected format. This could be implemented as a method on the struct that checks the format and returns an error if it does not match the expected pattern. [important]

    relevant line// Per defines the time interval for rate limiting using shorthand notation.


    ✨ Review tool usage guide:

    Overview:
    The review tool scans the PR code changes, and generates a PR review. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
    When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:

    /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
    

    With a configuration file, use the following template:

    [pr_reviewer]
    some_config1=...
    some_config2=...
    
    Utilizing extra instructions

    The review tool can be configured with extra instructions, which can be used to guide the model to a feedback tailored to the needs of your project.

    Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Specify the relevant sub-tool, and the relevant aspects of the PR that you want to emphasize.

    Examples for extra instructions:

    [pr_reviewer] # /review #
    extra_instructions="""
    In the 'possible issues' section, emphasize the following:
    - Does the code logic cover relevant edge cases?
    - Is the code logic clear and easy to understand?
    - Is the code logic efficient?
    ...
    """
    

    Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable.

    How to enable\disable automation
    • When you first install PR-Agent app, the default mode for the review tool is:
    pr_commands = ["/review", ...]
    

    meaning the review tool will run automatically on every PR, with the default configuration.
    Edit this field to enable/disable the tool, or to change the used configurations

    Auto-labels

    The review tool can auto-generate two specific types of labels for a PR:

    • a possible security issue label, that detects possible security issues (enable_review_labels_security flag)
    • a Review effort [1-5]: x label, where x is the estimated effort to review the PR (enable_review_labels_effort flag)
    Extra sub-tools

    The review tool provides a collection of possible feedbacks about a PR.
    It is recommended to review the possible options, and choose the ones relevant for your use case.
    Some of the feature that are disabled by default are quite useful, and should be considered for enabling. For example:
    require_score_review, require_soc2_ticket, and more.

    Auto-approve PRs

    By invoking:

    /review auto_approve
    

    The tool will automatically approve the PR, and add a comment with the approval.

    To ensure safety, the auto-approval feature is disabled by default. To enable auto-approval, you need to actively set in a pre-defined configuration file the following:

    [pr_reviewer]
    enable_auto_approval = true
    

    (this specific flag cannot be set with a command line argument, only in the configuration file, committed to the repository)

    You can also enable auto-approval only if the PR meets certain requirements, such as that the estimated_review_effort is equal or below a certain threshold, by adjusting the flag:

    [pr_reviewer]
    maximal_review_effort = 5
    
    More PR-Agent commands

    To invoke the PR-Agent, add a comment using one of the following commands:

    • /review: Request a review of your Pull Request.
    • /describe: Update the PR title and description based on the contents of the PR.
    • /improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
    • /ask <QUESTION>: Ask a question about the PR.
    • /update_changelog: Update the changelog based on the PR's contents.
    • /add_docs 💎: Generate docstring for new components introduced in the PR.
    • /generate_labels 💎: Generate labels for the PR based on the PR's contents.
    • /analyze 💎: Automatically analyzes the PR, and presents changes walkthrough for each component.

    See the tools guide for more details.
    To list the possible configuration parameters, add a /config comment.

    See the review usage page for a comprehensive guide on using this tool.

    Copy link
    Contributor

    github-actions bot commented Feb 28, 2024

    PR Code Suggestions

    Suggestions                                                                                                                                                     
    enhancement
    Rename the Enabled field to IsEnabled for clarity. 

    Consider using a more descriptive variable name for Enabled in the AuthSource struct to
    clarify its purpose.

    apidef/oas/authentication.go [319]

    -Enabled bool `bson:"enabled" json:"enabled"` // required
    +IsEnabled bool `bson:"isEnabled" json:"isEnabled"` // required
     
    
    Use a specific type for HMAC algorithms for type safety.                     

    For the AllowedAlgorithms slice in the HMAC struct, consider defining a type for the HMAC
    algorithms to ensure type safety and clarity.

    apidef/oas/authentication.go [444]

    -AllowedAlgorithms []string `bson:"allowedAlgorithms,omitempty" json:"allowedAlgorithms,omitempty"`
    +AllowedAlgorithms []HMACAlgorithm `bson:"allowedAlgorithms,omitempty" json:"allowedAlgorithms,omitempty"`
     
    
    Rename the Enabled field to IsEnabled for clarity. 

    In the PluginConfigData struct, ensure that the Enabled field's purpose is clear by
    renaming it to IsEnabled.

    apidef/oas/middleware.go [281]

    -Enabled bool `bson:"enabled" json:"enabled"` // required.
    +IsEnabled bool `bson:"isEnabled" json:"isEnabled"` // required.
     
    
    Add validation for the Code field in MockResponse

    For the MockResponse struct, consider adding validation tags to ensure that the Code field
    receives valid HTTP status codes.

    apidef/oas/operation.go [717]

    -Code int `bson:"code,omitempty" json:"code,omitempty"`
    +Code int `bson:"code,omitempty" json:"code,omitempty" validate:"httpStatusCode"`
     
    
    Add documentation for the Enabled field in CustomPluginAuthentication.

    In the CustomPluginAuthentication struct, consider adding documentation for the Enabled
    field to explain when and why it should be used.

    apidef/oas/authentication.go [596]

    -Enabled bool `bson:"enabled" json:"enabled"` // required
    +Enabled bool `bson:"enabled" json:"enabled"` // required. Set to true to activate the custom plugin authentication mode.
     
    
    Ensure SigningMethod accepts only specified values for security and correctness.

    Add validation for the SigningMethod field to ensure it only accepts the allowed values
    (HMAC, RSA, ECDSA).

    apidef/oas/security.go [414]

    -SigningMethod string `bson:"signingMethod" json:"signingMethod"`
    +SigningMethod string `bson:"signingMethod" json:"signingMethod"` // Add validation logic here
     
    
    Rename Strip to StripListenPath for better clarity.

    For the Strip field in ListenPath, consider using a more descriptive name like
    StripListenPath to clearly indicate its purpose.

    apidef/oas/server.go [145]

    -Strip removes the inbound listen path
    +StripListenPath removes the inbound listen path
     
    
    Add validation to ServiceDiscovery to ensure necessary fields are provided when enabled.

    For the ServiceDiscovery struct, consider adding validation to ensure that if Enabled is
    true, the necessary configuration fields are also provided and valid.

    apidef/oas/upstream.go [139]

    -Enabled bool `bson:"enabled" json:"enabled"` // required
    +Enabled bool `bson:"enabled" json:"enabled"` // required, add validation logic here
     
    
    Add validation for Pattern to ensure it's a valid regular expression.

    In the URLRewriteRule struct, consider adding validation for the Pattern field to ensure
    it contains a valid regular expression.

    apidef/oas/url_rewrite.go [121]

    -Pattern is the regular expression against which the `in` values are compared for this rule check.
    +Pattern string `bson:"pattern" json:"pattern"` // Add validation logic here to ensure it's a valid regex
     
    
    best practice
    Rename the Enabled field to IsEnabled for clarity and convention adherence.

    Consider renaming the Enabled field to IsEnabled to follow Go naming conventions for
    boolean fields that indicate a state.

    apidef/oas/security.go [30]

    -Enabled bool `bson:"enabled" json:"enabled"` // required
    +IsEnabled bool `bson:"isEnabled" json:"isEnabled"` // required
     
    

    ✨ Improve tool usage guide:

    Overview:
    The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.
    When commenting, to edit configurations related to the improve tool (pr_code_suggestions section), use the following template:

    /improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
    

    With a configuration file, use the following template:

    [pr_code_suggestions]
    some_config1=...
    some_config2=...
    
    Enabling\disabling automation

    When you first install the app, the default mode for the improve tool is:

    pr_commands = ["/improve --pr_code_suggestions.summarize=true", ...]
    

    meaning the improve tool will run automatically on every PR, with summarization enabled. Delete this line to disable the tool from running automatically.

    Utilizing extra instructions

    Extra instructions are very important for the improve tool, since they enable to guide the model to suggestions that are more relevant to the specific needs of the project.

    Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Specify relevant aspects that you want the model to focus on.

    Examples for extra instructions:

    [pr_code_suggestions] # /improve #
    extra_instructions="""
    Emphasize the following aspects:
    - Does the code logic cover relevant edge cases?
    - Is the code logic clear and easy to understand?
    - Is the code logic efficient?
    ...
    """
    

    Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable.

    A note on code suggestions quality
    • While the current AI for code is getting better and better (GPT-4), it's not flawless. Not all the suggestions will be perfect, and a user should not accept all of them automatically.
    • Suggestions are not meant to be simplistic. Instead, they aim to give deep feedback and raise questions, ideas and thoughts to the user, who can then use his judgment, experience, and understanding of the code base.
    • Recommended to use the 'extra_instructions' field to guide the model to suggestions that are more relevant to the specific needs of the project, or use the custom suggestions 💎 tool
    • With large PRs, best quality will be obtained by using 'improve --extended' mode.
    More PR-Agent commands

    To invoke the PR-Agent, add a comment using one of the following commands:

    • /review: Request a review of your Pull Request.
    • /describe: Update the PR title and description based on the contents of the PR.
    • /improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
    • /ask <QUESTION>: Ask a question about the PR.
    • /update_changelog: Update the changelog based on the PR's contents.
    • /add_docs 💎: Generate docstring for new components introduced in the PR.
    • /generate_labels 💎: Generate labels for the PR based on the PR's contents.
    • /analyze 💎: Automatically analyzes the PR, and presents changes walkthrough for each component.

    See the tools guide for more details.
    To list the possible configuration parameters, add a /config comment.

    See the improve usage page for a more comprehensive guide on using this tool.

    Copy link

    sonarcloud bot commented Feb 28, 2024

    Quality Gate Passed Quality Gate passed

    Issues
    0 New issues

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

    See analysis details on SonarCloud

    @buger
    Copy link
    Member

    buger commented Feb 28, 2024

    API tests result - postgres15-sha256 env: success
    Branch used: refs/heads/master
    Commit: b33a711 [TT-11185] release docs 5.3.0 update (#6079)

    This PR addresses feedback raised up in DX review.

    • fixes typos
    • removes oxford comma
    • rewords some unclear docs
    • adds docs
    • consistent docs for enabled fields

    Focuses on x-tyk-gateway.md docs (apidef/oas).


    Type

    enhancement, documentation


    Description

    • Updated comments across various structs for better clarity and
      consistency.
    • Changed phrasing from "Enabled enables" to "Enabled activates" to
      improve readability.
    • Enhanced documentation for authentication modes, middleware
      configurations, operation structs, security configurations, server
      configurations, upstream configurations, and URL rewriting.
    • Added detailed examples and explanations where necessary to aid
      understanding.

    Changes walkthrough

    Relevant files
    Documentation
    authentication.go
    Improved Authentication Structs Documentation and Clarity

    apidef/oas/authentication.go

  • Updated comments for clarity and consistency across authentication
    structs.
  • Changed "Enabled enables" to "Enabled activates" for various
    authentication modes.
  • Improved documentation for HMAC, OIDC, CustomPluginAuthentication, and
    AuthenticationPlugin.
  • +12/-10 
    middleware.go
    Enhanced Middleware Documentation and Consistency               

    apidef/oas/middleware.go

  • Updated comments for clarity and consistency across middleware
    structs.
  • Changed "Enabled enables" to "Enabled activates" for various
    middleware configurations.
  • Added detailed comments for AllowedAlgorithms in HMAC and improved
    documentation for custom plugins.
  • +20/-16 
    operation.go
    Refined Operation Structs Documentation for Better Clarity

    apidef/oas/operation.go

  • Updated comments for clarity and consistency across operation structs.
  • Changed "Enabled enables" to "Enabled activates" for mock response and
    FromOASExamples.
  • Improved documentation for MockResponse and FromOASExamples.
  • +3/-3     
    security.go
    Updated Security Structs Documentation for Enhanced Clarity

    apidef/oas/security.go

  • Updated comments for clarity and consistency across security structs.
  • Changed "Enabled enables" to "Enabled activates" for token, basic
    authentication, and OAuthProvider.
  • Enhanced documentation for JWTValidation and Introspection structs.
  • +18/-11 
    server.go
    Improved Server Configuration Documentation and Consistency

    apidef/oas/server.go

  • Updated comments for clarity and consistency across server
    configuration structs.
  • Changed "Enabled enables" to "Enabled activates" for various server
    configurations.
  • Improved documentation for ListenPath, ClientCertificates, and
    GatewayTags.
  • +9/-9     
    upstream.go
    Enhanced Upstream Configuration Documentation for Better Understanding

    apidef/oas/upstream.go

  • Updated comments for clarity and consistency across upstream
    configuration structs.
  • Changed "Enabled enables" to "Enabled activates" for ServiceDiscovery
    and MutualTLS.
  • Enhanced documentation for RateLimit and ServiceDiscoveryCache.
  • +6/-6     
    url_rewrite.go
    Refined URL Rewrite Documentation with Detailed Examples 

    apidef/oas/url_rewrite.go

  • Updated comments for clarity and consistency in URLRewrite struct.
  • Changed "Enabled enables" to "Enabled activates" for URL rewriting.
  • Added detailed examples and explanations for URLRewriteRule fields.
  • +8/-4     

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


    Co-authored-by: Tit Petric tit@tyk.io
    Triggered by: push (@titpetric)
    Execution page

    @buger
    Copy link
    Member

    buger commented Feb 28, 2024

    API tests result - mongo44-sha256 env: success
    Branch used: refs/heads/master
    Commit: b33a711 [TT-11185] release docs 5.3.0 update (#6079)

    This PR addresses feedback raised up in DX review.

    • fixes typos
    • removes oxford comma
    • rewords some unclear docs
    • adds docs
    • consistent docs for enabled fields

    Focuses on x-tyk-gateway.md docs (apidef/oas).


    Type

    enhancement, documentation


    Description

    • Updated comments across various structs for better clarity and
      consistency.
    • Changed phrasing from "Enabled enables" to "Enabled activates" to
      improve readability.
    • Enhanced documentation for authentication modes, middleware
      configurations, operation structs, security configurations, server
      configurations, upstream configurations, and URL rewriting.
    • Added detailed examples and explanations where necessary to aid
      understanding.

    Changes walkthrough

    Relevant files
    Documentation
    authentication.go
    Improved Authentication Structs Documentation and Clarity

    apidef/oas/authentication.go

  • Updated comments for clarity and consistency across authentication
    structs.
  • Changed "Enabled enables" to "Enabled activates" for various
    authentication modes.
  • Improved documentation for HMAC, OIDC, CustomPluginAuthentication, and
    AuthenticationPlugin.
  • +12/-10 
    middleware.go
    Enhanced Middleware Documentation and Consistency               

    apidef/oas/middleware.go

  • Updated comments for clarity and consistency across middleware
    structs.
  • Changed "Enabled enables" to "Enabled activates" for various
    middleware configurations.
  • Added detailed comments for AllowedAlgorithms in HMAC and improved
    documentation for custom plugins.
  • +20/-16 
    operation.go
    Refined Operation Structs Documentation for Better Clarity

    apidef/oas/operation.go

  • Updated comments for clarity and consistency across operation structs.
  • Changed "Enabled enables" to "Enabled activates" for mock response and
    FromOASExamples.
  • Improved documentation for MockResponse and FromOASExamples.
  • +3/-3     
    security.go
    Updated Security Structs Documentation for Enhanced Clarity

    apidef/oas/security.go

  • Updated comments for clarity and consistency across security structs.
  • Changed "Enabled enables" to "Enabled activates" for token, basic
    authentication, and OAuthProvider.
  • Enhanced documentation for JWTValidation and Introspection structs.
  • +18/-11 
    server.go
    Improved Server Configuration Documentation and Consistency

    apidef/oas/server.go

  • Updated comments for clarity and consistency across server
    configuration structs.
  • Changed "Enabled enables" to "Enabled activates" for various server
    configurations.
  • Improved documentation for ListenPath, ClientCertificates, and
    GatewayTags.
  • +9/-9     
    upstream.go
    Enhanced Upstream Configuration Documentation for Better Understanding

    apidef/oas/upstream.go

  • Updated comments for clarity and consistency across upstream
    configuration structs.
  • Changed "Enabled enables" to "Enabled activates" for ServiceDiscovery
    and MutualTLS.
  • Enhanced documentation for RateLimit and ServiceDiscoveryCache.
  • +6/-6     
    url_rewrite.go
    Refined URL Rewrite Documentation with Detailed Examples 

    apidef/oas/url_rewrite.go

  • Updated comments for clarity and consistency in URLRewrite struct.
  • Changed "Enabled enables" to "Enabled activates" for URL rewriting.
  • Added detailed examples and explanations for URLRewriteRule fields.
  • +8/-4     

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


    Co-authored-by: Tit Petric tit@tyk.io
    Triggered by: push (@titpetric)
    Execution page

    @titpetric titpetric merged commit b33a711 into master Feb 28, 2024
    31 checks passed
    @titpetric titpetric deleted the fix/tt-11185/release-docs-5.3.0-update branch February 28, 2024 14:23
    @titpetric
    Copy link
    Contributor Author

    /release to release-5.3.0

    Copy link

    tykbot bot commented Feb 28, 2024

    Working on it! Note that it can take a few minutes.

    tykbot bot pushed a commit that referenced this pull request Feb 28, 2024
    ## This PR addresses feedback raised up in DX review.
    
    - fixes typos
    - removes oxford comma
    - rewords some unclear docs
    - adds docs
    - consistent docs for `enabled` fields
    
    Focuses on x-tyk-gateway.md docs (apidef/oas).
    
    
    ___
    
    ## **Type**
    enhancement, documentation
    
    
    ___
    
    ## **Description**
    - Updated comments across various structs for better clarity and
    consistency.
    - Changed phrasing from "Enabled enables" to "Enabled activates" to
    improve readability.
    - Enhanced documentation for authentication modes, middleware
    configurations, operation structs, security configurations, server
    configurations, upstream configurations, and URL rewriting.
    - Added detailed examples and explanations where necessary to aid
    understanding.
    
    
    ___
    
    
    
    ## **Changes walkthrough**
    <table><thead><tr><th></th><th align="left">Relevant
    files</th></tr></thead><tbody><tr><td><strong>Documentation</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>authentication.go</strong><dd><code>Improved
    Authentication Structs Documentation and Clarity</code></dd></summary>
    <hr>
    
    apidef/oas/authentication.go
    <li>Updated comments for clarity and consistency across authentication
    <br>structs.<br> <li> Changed "Enabled enables" to "Enabled activates"
    for various <br>authentication modes.<br> <li> Improved documentation
    for HMAC, OIDC, CustomPluginAuthentication, and
    <br>AuthenticationPlugin.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-e51c9d24d4235e7cc53048cc1d92967d177585ba5e073f14876308a97bef6326">+12/-10</a>&nbsp;
    </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>middleware.go</strong><dd><code>Enhanced Middleware
    Documentation and Consistency</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    apidef/oas/middleware.go
    <li>Updated comments for clarity and consistency across middleware
    <br>structs.<br> <li> Changed "Enabled enables" to "Enabled activates"
    for various <br>middleware configurations.<br> <li> Added detailed
    comments for <code>AllowedAlgorithms</code> in <code>HMAC</code> and
    improved <br>documentation for custom plugins.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-992ec7c28d25fd54f6491d295389757705cd114bc869a35cba50d42e548cdc6e">+20/-16</a>&nbsp;
    </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>operation.go</strong><dd><code>Refined Operation
    Structs Documentation for Better Clarity</code></dd></summary>
    <hr>
    
    apidef/oas/operation.go
    <li>Updated comments for clarity and consistency across operation
    structs.<br> <li> Changed "Enabled enables" to "Enabled activates" for
    mock response and <br>FromOASExamples.<br> <li> Improved documentation
    for <code>MockResponse</code> and <code>FromOASExamples</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-6d92d2d5b09a5fa7129609bb7cd0d383d015250ec07062b6a93a83257be51fb5">+3/-3</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>security.go</strong><dd><code>Updated Security Structs
    Documentation for Enhanced Clarity</code></dd></summary>
    <hr>
    
    apidef/oas/security.go
    <li>Updated comments for clarity and consistency across security
    structs.<br> <li> Changed "Enabled enables" to "Enabled activates" for
    token, basic <br>authentication, and OAuthProvider.<br> <li> Enhanced
    documentation for <code>JWTValidation</code> and
    <code>Introspection</code> structs.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-15e7d47137452ca4f3f6139aa8c007cdb426152c41846f712f8bf5dfb607afcc">+18/-11</a>&nbsp;
    </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>server.go</strong><dd><code>Improved Server
    Configuration Documentation and Consistency</code></dd></summary>
    <hr>
    
    apidef/oas/server.go
    <li>Updated comments for clarity and consistency across server
    <br>configuration structs.<br> <li> Changed "Enabled enables" to
    "Enabled activates" for various server <br>configurations.<br> <li>
    Improved documentation for <code>ListenPath</code>,
    <code>ClientCertificates</code>, and <br><code>GatewayTags</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-21857c42e8659f7980014e277c3c758703f29e9e5c0c40553f2584cddb870808">+9/-9</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>upstream.go</strong><dd><code>Enhanced Upstream
    Configuration Documentation for Better
    Understanding</code></dd></summary>
    <hr>
    
    apidef/oas/upstream.go
    <li>Updated comments for clarity and consistency across upstream
    <br>configuration structs.<br> <li> Changed "Enabled enables" to
    "Enabled activates" for ServiceDiscovery <br>and MutualTLS.<br> <li>
    Enhanced documentation for <code>RateLimit</code> and
    <code>ServiceDiscoveryCache</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-7b0941c7f37fe5a2a23047e0822a65519ca11c371660f36555b59a60f000e3f4">+6/-6</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>url_rewrite.go</strong><dd><code>Refined URL Rewrite
    Documentation with Detailed Examples</code>&nbsp; </dd></summary>
    <hr>
    
    apidef/oas/url_rewrite.go
    <li>Updated comments for clarity and consistency in URLRewrite
    struct.<br> <li> Changed "Enabled enables" to "Enabled activates" for
    URL rewriting.<br> <li> Added detailed examples and explanations for
    <code>URLRewriteRule</code> fields.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-7317c6061fb6488e079d733230045c7cbc1b4b2ffb98bb7da20d4025f4976e51">+8/-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
    
    ---------
    
    Co-authored-by: Tit Petric <tit@tyk.io>
    
    (cherry picked from commit b33a711)
    buger added a commit that referenced this pull request Feb 28, 2024
    [TT-11185] release docs 5.3.0 update (#6079)
    
    ## This PR addresses feedback raised up in DX review.
    
    - fixes typos
    - removes oxford comma
    - rewords some unclear docs
    - adds docs
    - consistent docs for `enabled` fields
    
    Focuses on x-tyk-gateway.md docs (apidef/oas).
    
    
    ___
    
    ## **Type**
    enhancement, documentation
    
    
    ___
    
    ## **Description**
    - Updated comments across various structs for better clarity and
    consistency.
    - Changed phrasing from "Enabled enables" to "Enabled activates" to
    improve readability.
    - Enhanced documentation for authentication modes, middleware
    configurations, operation structs, security configurations, server
    configurations, upstream configurations, and URL rewriting.
    - Added detailed examples and explanations where necessary to aid
    understanding.
    
    
    ___
    
    
    
    ## **Changes walkthrough**
    <table><thead><tr><th></th><th align="left">Relevant
    files</th></tr></thead><tbody><tr><td><strong>Documentation</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>authentication.go</strong><dd><code>Improved
    Authentication Structs Documentation and Clarity</code></dd></summary>
    <hr>
    
    apidef/oas/authentication.go
    <li>Updated comments for clarity and consistency across authentication
    <br>structs.<br> <li> Changed "Enabled enables" to "Enabled activates"
    for various <br>authentication modes.<br> <li> Improved documentation
    for HMAC, OIDC, CustomPluginAuthentication, and
    <br>AuthenticationPlugin.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-e51c9d24d4235e7cc53048cc1d92967d177585ba5e073f14876308a97bef6326">+12/-10</a>&nbsp;
    </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>middleware.go</strong><dd><code>Enhanced Middleware
    Documentation and Consistency</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    apidef/oas/middleware.go
    <li>Updated comments for clarity and consistency across middleware
    <br>structs.<br> <li> Changed "Enabled enables" to "Enabled activates"
    for various <br>middleware configurations.<br> <li> Added detailed
    comments for <code>AllowedAlgorithms</code> in <code>HMAC</code> and
    improved <br>documentation for custom plugins.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-992ec7c28d25fd54f6491d295389757705cd114bc869a35cba50d42e548cdc6e">+20/-16</a>&nbsp;
    </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>operation.go</strong><dd><code>Refined Operation
    Structs Documentation for Better Clarity</code></dd></summary>
    <hr>
    
    apidef/oas/operation.go
    <li>Updated comments for clarity and consistency across operation
    structs.<br> <li> Changed "Enabled enables" to "Enabled activates" for
    mock response and <br>FromOASExamples.<br> <li> Improved documentation
    for <code>MockResponse</code> and <code>FromOASExamples</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-6d92d2d5b09a5fa7129609bb7cd0d383d015250ec07062b6a93a83257be51fb5">+3/-3</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>security.go</strong><dd><code>Updated Security Structs
    Documentation for Enhanced Clarity</code></dd></summary>
    <hr>
    
    apidef/oas/security.go
    <li>Updated comments for clarity and consistency across security
    structs.<br> <li> Changed "Enabled enables" to "Enabled activates" for
    token, basic <br>authentication, and OAuthProvider.<br> <li> Enhanced
    documentation for <code>JWTValidation</code> and
    <code>Introspection</code> structs.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-15e7d47137452ca4f3f6139aa8c007cdb426152c41846f712f8bf5dfb607afcc">+18/-11</a>&nbsp;
    </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>server.go</strong><dd><code>Improved Server
    Configuration Documentation and Consistency</code></dd></summary>
    <hr>
    
    apidef/oas/server.go
    <li>Updated comments for clarity and consistency across server
    <br>configuration structs.<br> <li> Changed "Enabled enables" to
    "Enabled activates" for various server <br>configurations.<br> <li>
    Improved documentation for <code>ListenPath</code>,
    <code>ClientCertificates</code>, and <br><code>GatewayTags</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-21857c42e8659f7980014e277c3c758703f29e9e5c0c40553f2584cddb870808">+9/-9</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>upstream.go</strong><dd><code>Enhanced Upstream
    Configuration Documentation for Better
    Understanding</code></dd></summary>
    <hr>
    
    apidef/oas/upstream.go
    <li>Updated comments for clarity and consistency across upstream
    <br>configuration structs.<br> <li> Changed "Enabled enables" to
    "Enabled activates" for ServiceDiscovery <br>and MutualTLS.<br> <li>
    Enhanced documentation for <code>RateLimit</code> and
    <code>ServiceDiscoveryCache</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-7b0941c7f37fe5a2a23047e0822a65519ca11c371660f36555b59a60f000e3f4">+6/-6</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>url_rewrite.go</strong><dd><code>Refined URL Rewrite
    Documentation with Detailed Examples</code>&nbsp; </dd></summary>
    <hr>
    
    apidef/oas/url_rewrite.go
    <li>Updated comments for clarity and consistency in URLRewrite
    struct.<br> <li> Changed "Enabled enables" to "Enabled activates" for
    URL rewriting.<br> <li> Added detailed examples and explanations for
    <code>URLRewriteRule</code> fields.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-7317c6061fb6488e079d733230045c7cbc1b4b2ffb98bb7da20d4025f4976e51">+8/-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
    
    ---------
    
    Co-authored-by: Tit Petric <tit@tyk.io>
    Copy link

    tykbot bot commented Feb 28, 2024

    @titpetric Succesfully merged PR

    @titpetric
    Copy link
    Contributor Author

    /release to release-5.3

    Copy link

    tykbot bot commented Feb 28, 2024

    Working on it! Note that it can take a few minutes.

    tykbot bot pushed a commit that referenced this pull request Feb 28, 2024
    ## This PR addresses feedback raised up in DX review.
    
    - fixes typos
    - removes oxford comma
    - rewords some unclear docs
    - adds docs
    - consistent docs for `enabled` fields
    
    Focuses on x-tyk-gateway.md docs (apidef/oas).
    
    
    ___
    
    ## **Type**
    enhancement, documentation
    
    
    ___
    
    ## **Description**
    - Updated comments across various structs for better clarity and
    consistency.
    - Changed phrasing from "Enabled enables" to "Enabled activates" to
    improve readability.
    - Enhanced documentation for authentication modes, middleware
    configurations, operation structs, security configurations, server
    configurations, upstream configurations, and URL rewriting.
    - Added detailed examples and explanations where necessary to aid
    understanding.
    
    
    ___
    
    
    
    ## **Changes walkthrough**
    <table><thead><tr><th></th><th align="left">Relevant
    files</th></tr></thead><tbody><tr><td><strong>Documentation</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>authentication.go</strong><dd><code>Improved
    Authentication Structs Documentation and Clarity</code></dd></summary>
    <hr>
    
    apidef/oas/authentication.go
    <li>Updated comments for clarity and consistency across authentication
    <br>structs.<br> <li> Changed "Enabled enables" to "Enabled activates"
    for various <br>authentication modes.<br> <li> Improved documentation
    for HMAC, OIDC, CustomPluginAuthentication, and
    <br>AuthenticationPlugin.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-e51c9d24d4235e7cc53048cc1d92967d177585ba5e073f14876308a97bef6326">+12/-10</a>&nbsp;
    </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>middleware.go</strong><dd><code>Enhanced Middleware
    Documentation and Consistency</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    apidef/oas/middleware.go
    <li>Updated comments for clarity and consistency across middleware
    <br>structs.<br> <li> Changed "Enabled enables" to "Enabled activates"
    for various <br>middleware configurations.<br> <li> Added detailed
    comments for <code>AllowedAlgorithms</code> in <code>HMAC</code> and
    improved <br>documentation for custom plugins.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-992ec7c28d25fd54f6491d295389757705cd114bc869a35cba50d42e548cdc6e">+20/-16</a>&nbsp;
    </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>operation.go</strong><dd><code>Refined Operation
    Structs Documentation for Better Clarity</code></dd></summary>
    <hr>
    
    apidef/oas/operation.go
    <li>Updated comments for clarity and consistency across operation
    structs.<br> <li> Changed "Enabled enables" to "Enabled activates" for
    mock response and <br>FromOASExamples.<br> <li> Improved documentation
    for <code>MockResponse</code> and <code>FromOASExamples</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-6d92d2d5b09a5fa7129609bb7cd0d383d015250ec07062b6a93a83257be51fb5">+3/-3</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>security.go</strong><dd><code>Updated Security Structs
    Documentation for Enhanced Clarity</code></dd></summary>
    <hr>
    
    apidef/oas/security.go
    <li>Updated comments for clarity and consistency across security
    structs.<br> <li> Changed "Enabled enables" to "Enabled activates" for
    token, basic <br>authentication, and OAuthProvider.<br> <li> Enhanced
    documentation for <code>JWTValidation</code> and
    <code>Introspection</code> structs.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-15e7d47137452ca4f3f6139aa8c007cdb426152c41846f712f8bf5dfb607afcc">+18/-11</a>&nbsp;
    </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>server.go</strong><dd><code>Improved Server
    Configuration Documentation and Consistency</code></dd></summary>
    <hr>
    
    apidef/oas/server.go
    <li>Updated comments for clarity and consistency across server
    <br>configuration structs.<br> <li> Changed "Enabled enables" to
    "Enabled activates" for various server <br>configurations.<br> <li>
    Improved documentation for <code>ListenPath</code>,
    <code>ClientCertificates</code>, and <br><code>GatewayTags</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-21857c42e8659f7980014e277c3c758703f29e9e5c0c40553f2584cddb870808">+9/-9</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>upstream.go</strong><dd><code>Enhanced Upstream
    Configuration Documentation for Better
    Understanding</code></dd></summary>
    <hr>
    
    apidef/oas/upstream.go
    <li>Updated comments for clarity and consistency across upstream
    <br>configuration structs.<br> <li> Changed "Enabled enables" to
    "Enabled activates" for ServiceDiscovery <br>and MutualTLS.<br> <li>
    Enhanced documentation for <code>RateLimit</code> and
    <code>ServiceDiscoveryCache</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-7b0941c7f37fe5a2a23047e0822a65519ca11c371660f36555b59a60f000e3f4">+6/-6</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>url_rewrite.go</strong><dd><code>Refined URL Rewrite
    Documentation with Detailed Examples</code>&nbsp; </dd></summary>
    <hr>
    
    apidef/oas/url_rewrite.go
    <li>Updated comments for clarity and consistency in URLRewrite
    struct.<br> <li> Changed "Enabled enables" to "Enabled activates" for
    URL rewriting.<br> <li> Added detailed examples and explanations for
    <code>URLRewriteRule</code> fields.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-7317c6061fb6488e079d733230045c7cbc1b4b2ffb98bb7da20d4025f4976e51">+8/-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
    
    ---------
    
    Co-authored-by: Tit Petric <tit@tyk.io>
    
    (cherry picked from commit b33a711)
    buger added a commit that referenced this pull request Feb 28, 2024
    [TT-11185] release docs 5.3.0 update (#6079)
    
    ## This PR addresses feedback raised up in DX review.
    
    - fixes typos
    - removes oxford comma
    - rewords some unclear docs
    - adds docs
    - consistent docs for `enabled` fields
    
    Focuses on x-tyk-gateway.md docs (apidef/oas).
    
    
    ___
    
    ## **Type**
    enhancement, documentation
    
    
    ___
    
    ## **Description**
    - Updated comments across various structs for better clarity and
    consistency.
    - Changed phrasing from "Enabled enables" to "Enabled activates" to
    improve readability.
    - Enhanced documentation for authentication modes, middleware
    configurations, operation structs, security configurations, server
    configurations, upstream configurations, and URL rewriting.
    - Added detailed examples and explanations where necessary to aid
    understanding.
    
    
    ___
    
    
    
    ## **Changes walkthrough**
    <table><thead><tr><th></th><th align="left">Relevant
    files</th></tr></thead><tbody><tr><td><strong>Documentation</strong></td><td><table>
    <tr>
      <td>
        <details>
    <summary><strong>authentication.go</strong><dd><code>Improved
    Authentication Structs Documentation and Clarity</code></dd></summary>
    <hr>
    
    apidef/oas/authentication.go
    <li>Updated comments for clarity and consistency across authentication
    <br>structs.<br> <li> Changed "Enabled enables" to "Enabled activates"
    for various <br>authentication modes.<br> <li> Improved documentation
    for HMAC, OIDC, CustomPluginAuthentication, and
    <br>AuthenticationPlugin.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-e51c9d24d4235e7cc53048cc1d92967d177585ba5e073f14876308a97bef6326">+12/-10</a>&nbsp;
    </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>middleware.go</strong><dd><code>Enhanced Middleware
    Documentation and Consistency</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; </dd></summary>
    <hr>
    
    apidef/oas/middleware.go
    <li>Updated comments for clarity and consistency across middleware
    <br>structs.<br> <li> Changed "Enabled enables" to "Enabled activates"
    for various <br>middleware configurations.<br> <li> Added detailed
    comments for <code>AllowedAlgorithms</code> in <code>HMAC</code> and
    improved <br>documentation for custom plugins.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-992ec7c28d25fd54f6491d295389757705cd114bc869a35cba50d42e548cdc6e">+20/-16</a>&nbsp;
    </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>operation.go</strong><dd><code>Refined Operation
    Structs Documentation for Better Clarity</code></dd></summary>
    <hr>
    
    apidef/oas/operation.go
    <li>Updated comments for clarity and consistency across operation
    structs.<br> <li> Changed "Enabled enables" to "Enabled activates" for
    mock response and <br>FromOASExamples.<br> <li> Improved documentation
    for <code>MockResponse</code> and <code>FromOASExamples</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-6d92d2d5b09a5fa7129609bb7cd0d383d015250ec07062b6a93a83257be51fb5">+3/-3</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>security.go</strong><dd><code>Updated Security Structs
    Documentation for Enhanced Clarity</code></dd></summary>
    <hr>
    
    apidef/oas/security.go
    <li>Updated comments for clarity and consistency across security
    structs.<br> <li> Changed "Enabled enables" to "Enabled activates" for
    token, basic <br>authentication, and OAuthProvider.<br> <li> Enhanced
    documentation for <code>JWTValidation</code> and
    <code>Introspection</code> structs.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-15e7d47137452ca4f3f6139aa8c007cdb426152c41846f712f8bf5dfb607afcc">+18/-11</a>&nbsp;
    </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>server.go</strong><dd><code>Improved Server
    Configuration Documentation and Consistency</code></dd></summary>
    <hr>
    
    apidef/oas/server.go
    <li>Updated comments for clarity and consistency across server
    <br>configuration structs.<br> <li> Changed "Enabled enables" to
    "Enabled activates" for various server <br>configurations.<br> <li>
    Improved documentation for <code>ListenPath</code>,
    <code>ClientCertificates</code>, and <br><code>GatewayTags</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-21857c42e8659f7980014e277c3c758703f29e9e5c0c40553f2584cddb870808">+9/-9</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>upstream.go</strong><dd><code>Enhanced Upstream
    Configuration Documentation for Better
    Understanding</code></dd></summary>
    <hr>
    
    apidef/oas/upstream.go
    <li>Updated comments for clarity and consistency across upstream
    <br>configuration structs.<br> <li> Changed "Enabled enables" to
    "Enabled activates" for ServiceDiscovery <br>and MutualTLS.<br> <li>
    Enhanced documentation for <code>RateLimit</code> and
    <code>ServiceDiscoveryCache</code>.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-7b0941c7f37fe5a2a23047e0822a65519ca11c371660f36555b59a60f000e3f4">+6/-6</a>&nbsp;
    &nbsp; &nbsp; </td>
    </tr>                    
    
    <tr>
      <td>
        <details>
    <summary><strong>url_rewrite.go</strong><dd><code>Refined URL Rewrite
    Documentation with Detailed Examples</code>&nbsp; </dd></summary>
    <hr>
    
    apidef/oas/url_rewrite.go
    <li>Updated comments for clarity and consistency in URLRewrite
    struct.<br> <li> Changed "Enabled enables" to "Enabled activates" for
    URL rewriting.<br> <li> Added detailed examples and explanations for
    <code>URLRewriteRule</code> fields.
    
    
    </details>
        
    
      </td>
    <td><a
    href="https://pull/6079/files#diff-7317c6061fb6488e079d733230045c7cbc1b4b2ffb98bb7da20d4025f4976e51">+8/-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
    
    ---------
    
    Co-authored-by: Tit Petric <tit@tyk.io>
    Copy link

    tykbot bot commented Feb 28, 2024

    @titpetric Succesfully merged PR

    @buger
    Copy link
    Member

    buger commented Feb 28, 2024

    API tests result - postgres15-murmur64 env: success
    Branch used: refs/heads/master
    Commit: b33a711 [TT-11185] release docs 5.3.0 update (#6079)

    This PR addresses feedback raised up in DX review.

    • fixes typos
    • removes oxford comma
    • rewords some unclear docs
    • adds docs
    • consistent docs for enabled fields

    Focuses on x-tyk-gateway.md docs (apidef/oas).


    Type

    enhancement, documentation


    Description

    • Updated comments across various structs for better clarity and
      consistency.
    • Changed phrasing from "Enabled enables" to "Enabled activates" to
      improve readability.
    • Enhanced documentation for authentication modes, middleware
      configurations, operation structs, security configurations, server
      configurations, upstream configurations, and URL rewriting.
    • Added detailed examples and explanations where necessary to aid
      understanding.

    Changes walkthrough

    Relevant files
    Documentation
    authentication.go
    Improved Authentication Structs Documentation and Clarity

    apidef/oas/authentication.go

  • Updated comments for clarity and consistency across authentication
    structs.
  • Changed "Enabled enables" to "Enabled activates" for various
    authentication modes.
  • Improved documentation for HMAC, OIDC, CustomPluginAuthentication, and
    AuthenticationPlugin.
  • +12/-10 
    middleware.go
    Enhanced Middleware Documentation and Consistency               

    apidef/oas/middleware.go

  • Updated comments for clarity and consistency across middleware
    structs.
  • Changed "Enabled enables" to "Enabled activates" for various
    middleware configurations.
  • Added detailed comments for AllowedAlgorithms in HMAC and improved
    documentation for custom plugins.
  • +20/-16 
    operation.go
    Refined Operation Structs Documentation for Better Clarity

    apidef/oas/operation.go

  • Updated comments for clarity and consistency across operation structs.
  • Changed "Enabled enables" to "Enabled activates" for mock response and
    FromOASExamples.
  • Improved documentation for MockResponse and FromOASExamples.
  • +3/-3     
    security.go
    Updated Security Structs Documentation for Enhanced Clarity

    apidef/oas/security.go

  • Updated comments for clarity and consistency across security structs.
  • Changed "Enabled enables" to "Enabled activates" for token, basic
    authentication, and OAuthProvider.
  • Enhanced documentation for JWTValidation and Introspection structs.
  • +18/-11 
    server.go
    Improved Server Configuration Documentation and Consistency

    apidef/oas/server.go

  • Updated comments for clarity and consistency across server
    configuration structs.
  • Changed "Enabled enables" to "Enabled activates" for various server
    configurations.
  • Improved documentation for ListenPath, ClientCertificates, and
    GatewayTags.
  • +9/-9     
    upstream.go
    Enhanced Upstream Configuration Documentation for Better Understanding

    apidef/oas/upstream.go

  • Updated comments for clarity and consistency across upstream
    configuration structs.
  • Changed "Enabled enables" to "Enabled activates" for ServiceDiscovery
    and MutualTLS.
  • Enhanced documentation for RateLimit and ServiceDiscoveryCache.
  • +6/-6     
    url_rewrite.go
    Refined URL Rewrite Documentation with Detailed Examples 

    apidef/oas/url_rewrite.go

  • Updated comments for clarity and consistency in URLRewrite struct.
  • Changed "Enabled enables" to "Enabled activates" for URL rewriting.
  • Added detailed examples and explanations for URLRewriteRule fields.
  • +8/-4     

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


    Co-authored-by: Tit Petric tit@tyk.io
    Triggered by: push (@titpetric)
    Execution page

    @buger
    Copy link
    Member

    buger commented Feb 28, 2024

    API tests result - mongo44-murmur64 env: success
    Branch used: refs/heads/master
    Commit: b33a711 [TT-11185] release docs 5.3.0 update (#6079)

    This PR addresses feedback raised up in DX review.

    • fixes typos
    • removes oxford comma
    • rewords some unclear docs
    • adds docs
    • consistent docs for enabled fields

    Focuses on x-tyk-gateway.md docs (apidef/oas).


    Type

    enhancement, documentation


    Description

    • Updated comments across various structs for better clarity and
      consistency.
    • Changed phrasing from "Enabled enables" to "Enabled activates" to
      improve readability.
    • Enhanced documentation for authentication modes, middleware
      configurations, operation structs, security configurations, server
      configurations, upstream configurations, and URL rewriting.
    • Added detailed examples and explanations where necessary to aid
      understanding.

    Changes walkthrough

    Relevant files
    Documentation
    authentication.go
    Improved Authentication Structs Documentation and Clarity

    apidef/oas/authentication.go

  • Updated comments for clarity and consistency across authentication
    structs.
  • Changed "Enabled enables" to "Enabled activates" for various
    authentication modes.
  • Improved documentation for HMAC, OIDC, CustomPluginAuthentication, and
    AuthenticationPlugin.
  • +12/-10 
    middleware.go
    Enhanced Middleware Documentation and Consistency               

    apidef/oas/middleware.go

  • Updated comments for clarity and consistency across middleware
    structs.
  • Changed "Enabled enables" to "Enabled activates" for various
    middleware configurations.
  • Added detailed comments for AllowedAlgorithms in HMAC and improved
    documentation for custom plugins.
  • +20/-16 
    operation.go
    Refined Operation Structs Documentation for Better Clarity

    apidef/oas/operation.go

  • Updated comments for clarity and consistency across operation structs.
  • Changed "Enabled enables" to "Enabled activates" for mock response and
    FromOASExamples.
  • Improved documentation for MockResponse and FromOASExamples.
  • +3/-3     
    security.go
    Updated Security Structs Documentation for Enhanced Clarity

    apidef/oas/security.go

  • Updated comments for clarity and consistency across security structs.
  • Changed "Enabled enables" to "Enabled activates" for token, basic
    authentication, and OAuthProvider.
  • Enhanced documentation for JWTValidation and Introspection structs.
  • +18/-11 
    server.go
    Improved Server Configuration Documentation and Consistency

    apidef/oas/server.go

  • Updated comments for clarity and consistency across server
    configuration structs.
  • Changed "Enabled enables" to "Enabled activates" for various server
    configurations.
  • Improved documentation for ListenPath, ClientCertificates, and
    GatewayTags.
  • +9/-9     
    upstream.go
    Enhanced Upstream Configuration Documentation for Better Understanding

    apidef/oas/upstream.go

  • Updated comments for clarity and consistency across upstream
    configuration structs.
  • Changed "Enabled enables" to "Enabled activates" for ServiceDiscovery
    and MutualTLS.
  • Enhanced documentation for RateLimit and ServiceDiscoveryCache.
  • +6/-6     
    url_rewrite.go
    Refined URL Rewrite Documentation with Detailed Examples 

    apidef/oas/url_rewrite.go

  • Updated comments for clarity and consistency in URLRewrite struct.
  • Changed "Enabled enables" to "Enabled activates" for URL rewriting.
  • Added detailed examples and explanations for URLRewriteRule fields.
  • +8/-4     

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


    Co-authored-by: Tit Petric tit@tyk.io
    Triggered by: push (@titpetric)
    Execution page

    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.

    None yet

    3 participants