Validate client text framesv3.1+

This example validates that client text frames:

  • Are valid JSON
  • Are a JSON object ({})
  • Have a name attribute (of any type)

Set up the plugin

Add this section to your declarative configuration file:

_format_version: "3.0"
plugins:
  - name: websocket-validator
    config:
      client:
        text:
          schema: '{ "type": "object", "required": ["name"] }'
          type: draft4
Copied to clipboard!

Did this doc help?

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!