Skip to content

"field type *query.Filtering is not supported in query parameters" #180

@mewis

Description

@mewis

HI, I receive this error when calling my api and trying to filter
for example http://localhost:7778/api/clients?filter=key==123

I am trying to use protoc-gen-gorm to generate my services

I have setup in my proto file a message as such

message ListRequest {
    infoblox.api.FieldSelection fields = 1;
    infoblox.api.Pagination paging = 2;
    infoblox.api.Sorting order_by = 3;
    infoblox.api.Filtering filter = 4;
}

service ClientService {

    option (gorm.server).autogen = true;

   rpc List (ListRequest) returns (ListClientsResponse){
        option (google.api.http) = {
            get: "/api/clients"
        };
    };
}

I am using the patched version of gen swagger.

I also have in my server setup for my rest server

mux := runtime.NewServeMux(runtime.WithMetadata(func(ctx context.Context, req *http.Request) metadata.MD {
		return gateway.MetadataAnnotator(ctx, req)
	}))

and for the grpc server

interceptors := []grpc.UnaryServerInterceptor{
		gateway.UnaryServerInterceptor(),
	}

	log.Print("create new grpc server with config")
	server := grpc.NewServer(grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(interceptors...)))

Am I missing something?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions