@@ -25,13 +25,13 @@ type RoutesDataSource struct {
25
25
}
26
26
27
27
type RoutesDataSourceModel struct {
28
- Namespace types.String `tfsdk:"namespace "`
29
- Query types.String `tfsdk:"query"`
30
- Offset types.Int64 `tfsdk:"offset"`
31
- Limit types.Int64 `tfsdk:"limit"`
32
- OrderBy types.String `tfsdk:"order_by"`
33
- Routes []RouteModel `tfsdk:"routes"`
34
- TotalCount types.Int64 `tfsdk:"total_count"`
28
+ NamespaceID types.String `tfsdk:"namespace_id "`
29
+ Query types.String `tfsdk:"query"`
30
+ Offset types.Int64 `tfsdk:"offset"`
31
+ Limit types.Int64 `tfsdk:"limit"`
32
+ OrderBy types.String `tfsdk:"order_by"`
33
+ Routes []RouteModel `tfsdk:"routes"`
34
+ TotalCount types.Int64 `tfsdk:"total_count"`
35
35
}
36
36
37
37
func (d * RoutesDataSource ) Metadata (_ context.Context , req datasource.MetadataRequest , resp * datasource.MetadataResponse ) {
@@ -42,7 +42,7 @@ func (d *RoutesDataSource) Schema(_ context.Context, _ datasource.SchemaRequest,
42
42
resp .Schema = schema.Schema {
43
43
MarkdownDescription : "List all routes" ,
44
44
Attributes : map [string ]schema.Attribute {
45
- "namespace " : schema.StringAttribute {
45
+ "namespace_id " : schema.StringAttribute {
46
46
Optional : true ,
47
47
Description : "Namespace to list routes in." ,
48
48
},
@@ -105,7 +105,7 @@ func (d *RoutesDataSource) Read(ctx context.Context, req datasource.ReadRequest,
105
105
}
106
106
107
107
listReq := & pb.ListRoutesRequest {
108
- Namespace : data .Namespace .ValueString (),
108
+ Namespace : data .NamespaceID .ValueString (),
109
109
Query : data .Query .ValueStringPointer (),
110
110
Offset : data .Offset .ValueInt64Pointer (),
111
111
Limit : data .Limit .ValueInt64Pointer (),
0 commit comments