We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A generated bash client can only send JSON objects, not JSON arrays or ordinary string payloads.
Example: Creating the following operation with a request body requiring a non-JSON string:
{ "put": { "operationId": "bar", "parameters": [ ], "requestBody": { "description": "String to be parsed", "content": { "application/json": { "schema": { "type": "string" } } }, "required": true } } }
On the server I would like to receive the raw string:
@PUT public void bar(String body) { System.out.println("Request body: " + body); }
At the time of writing my only option is to write the payload to a file or send it as JSON:
./client.sh --host http://localhost:8080 bar body==hello
The above results in the JSON blob: {"body": "hello world"}
{"body": "hello world"}
I would like to instead write: ./client.sh --host http://localhost:8080 bar --body=hello
./client.sh --host http://localhost:8080 bar --body=hello
And receive the string: hello
hello
I have considered a file with the payload but it is very awkward and cumbersome to use.
The text was updated successfully, but these errors were encountered:
agreed with that.
Is that something you can contribute? we can show you some good starting points.
Sorry, something went wrong.
Yes. I have made a local change that achieves the described solution and I will make a PR.
No branches or pull requests
Is your feature request related to a problem? Please describe.
A generated bash client can only send JSON objects, not JSON arrays or ordinary string payloads.
Example:
Creating the following operation with a request body requiring a non-JSON string:
On the server I would like to receive the raw string:
At the time of writing my only option is to write the payload to a file or send it as JSON:
./client.sh --host http://localhost:8080 bar body==hello
The above results in the JSON blob:
{"body": "hello world"}
Describe the solution you'd like
I would like to instead write:
./client.sh --host http://localhost:8080 bar --body=hello
And receive the string:
hello
Describe alternatives you've considered
I have considered a file with the payload but it is very awkward and cumbersome to use.
The text was updated successfully, but these errors were encountered: