You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Base on it, I implemented a controller. But, in tests where I am using a declarative client. Calling endpoint looks like this:
HTTP Client Response Received (200) for Request: GET http://localhost.localdomain:33895/api/v1/colors
date: Tue, 3 Dec 2024 17:20:19 GMT
content-type: application/json
content-length: 4
Response Body
----
BLUE
----
Sending HTTP POST to http://localhost.localdomain:33895/api/v1/colors
Content-Type: application/json
host: localhost.localdomain:33895
Request Body
----
BLUE
----
Base on application/json content type, I expected that request body and request result will be something like this "BLUE".
I found a discussion with similar question: #11118
And my question is: is it applicable for micronaut-client? I mean, in case of string, micronaut-client expects raw/encoded JSON?
Why IMHO it is a bug, because when I use other client (lets say POSTMAN/CURL/IntelliJ HTTP) and send something like this:
POST /api/v1/colors HTTP/1.1
Content-Type: application/json
Host: localhost:8080
Content-Length: 6
"BLUE"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everyone.
My problem/question/concern is: Let say I have a defined API (OpenAPI) like this:
As a result of generation I have interface:
Base on it, I implemented a controller. But, in tests where I am using a declarative client. Calling endpoint looks like this:
Base on
application/json
content type, I expected that request body and request result will be something like this"BLUE"
.I found a discussion with similar question:
#11118
And my question is: is it applicable for micronaut-client? I mean, in case of string, micronaut-client expects raw/encoded JSON?
Why IMHO it is a bug, because when I use other client (lets say POSTMAN/CURL/IntelliJ HTTP) and send something like this:
and try do something like this:
I will receive:
In my situation, I cannot use
enum
assetColor
argument because of:micronaut-projects/micronaut-openapi#1896
Thank you in advance for your response, explanation.
Beta Was this translation helpful? Give feedback.
All reactions