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

Failure on spaces for strings #117

Closed
simplesteph opened this issue Oct 30, 2018 · 6 comments
Closed

Failure on spaces for strings #117

simplesteph opened this issue Oct 30, 2018 · 6 comments
Labels

Comments

@simplesteph
Copy link
Contributor

Seems to fail when entering a string with spaces

image

My proto:

message Blog {
    string id = 1;
    string author_id = 2;
    string title = 3;
    string content = 4;
}

message CreateBlogRequest {
    Blog blog = 1; // the id shouldn't matter
}

message CreateBlogResponse {
    Blog blog = 1; // the id will correspond to the one in MongoDB
}

service BlogService {
    rpc CreateBlog(CreateBlogRequest) returns (CreateBlogResponse){};
}
@ktr0731
Copy link
Owner

ktr0731 commented Oct 30, 2018

You have to quote the input string.
For example,

name (TYPE_STRING) => foo bar
invalid input string

name (TYPE_STRING) => 'foo bar'
{
  "message": "hello, foo bar"
}

name (TYPE_STRING) => "foo bar"
{
  "message": "hello, foo bar"
}

name (TYPE_STRING) => '"foo bar"'
{
  "message": "hello, \"foo bar\""
}

@simplesteph
Copy link
Contributor Author

any chance we don't have to quote the string (as a feature)? It's un-intuitive from a UX perspective IMO.

@ktr0731
Copy link
Owner

ktr0731 commented Oct 30, 2018

Just you said, it is not user-friendly.
I'm planning to change this feature to be able to input without quoting.

@simplesteph
Copy link
Contributor Author

thanks a lot, good luck!

@ktr0731
Copy link
Owner

ktr0731 commented Nov 7, 2018

In Evans 0.6.8, you can input without quoting!
Please try it out.

@simplesteph
Copy link
Contributor Author

working good stuff!

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

No branches or pull requests

2 participants