Skip to content

[TT-14879] Tyk Dashboard should use /api/apis/streams endpoints to create and import Tyk Stream APIs #7088

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

Merged
merged 1 commit into from
May 29, 2025

Conversation

buraksezer
Copy link
Contributor

@buraksezer buraksezer commented May 29, 2025

User description

PR for https://tyktech.atlassian.net/browse/TT-14879

This PR updates the bento config validator to the latest version.


PR Type

enhancement


Description

  • Updated bento-config-schema.json to the latest schema version

  • Added new CSV options: expected_headers and expected_number_of_fields

  • Introduced new xml_documents object for stream processing

  • Enhanced WebSocket config with heartbeat, stream_format, and ws_message_type


Changes walkthrough 📝

Relevant files
Enhancement
bento-config-schema.json
Enhance bento-config-schema with new stream and WebSocket fields

apidef/streams/bento/schema/bento-config-schema.json

  • Added expected_headers and expected_number_of_fields to CSV config
  • Introduced xml_documents object with cast and operator fields
  • Added WebSocket options: heartbeat, stream_format, ws_message_type
  • Updated schema to support new stream processing features
  • +35/-0   

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @buger
    Copy link
    Member

    buger commented May 29, 2025

    💔 The detected issue is not in one of the allowed statuses 💔

    Detected Status DoD Check
    Allowed Statuses In Dev,In Code Review,Ready for Testing,In Test,In Progress,In Review ✔️

    Please ensure your jira story is in one of the allowed statuses

    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

    Schema Consistency

    The new fields added to the schema (such as expected_headers, expected_number_of_fields, xml_documents, and new WebSocket options) should be validated for consistency with the rest of the schema and checked for correct integration with the consuming code.

            "expected_headers": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "expected_number_of_fields": {
              "type": "number"
            },
            "lazy_quotes": {
              "type": "boolean"
            },
            "parse_header_row": {
              "type": "boolean"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    {
      "properties": {
        "decompress": {
          "additionalProperties": false,
          "properties": {
            "algorithm": {
              "type": "string"
            },
            "into": {
              "$ref": "#/definitions/scanner"
            }
          },
          "required": [
            "algorithm"
          ],
          "type": "object"
        }
      },
      "type": "object"
    },
    {
      "properties": {
        "json_documents": {
          "additionalProperties": false,
          "properties": {},
          "type": "object"
        }
      },
      "type": "object"
    },
    {
      "properties": {
        "lines": {
          "additionalProperties": false,
          "properties": {
            "custom_delimiter": {
              "type": "string"
            },
            "max_buffer_size": {
              "type": "number"
            },
            "omit_empty": {
              "type": "boolean"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    {
      "properties": {
        "re_match": {
          "additionalProperties": false,
          "properties": {
            "max_buffer_size": {
              "type": "number"
            },
            "pattern": {
              "type": "string"
            }
          },
          "required": [
            "pattern"
          ],
          "type": "object"
        }
      },
      "type": "object"
    },
    {
      "properties": {
        "skip_bom": {
          "additionalProperties": false,
          "properties": {
            "into": {
              "$ref": "#/definitions/scanner"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    {
      "properties": {
        "switch": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "re_match_name": {
                "type": "string"
              },
              "scanner": {
                "$ref": "#/definitions/scanner"
              }
            },
            "required": [
              "scanner"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    {
      "properties": {
        "tar": {
          "additionalProperties": false,
          "properties": {},
          "type": "object"
        }
      },
      "type": "object"
    },
    {
      "properties": {
        "to_the_end": {
          "additionalProperties": false,
          "properties": {},
          "type": "object"
        }
      },
      "type": "object"
    },
    {
      "properties": {
        "xml_documents": {
          "additionalProperties": false,
          "properties": {
            "cast": {
              "type": "boolean"
            },
            "operator": {
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    Backward Compatibility

    Ensure that the newly introduced schema fields do not break backward compatibility for existing configurations and that optionality is handled as expected.

    "heartbeat": {
      "type": "string"
    },
    "key_file": {
      "type": "string"
    },
    "path": {
      "type": "string"
    },
    "ping_period": {
      "type": "string"
    },
    "pong_wait": {
      "type": "string"
    },
    "stream_format": {
      "type": "string"
    },
    "stream_path": {
      "type": "string"
    },
    "timeout": {
      "type": "string"
    },
    "write_wait": {
      "type": "string"
    },
    "ws_message_type": {
      "type": "string"
    },

    Copy link
    Contributor

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    Copy link
    Contributor

    API Changes

    no api changes detected

    @buraksezer buraksezer requested a review from kofoworola May 29, 2025 09:49
    Copy link

    @buraksezer buraksezer merged commit 8c27f68 into master May 29, 2025
    33 of 45 checks passed
    @buraksezer buraksezer deleted the fix/TT-14879/update-bento-config-schema branch May 29, 2025 10:36
    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.

    3 participants