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

unable to call grpc method with namespace #1227

Closed
GomesNayagam opened this issue Dec 30, 2024 · 5 comments · Fixed by #1231
Closed

unable to call grpc method with namespace #1227

GomesNayagam opened this issue Dec 30, 2024 · 5 comments · Fixed by #1231
Assignees
Labels

Comments

@GomesNayagam
Copy link

GomesNayagam commented Dec 30, 2024

//option csharp_namespace = "NarrowTest";

package Policy;

service PolicyService { }
            server
                //.AddProtoDefinition(id, protoDefinitionText)
                .Given(
                    Request
                        .Create()
                        .UsingPost()
                        .WithHttpVersion("2")
                        .WithPath("/NarrowTest.Policy.PolicyService/GetVersion")
                )
                .WithProtoDefinition(id)
                .RespondWith(
                    Response
                        .Create()
                        .WithHeader("Content-Type", "application/grpc")
                        .WithTrailingHeader("grpc-status", "0")
                        .WithBodyAsProtoBuf(
                            protoDefinition,
                            "Policy.GetVersionResponse",
                            new { Version = "DevTr1" }
                        )
                        .WithTransformer()
                );
@StefH StefH self-assigned this Dec 31, 2024
@StefH
Copy link
Collaborator

StefH commented Dec 31, 2024

Did you try "Policy.PolicyService/GetVersion"?

Because I think that //option csharp_namespace = "NarrowTest"; is not yet supported.

@GomesNayagam
Copy link
Author

yes Policy.PolicyService/GetVersion works, so i commented teh option chartp_namespace now to move fwd.

@StefH
Copy link
Collaborator

StefH commented Jan 1, 2025

This is indeed a bug.

Will be fixed here
StefH/ProtoBufJsonConverter#23

@StefH StefH added bug and removed question labels Jan 4, 2025
@StefH
Copy link
Collaborator

StefH commented Jan 4, 2025

Also this is fixed by preview version 1.6.11-ci-19550, can you also test this one?

@StefH
Copy link
Collaborator

StefH commented Jan 7, 2025

@GomesNayagam
Can you please retry if preview 1.6.11-ci-19552 does also solve this namespace issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants