Skip to content

Standalone grpc extension transforms message keys to camel case #137

Open
@cadabrum

Description

@cadabrum

Proposal

wiremock-grpc-extension transforms snake case message keys to camel case

Reproduction steps

container: wiremock:3.9.1
wiremock-grpc-extension-standalone-0.8.1.jar

version:                      3.9.1
port:                         8080
enable-browser-proxying:      false
disable-banner:               false
no-request-journal:           false
verbose:                      false
 
extensions:                   grpc-admin-api,grpc,response-template,webhook

Messages defined in proto file:

message MyRequest {
    string job_id = 1;
}

message MyResponse {
    string job_id = 1;
}

stub:

    "response": {
        "status": 200,
        "body": "{\"job_id\": \"{{jsonPath request.body '$.jobId'}}\"}",
        "transformers": ["response-template"]
    }

grpcurl request:

grpcurl -d '{"job_id": "job_123" }' ...

Wiremock __admin/requests values:

request:
"body" : "{\n  \"jobId\": \"job_123\"\n}",

response:
      "body" : "{\"job_id\": \"job_123\"}"

Actual response body displayed by grpcurl:

{
  "jobId": "job_123"
}

References

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions