Skip to content

Conversation

buger
Copy link
Member

@buger buger commented Sep 24, 2025

User description

Triggered by: lghiur

Included:

Tyk Gateway: false
Tyk Dashboard: true
Tyk MDCB false
Tyk Pump false

Intended for: master
Changes sourced from: release-5.10.0
Config info generator branch: main

Note: Dashboard - Docs updates for 5.10.0 (branch suffix: docs)

JIRA: https://tyktech.atlassian.net/browse/TT-15720


PR Type

Documentation


Description

  • Update Dashboard API version to 5.10.0

  • Add organisation notifications API and schemas

  • Improve certificate listing and streams schema docs

  • Add config for certificate expiry monitoring


Diagram Walkthrough

flowchart LR
  docs["Dashboard Swagger (5.10.0)"]
  notices["Organisation Notifications API"]
  cert["Certificate expiry monitoring config"]
  schemas["New/updated schemas & descriptions"]

  docs -- "add /api/org/notifications" --> notices
  docs -- "add 422, descriptions, params" --> schemas
  content["dashboard-config.md"] -- "add notifications config" --> cert
  docs -- "bump version 5.10.0" --> schemas
Loading

File Walkthrough

Relevant files
Documentation
dashboard-swagger.yml
Swagger: 5.10.0, org notifications API, schema updates     

tyk-docs/assets/others/dashboard-swagger.yml

  • Bump API version to 5.10.0.
  • Add tag and endpoint /api/org/notifications with responses.
  • Add new schemas: OrganisationNotification, CertificateExpiryData.
  • Improve descriptions, examples, and params; add 422 response; refine
    cert filters; enhance Streams OAS description.
+111/-10
dashboard-config.md
Config docs: certificate expiry monitor and clarifications

tyk-docs/content/shared/dashboard-config.md

  • Document notifications.certificate_expiry_monitor settings.
  • Add env vars for metadata refresh and warning threshold.
  • Clarify OAS dots escaping note and TIB host URL format.
+17/-4   

Copy link
Contributor

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

The new query param description for certificate listing ('filter') changes default/behavior wording. Verify that 'omit' is indeed the default and works only with 'mode=detailed', and that this doesn’t contradict existing behavior or clients relying on previous description.

- description: |- 
    Defines the filtering strategy applied to certificate keys.
    This query param works only in combination with detailed mode (mode=detailed). 
    `omit` (default) – Returns all certificates regardless of private key association.
    with_pk – Returns only certificates that include a private key.
    without_pk – Returns only certificates that do not include a private key.
  name: filter
  example: omit
  required: false
API Examples

The example for organisation notifications includes future dates and a long cert_id string; validate these reflect real formats/lengths and timezone formatting used by the API, and confirm 'refresh' query param type should be boolean (currently documented as string).

/api/org/notifications:
  get:
    description: Retrieve all notifications for an organisation.
    operationId: getAllOrganisationNotifications
    parameters:
      - description: Setting refresh to true will force the API to refresh the list of notifications.
        example: 'true'
        in: query
        name: refresh
        required: false
        schema:
          type: string
    responses:
      "200":
        content:
         application/json:
            example:
              - id: b52f491a-2946-408b-9330-2736db85705b
                created_at: 2025-08-13T11:16:12.194968+02:00
                org_id: 683d6e6a954737af2aa8e5c2
                hash: '17090217262863020087'
                kind: warning
                topic: certificate.expiry
                title: Certificate will expire soon
                message: Certificate with ID 683d6e6a954737af2aa8e5c20d545f3211d5a53684114dc8b3ebb2503edf6fabf2e5812425be2fa108f3fb4d will expire in less than 18 days
                data:
                  cert_id: 683d6e6a954737af2aa8e5c20d545f3211d5a53684114dc8b3ebb2503edf6fabf2e5812425be2fa108f3fb4d
                  expiry_date: 2025-08-31T08:41:53Z
                  days_remaining: 17
            schema:
              type: array
              items:
                $ref: '#/components/schemas/OrganisationNotification'

        description: Returns a list of notifications for an organisation.
      "401":
        content:
          application/json:
            example:
              Message: Not authorised
              Meta: null
              Status: Error
        description: Unauthorized
      "403":
        content:
          application/json:
            example:
              Message: 'access denied: You do not have permission to access  /api/org/notifications'
              Meta: null
              Status: Error
        description: Forbidden
    summary: Retrieve notifications
    tags:
      - Organisation Notifications
Formatting

The updated TIB host URL line lost code formatting backticks around the URL pattern; ensure consistency with surrounding docs and whether https is allowed/required.

ENV: <b>TYK_DB_TIB_HOST_CONNECTIONSTRING</b><br />
Type: `string`<br />

The URL to the host. It must be in the form: http://domain:port.
Set this value only if you need to use external Tyk Identity Broker

### identity_broker.host.secret
ENV: <b>TYK_DB_TIB_HOST_SECRET</b><br />

Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Use boolean type for flag

The refresh query should be a boolean to avoid ambiguity and ensure correct client
generation. Update the schema type and example to boolean, and clarify accepted
values in the description.

tyk-docs/assets/others/dashboard-swagger.yml [9588-9599]

 /api/org/notifications:
   get:
     description: Retrieve all notifications for an organisation.
     operationId: getAllOrganisationNotifications
     parameters:
-      - description: Setting refresh to true will force the API to refresh the list of notifications.
-        example: 'true'
+      - description: Set to true to force a refresh of the notifications list.
+        example: true
         in: query
         name: refresh
         required: false
         schema:
-          type: string
+          type: boolean
Suggestion importance[1-10]: 8

__

Why: Changing refresh from string to boolean reduces ambiguity and improves OpenAPI client correctness; the existing snippet precisely matches the new /api/org/notifications parameter block.

Medium
General
Constrain filter values via enum

Avoid backticks and long unstructured prose in OpenAPI descriptions as some
generators render Markdown inconsistently. Also, provide the allowed values via an
enum to ensure clients validate input correctly.

tyk-docs/assets/others/dashboard-swagger.yml [4746-4755]

-- description: |- 
+- description: |-
     Defines the filtering strategy applied to certificate keys.
-    This query param works only in combination with detailed mode (mode=detailed). 
-    `omit` (default) – Returns all certificates regardless of private key association.
-    with_pk – Returns only certificates that include a private key.
-    without_pk – Returns only certificates that do not include a private key.
+    This query param works only with detailed mode (mode=detailed).
+    Values:
+    - omit (default): Returns all certificates regardless of private key association.
+    - with_pk: Returns only certificates that include a private key.
+    - without_pk: Returns only certificates that do not include a private key.
   name: filter
   example: omit
   required: false
+  schema:
+    type: string
+    enum: [omit, with_pk, without_pk]
Suggestion importance[1-10]: 7

__

Why: Mapping the filter query to an explicit enum in its schema improves validation and client generation; the snippet matches the new hunk context around lines 4746–4755 and the improved code aligns with the described change.

Medium
Specify formats and required fields

Add explicit formats for date-time fields and required properties to improve
validation and client generation. At minimum, mark created_at as format: date-time
and require core identifiers and message fields.

tyk-docs/assets/others/dashboard-swagger.yml [12627-12651]

 OrganisationNotification:
+  type: object
   properties:
     id:
       type: string
     created_at:
       type: string
+      format: date-time
     org_id:
       type: string
     hash:
       type: string
     kind:
       type: string
-      enum: [ "critical", "warning" ]
+      enum: [critical, warning]
     topic:
       type: string
-      enum: [ "certificate.expiry" ]
+      enum: [certificate.expiry]
     title:
       type: string
     message:
       type: string
     data:
       oneOf:
         - $ref: "#/components/schemas/CertificateExpiryData"
-  type: object
+  required:
+    - id
+    - created_at
+    - org_id
+    - kind
+    - topic
+    - title
+    - message
   x-go-package: github.com/TykTechnologies/tyk-analytics/dashboard/model
Suggestion importance[1-10]: 6

__

Why: Adding format: date-time and required increases schema robustness and client usability; while accurate and beneficial, it's a non-critical validation enhancement matching the new OrganisationNotification schema block.

Low

Copy link

netlify bot commented Sep 24, 2025

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

Name Link
🔨 Latest commit f11330e
🔍 Latest deploy log https://app.netlify.com/projects/tyk-docs/deploys/68d3d01e0c5b410008c05f3c
😎 Deploy Preview https://deploy-preview-6970--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 24, 2025

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

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

@lghiur lghiur changed the title [TT-15720] Update documentation for master [TT-15720] GW Update documentation for master - 5.10.0 Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants