forked from fabianrbz/kong-plugins-docs-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generate schema and validate example for new confluent plugin (#52)
- Loading branch information
1 parent
061fd3c
commit 705ed93
Showing
2 changed files
with
262 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: confluent | ||
config: | ||
bootstrap_servers: | ||
- host: example.com | ||
port: 80 | ||
producer_async: false | ||
topic: 'kong-test' | ||
cluster_api_key: CONFLUENT_CLUSTER_API_KEY | ||
cluster_api_secret: CONFLUENT_CLUSTER_API_SECRET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,253 @@ | ||
{ | ||
"entity_checks": [ | ||
|
||
], | ||
"fields": [ | ||
{ | ||
"protocols": { | ||
"description": "A set of strings representing HTTP protocols.", | ||
"default": [ | ||
"grpc", | ||
"grpcs", | ||
"http", | ||
"https" | ||
], | ||
"type": "set", | ||
"elements": { | ||
"type": "string", | ||
"one_of": [ | ||
"grpc", | ||
"grpcs", | ||
"http", | ||
"https" | ||
] | ||
}, | ||
"required": true | ||
} | ||
}, | ||
{ | ||
"consumer_group": { | ||
"description": "Custom type for representing a foreign key with a null value allowed.", | ||
"reference": "consumer_groups", | ||
"type": "foreign", | ||
"eq": null | ||
} | ||
}, | ||
{ | ||
"config": { | ||
"fields": [ | ||
{ | ||
"bootstrap_servers": { | ||
"description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", | ||
"type": "set", | ||
"elements": { | ||
"type": "record", | ||
"fields": [ | ||
{ | ||
"host": { | ||
"required": true, | ||
"type": "string", | ||
"description": "A string representing a host name, such as example.com." | ||
} | ||
}, | ||
{ | ||
"port": { | ||
"required": true, | ||
"between": [ | ||
0, | ||
65535 | ||
], | ||
"type": "integer", | ||
"description": "An integer representing a port number between 0 and 65535, inclusive." | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"topic": { | ||
"description": "The Kafka topic to publish to.", | ||
"type": "string", | ||
"required": true | ||
} | ||
}, | ||
{ | ||
"timeout": { | ||
"description": "Socket timeout in milliseconds.", | ||
"type": "integer", | ||
"default": 10000 | ||
} | ||
}, | ||
{ | ||
"keepalive": { | ||
"description": "Keepalive timeout in milliseconds.", | ||
"type": "integer", | ||
"default": 60000 | ||
} | ||
}, | ||
{ | ||
"keepalive_enabled": { | ||
"type": "boolean", | ||
"default": false | ||
} | ||
}, | ||
{ | ||
"cluster_api_key": { | ||
"description": "Username/Apikey for SASL authentication.", | ||
"encrypted": true, | ||
"required": true, | ||
"type": "string", | ||
"referenceable": true | ||
} | ||
}, | ||
{ | ||
"cluster_api_secret": { | ||
"description": "Password/ApiSecret for SASL authentication.", | ||
"encrypted": true, | ||
"required": true, | ||
"type": "string", | ||
"referenceable": true | ||
} | ||
}, | ||
{ | ||
"confluent_cloud_api_key": { | ||
"description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.", | ||
"encrypted": true, | ||
"required": false, | ||
"type": "string", | ||
"referenceable": true | ||
} | ||
}, | ||
{ | ||
"confluent_cloud_api_secret": { | ||
"description": "The corresponding secret for the Confluent Cloud API key.", | ||
"encrypted": true, | ||
"required": false, | ||
"type": "string", | ||
"referenceable": true | ||
} | ||
}, | ||
{ | ||
"forward_method": { | ||
"description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", | ||
"type": "boolean", | ||
"default": false | ||
} | ||
}, | ||
{ | ||
"forward_uri": { | ||
"description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", | ||
"type": "boolean", | ||
"default": false | ||
} | ||
}, | ||
{ | ||
"forward_headers": { | ||
"description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", | ||
"type": "boolean", | ||
"default": false | ||
} | ||
}, | ||
{ | ||
"forward_body": { | ||
"description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", | ||
"type": "boolean", | ||
"default": true | ||
} | ||
}, | ||
{ | ||
"cluster_name": { | ||
"description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", | ||
"auto": true, | ||
"type": "string", | ||
"required": false | ||
} | ||
}, | ||
{ | ||
"producer_request_acks": { | ||
"description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", | ||
"one_of": [ | ||
-1, | ||
0, | ||
1 | ||
], | ||
"type": "integer", | ||
"default": 1 | ||
} | ||
}, | ||
{ | ||
"producer_request_timeout": { | ||
"description": "Time to wait for a Produce response in milliseconds.", | ||
"type": "integer", | ||
"default": 2000 | ||
} | ||
}, | ||
{ | ||
"producer_request_limits_messages_per_request": { | ||
"description": "Maximum number of messages to include into a single producer request.", | ||
"type": "integer", | ||
"default": 200 | ||
} | ||
}, | ||
{ | ||
"producer_request_limits_bytes_per_request": { | ||
"description": "Maximum size of a Produce request in bytes.", | ||
"type": "integer", | ||
"default": 1048576 | ||
} | ||
}, | ||
{ | ||
"producer_request_retries_max_attempts": { | ||
"description": "Maximum number of retry attempts per single Produce request.", | ||
"type": "integer", | ||
"default": 10 | ||
} | ||
}, | ||
{ | ||
"producer_request_retries_backoff_timeout": { | ||
"description": "Backoff interval between retry attempts in milliseconds.", | ||
"type": "integer", | ||
"default": 100 | ||
} | ||
}, | ||
{ | ||
"producer_async": { | ||
"description": "Flag to enable asynchronous mode.", | ||
"type": "boolean", | ||
"default": true | ||
} | ||
}, | ||
{ | ||
"producer_async_flush_timeout": { | ||
"description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", | ||
"type": "integer", | ||
"default": 1000 | ||
} | ||
}, | ||
{ | ||
"producer_async_buffering_limits_messages_in_memory": { | ||
"description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", | ||
"type": "integer", | ||
"default": 50000 | ||
} | ||
} | ||
], | ||
"entity_checks": [ | ||
{ | ||
"custom_entity_check": { | ||
"field_sources": [ | ||
"forward_method", | ||
"forward_uri", | ||
"forward_headers", | ||
"forward_body" | ||
] | ||
} | ||
} | ||
], | ||
"type": "record", | ||
"required": true | ||
} | ||
} | ||
] | ||
} |