Skip to content

Conversation

pvormste
Copy link
Contributor

@pvormste pvormste commented Sep 23, 2025

User description

This PR adds documentation for the new CertificateExpiringSoon and CertificateExpired Gateway events.


PR Type

Documentation


Description

  • Document certificate expiry event types

  • Add metadata tabs for new events

  • Normalize note formatting whitespace

  • Minor copy and spacing fixes


Diagram Walkthrough

flowchart LR
  Events["Gateway events docs"] -- "add section" --> CertSec["Certificate expiry events"]
  CertSec -- "types" --> ExpSoon["CertificateExpiringSoon"]
  CertSec -- "types" --> Expired["CertificateExpired"]
  Metadata["Event metadata"] -- "add tabs" --> TabSoon["Metadata: ExpiringSoon"]
  Metadata -- "add tabs" --> TabExpired["Metadata: Expired"]
Loading

File Walkthrough

Relevant files
Documentation
gateway-events.md
Add docs for certificate expiry events and metadata           

tyk-docs/content/api-management/gateway-events.md

  • Add certificate expiry events section.
  • Document metadata for new events with tabs.
  • Standardize note/warning formatting spacing.
  • Minor whitespace/copy adjustments.
+41/-10 

Copy link
Contributor

⚠️ Deploy preview for PR #6960 did not become live after 3 attempts.
Please check Netlify or try manually: Preview URL

Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Consistency

Metadata field name casing is inconsistent between the "General" tab (PascalCase keys like Message, Path) and the certificate tabs (lowercase keys like message, cert_id). Confirm this reflects actual payload differences; if not, align casing and descriptions.

{{< tabs_start >}}
{{< tab_start "General" >}}

- `Message` (string): a human readable message from Tyk Gateway that adds detail about the event
- `Path` (string): the path of the API endpoint request that led to the event being fired
- `Origin` (string): origin data for the source of the request (if this exists)
- `Key` (string): the key that was used in the request
- `OriginatingRequest` (string): Based64-encoded [raw inbound request](#raw-request-data)

{{< tab_end >}}
{{< tab_start "CertificateExpiringSoon" >}}

- `message` (string): a human readable message from Tyk Gateway that adds detail about the event
- `cert_id` (string): the certificate ID
- `cert_name` (string): the name of the certificate
- `expires_at` (string): the date for when the certificate expires
- `days_remaining` (integer): the remaining days until the certificate expires
- `api_id`(string) : the ID of the API that triggered the event

{{< tab_end >}}
{{< tab_start "CertificateExpired" >}}

- `message` (string): a human readable message from Tyk Gateway that adds detail about the event
- `cert_id` (string): the certificate ID
- `cert_name` (string): the name of the certificate
- `expired_at` (string): the date when the certificate expired
- `days_since_expiry` (integer): the days since the certificate expired
- `api_id`(string) : the ID of the API that triggered the event

{{< tab_end >}}
{{< tabs_end >}}
Accuracy

Verify correctness of certificate metadata fields: expires_at vs expired_at, and presence/format of days_remaining/days_since_expiry and api_id. Ensure date formats and units are specified (e.g., ISO 8601, integer days) and match implementation.

{{< tab_start "CertificateExpiringSoon" >}}

- `message` (string): a human readable message from Tyk Gateway that adds detail about the event
- `cert_id` (string): the certificate ID
- `cert_name` (string): the name of the certificate
- `expires_at` (string): the date for when the certificate expires
- `days_remaining` (integer): the remaining days until the certificate expires
- `api_id`(string) : the ID of the API that triggered the event

{{< tab_end >}}
{{< tab_start "CertificateExpired" >}}

- `message` (string): a human readable message from Tyk Gateway that adds detail about the event
- `cert_id` (string): the certificate ID
- `cert_name` (string): the name of the certificate
- `expired_at` (string): the date when the certificate expired
- `days_since_expiry` (integer): the days since the certificate expired
- `api_id`(string) : the ID of the API that triggered the event
Cross-links

Consider adding anchor links or references from event type list to the corresponding metadata tabs for quick navigation, similar to other event sections if applicable.

### Certificate expiry events

- `CertificateExpiringSoon`: a certificate is about to expire within the expiry threshold
- `CertificateExpired`: a certificate has expired

Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Correct encoding term typo

Fix the typo "Based64-encoded" to "Base64-encoded" to avoid confusing users about
the encoding standard. This ensures accuracy in documentation for implementers
parsing the payload.

tyk-docs/content/api-management/gateway-events.md [126-131]

 - `Message` (string): a human readable message from Tyk Gateway that adds detail about the event
 - `Path` (string): the path of the API endpoint request that led to the event being fired
 - `Origin` (string): origin data for the source of the request (if this exists)
 - `Key` (string): the key that was used in the request
-- `OriginatingRequest` (string): Based64-encoded [raw inbound request](#raw-request-data)
+- `OriginatingRequest` (string): Base64-encoded [raw inbound request](#raw-request-data)
Suggestion importance[1-10]: 6

__

Why: The snippet matches the new hunk and fixes a clear typo from "Based64-encoded" to "Base64-encoded", improving accuracy without changing meaning.

Low
Specify timestamp formats clearly

Clarify the units and format for time-related fields to prevent ambiguity (e.g.,
RFC3339 for dates, integer days). Explicit formats reduce integration errors when
parsing event metadata.

tyk-docs/content/api-management/gateway-events.md [145-151]

 - `message` (string): a human readable message from Tyk Gateway that adds detail about the event
 - `cert_id` (string): the certificate ID
 - `cert_name` (string): the name of the certificate
-- `expired_at` (string): the date when the certificate expired
-- `days_since_expiry` (integer): the days since the certificate expired
-- `api_id`(string) : the ID of the API that triggered the event
+- `expired_at` (string, RFC3339 timestamp): the date-time when the certificate expired
+- `days_since_expiry` (integer): the number of whole days since the certificate expired
+- `api_id` (string): the ID of the API that triggered the event
Suggestion importance[1-10]: 5

__

Why: Adding RFC3339 clarification can reduce integration errors and aligns with common practice, but it assumes a format not confirmed by the PR; moderate usefulness if accurate.

Low
Align metadata key casing

Standardize field name casing to match the general metadata section, which uses
capitalized keys (e.g., Message). Inconsistent casing can mislead integrators and
break code relying on expected field names.

tyk-docs/content/api-management/gateway-events.md [135-141]

-- `message` (string): a human readable message from Tyk Gateway that adds detail about the event
-- `cert_id` (string): the certificate ID
-- `cert_name` (string): the name of the certificate
-- `expires_at` (string): the date for when the certificate expires
-- `days_remaining` (integer): the remaining days until the certificate expires
-- `api_id`(string) : the ID of the API that triggered the event
+- `Message` (string): a human readable message from Tyk Gateway that adds detail about the event
+- `CertID` (string): the certificate ID
+- `CertName` (string): the name of the certificate
+- `ExpiresAt` (string): the date for when the certificate expires
+- `DaysRemaining` (integer): the remaining days until the certificate expires
+- `ApiID` (string): the ID of the API that triggered the event
Suggestion importance[1-10]: 2

__

Why: The suggestion proposes changing field names that likely reflect actual payload keys; altering casing could mislead users and contradicts added docs that intentionally use lowercase, so impact is low and potentially harmful.

Low

Copy link

netlify bot commented Sep 23, 2025

PS. Add to the end of url /docs/nightly

Name Link
🔨 Latest commit 769fc3d
🔍 Latest deploy log https://app.netlify.com/projects/tyk-docs/deploys/68d2aad45c71a80008667cff
😎 Deploy Preview https://deploy-preview-6960--tyk-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

1 similar comment
Copy link

netlify bot commented Sep 23, 2025

PS. Add to the end of url /docs/nightly

Name Link
🔨 Latest commit 769fc3d
🔍 Latest deploy log https://app.netlify.com/projects/tyk-docs/deploys/68d2aad45c71a80008667cff
😎 Deploy Preview https://deploy-preview-6960--tyk-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Sep 23, 2025

PS. Add to the end of url /docs/nightly

Name Link
🔨 Latest commit 27d4a76
🔍 Latest deploy log https://app.netlify.com/projects/tyk-docs/deploys/68e7a150dca8760008074eaf
😎 Deploy Preview https://deploy-preview-6960--tyk-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@andyo-tyk andyo-tyk left a comment

Choose a reason for hiding this comment

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

LGTM

@sharadregoti sharadregoti changed the base branch from master to staging-docs-5-10 October 10, 2025 13:09
@sharadregoti sharadregoti merged commit 2f79fc3 into staging-docs-5-10 Oct 10, 2025
12 of 13 checks passed
@sharadregoti sharadregoti deleted the pvormste-certificate-expiry-events branch October 10, 2025 13:10
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.

4 participants