Skip to content

Conversation

sharadregoti
Copy link
Contributor

@sharadregoti sharadregoti commented Oct 10, 2025

User description

…6960)

Contributor checklist

  • Reviewed PR Code suggestions and updated accordingly
  • Tyklings: Labled the PR with the relevant releases
  • Tyklings: Added Jira DX PR ticket to the subject

New Contributors



PR Type

Documentation


Description

  • Add certificate expiry event docs

  • Detail event-specific metadata fields

  • Clarify common event metadata format

  • Minor formatting cleanups in notes


Diagram Walkthrough

flowchart LR
  Events["New Events: Certificate Expiry"] -- "added" --> Types["CertificateExpiringSoon, CertificateExpired"]
  Types -- "metadata detailed" --> Metadata["Event-specific metadata sections"]
  Metadata -- "linked with" --> Common["Common event metadata"]
Loading

File Walkthrough

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

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

  • Add certificate expiry events: CertificateExpiringSoon,
    CertificateExpired.
  • Introduce detailed event-specific metadata sections for both.
  • Refactor common event metadata names and description.
  • Tidy note formatting and minor content edits.
+56/-23 

Copy link
Contributor

⚠️ Deploy preview for PR #7051 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

Common metadata keys were converted from capitalized names to lowercase with underscores removed (e.g., Message -> message). Verify these match actual payload field names emitted by Gateway to avoid misleading integrators and breaking existing examples.

- `message` (string): a human-readable message from Tyk Gateway that provides details 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
- `originating_request` (string): a Base64-encoded [raw inbound request]({{< ref "#raw-request-data" >}})
Accuracy

The link to raw request data changed to {{< ref "#raw-request-data" >}}. Confirm the anchor exists on this page after heading text changes to prevent a broken intra-page link.

- `originating_request` (string): a Base64-encoded [raw inbound request]({{< ref "#raw-request-data" >}})
Clarity

New certificate events list both common and event-specific fields; ensure overlap with common metadata is intentional and examples show a full payload for each event to avoid confusion.

<li>
<details>
<summary>CertificateExpiringSoon</summary>

- `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, RFC3339): the certificate expiry date
- `days_remaining` (integer): the remaining days until the certificate expires
- `api_id`(string): the ID of the API that triggered the event

</details>
</li>

<li>
<details>
<summary>CertificateExpired</summary>

- `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, RFC3339): the date when the certificate expired
- `days_since_expiry` (integer): the number of days since the certificate expired
- `api_id`(string): the ID of the API that triggered the event

</details>
</li>

</ul>

Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix internal link anchor

The anchor reference #raw-request-data may not resolve if the header slug differs or
changes. Use a Hugo ref to the canonical section to avoid broken links.

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

-- `originating_request` (string): a Base64-encoded [raw inbound request]({{< ref "#raw-request-data" >}})
+- `originating_request` (string): a Base64-encoded [raw inbound request]({{< ref "api-management/gateway-events#raw-request-data" >}})
Suggestion importance[1-10]: 7

__

Why: Replacing a bare anchor with a Hugo ref to the canonical section reduces risk of broken links and matches site conventions; the change is accurate for the shown line.

Medium
General
Fix type annotation spacing

Ensure consistent spacing in inline code labels to avoid rendering inconsistencies
and potential copy issues. Add a space before the type for api_id.

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

 - `days_remaining` (integer): the remaining days until the certificate expires
-- `api_id`(string): the ID of the API that triggered the event
+- `api_id` (string): the ID of the API that triggered the event
Suggestion importance[1-10]: 5

__

Why: This is a minor but valid formatting improvement; adding a space after the key name improves consistency without altering meaning.

Low
Clarify timestamp format

Clarify the exact timestamp format to prevent ambiguity. Specify RFC 3339 format
with example or explicitly state timezone (UTC) to avoid misinterpretation.

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

-- `expired_at` (string, RFC3339): the date when the certificate expired
+- `expired_at` (string, RFC3339, UTC): the date and time when the certificate expired (for example, 2025-01-15T13:45:30Z)
Suggestion importance[1-10]: 4

__

Why: Adding UTC and an example can help readers, but it’s optional editorial guidance rather than a correctness fix; ensure consistency with docs style before adopting.

Low

Copy link

netlify bot commented Oct 10, 2025

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

Name Link
🔨 Latest commit 2f79fc3
🔍 Latest deploy log https://app.netlify.com/projects/tyk-docs/deploys/68e905e335423f0008d674b6
😎 Deploy Preview https://deploy-preview-7051--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 Oct 10, 2025

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

Name Link
🔨 Latest commit bfebc3a
🔍 Latest deploy log https://app.netlify.com/projects/tyk-docs/deploys/68ed4d297673390008845744
😎 Deploy Preview https://deploy-preview-7051--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.

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.

5 participants