Skip to content
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

proto: fix topic name validation #1504

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
345 changes: 173 additions & 172 deletions backend/pkg/protogen/redpanda/api/console/v1alpha1/list_messages.pb.go

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/gen/openapi/openapi.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion proto/gen/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4122,7 +4122,7 @@ paths:
content:
multipart/form-data:
schema:
example: '{"name":"redact-orders", "input_topic_name":"orders", "output_topic_names":["orders-redacted"], "environment_variables":[{"key":"LOGGER_LEVEL", "value":"DEBUG"}]}'
example: '{"name":"redact-orders","input_topic_name":"orders","output_topic_names":["orders-redacted"],"environment_variables":[{"key":"LOGGER_LEVEL","value":"DEBUG"}]}'
properties:
metadata:
$ref: '#/components/schemas/DeployTransformRequest'
Expand Down
3 changes: 2 additions & 1 deletion proto/redpanda/api/console/v1alpha1/list_messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import "redpanda/api/console/v1alpha1/common.proto";
message ListMessagesRequest {
string topic = 1 [
(buf.validate.field).string.min_len = 1,
(buf.validate.field).string.max_len = 128
(buf.validate.field).string.max_len = 249,
(buf.validate.field).string.pattern = "^[a-zA-Z0-9._\\-]*$"
]; // Topic name.

sint64 start_offset = 2 [(buf.validate.field).sint64 = {
Expand Down
3 changes: 2 additions & 1 deletion proto/redpanda/api/console/v1alpha1/publish_messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import "redpanda/api/console/v1alpha1/common.proto";
message PublishMessageRequest {
string topic = 1 [
(buf.validate.field).string.min_len = 1,
(buf.validate.field).string.max_len = 128
(buf.validate.field).string.max_len = 249,
(buf.validate.field).string.pattern = "^[a-zA-Z0-9._\\-]*$"
]; // The topics to publish to.
int32 partition_id = 2 [(buf.validate.field).int32 = {gte: -1}]; // -1 for automatic partition assignment.
CompressionType compression = 3; // The compression to be used.
Expand Down
Loading