Skip to content

Commit

Permalink
fix(http): update supported and default decoding method
Browse files Browse the repository at this point in the history
`auto` is the new default on the API side, this change updates the
provider to match.

Ref: LOG-18800
  • Loading branch information
mdeltito committed Dec 6, 2023
1 parent 5e6bb5d commit 93b693c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions internal/provider/models/sources/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ var HttpSourceResourceSchema = schema.Schema{
Required: false,
Optional: true,
Computed: true,
Default: stringdefault.StaticString("json"),
Default: stringdefault.StaticString("auto"),
Description: "The decoding method for converting frames into data events.",
Validators: []validator.String{
stringvalidator.OneOf(
"bytes", "json", "ndjson"),
stringvalidator.OneOf("bytes", "json", "ndjson", "auto"),
},
},
}, []string{"capture_metadata", "gateway_route_id"}),
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/models/sources/test/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestHttpSource(t *testing.T) {
"description": "my http description",
"generation_id": "0",
"title": "my http title",
"decoding": "json",
"decoding": "auto",
"capture_metadata": "false",
"pipeline_id": "#mezmo_pipeline.test_parent.id",
}),
Expand Down Expand Up @@ -112,7 +112,7 @@ func TestHttpSource(t *testing.T) {
"description": "This source provides gateway_route_id",
"generation_id": "0",
"title": "A shared http source",
"decoding": "json",
"decoding": "auto",
"capture_metadata": "false",
"pipeline_id": "#mezmo_pipeline.test_parent.id",
"gateway_route_id": "#mezmo_http_source.parent_source.gateway_route_id",
Expand Down

0 comments on commit 93b693c

Please sign in to comment.