Skip to content

Commit c0cc34c

Browse files
authored
chore: Rename destination types API endpoints (#129)
1 parent 3f072f9 commit c0cc34c

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

cmd/e2e/api_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ func (suite *basicSuite) TestTopicsAPI() {
952952
suite.RunAPITests(suite.T(), tests)
953953
}
954954

955-
func (suite *basicSuite) TestProvidersAPI() {
955+
func (suite *basicSuite) TestDestinationTypesAPI() {
956956
providerFieldSchema := map[string]interface{}{
957957
"type": "object",
958958
"required": []interface{}{"key", "type", "label", "description", "required"},
@@ -990,10 +990,10 @@ func (suite *basicSuite) TestProvidersAPI() {
990990

991991
tests := []APITest{
992992
{
993-
Name: "GET /providers",
993+
Name: "GET /destination-types",
994994
Request: suite.AuthRequest(httpclient.Request{
995995
Method: httpclient.MethodGET,
996-
Path: "/providers",
996+
Path: "/destination-types",
997997
}),
998998
Expected: APITestExpectation{
999999
Validate: map[string]any{
@@ -1014,10 +1014,10 @@ func (suite *basicSuite) TestProvidersAPI() {
10141014
},
10151015
},
10161016
{
1017-
Name: "GET /providers/webhook",
1017+
Name: "GET /destination-types/webhook",
10181018
Request: suite.AuthRequest(httpclient.Request{
10191019
Method: httpclient.MethodGET,
1020-
Path: "/providers/webhook",
1020+
Path: "/destination-types/webhook",
10211021
}),
10221022
Expected: APITestExpectation{
10231023
Validate: map[string]any{
@@ -1030,10 +1030,10 @@ func (suite *basicSuite) TestProvidersAPI() {
10301030
},
10311031
},
10321032
{
1033-
Name: "GET /providers/invalid",
1033+
Name: "GET /destination-types/invalid",
10341034
Request: suite.AuthRequest(httpclient.Request{
10351035
Method: httpclient.MethodGET,
1036-
Path: "/providers/invalid",
1036+
Path: "/destination-types/invalid",
10371037
}),
10381038
Expected: APITestExpectation{
10391039
Match: &httpclient.Response{

internal/services/api/router.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ func NewRouter(
105105

106106
adminRouter.GET("/topics", topicHandlers.List)
107107

108-
adminRouter.GET("/providers", destinationHandlers.ListProviderMetadata)
109-
adminRouter.GET("/providers/:type", destinationHandlers.RetrieveProviderMetadata)
108+
adminRouter.GET("/destination-types", destinationHandlers.ListProviderMetadata)
109+
adminRouter.GET("/destination-types/:type", destinationHandlers.RetrieveProviderMetadata)
110110

111111
return r
112112
}

0 commit comments

Comments
 (0)