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
I'm using SkipRequestBodyEncodeDecode very similar to the Upload/Download example.
I've been using one of the code generators using openapi files as input and it was not creating any code for the body portion of the respective command. When looking at the generated openapi section, there is no "requestBody" declared similar to when I would declare one in Payload.
I'm not an expert on openapi, and don't really know what exactly I would be expecting.
However, I have two use cases I would like to define:
The HTTP body is some unspecified json (required Content-Type json and maybe yaml)
The body could be anything as long as Content-Type is provided
In both case I would like to get a Reader on the content, exactly as it happens now when using SkipRequestBodyEncodeDecode, but have the right info included in openapi(3).json which would allow code generators to do the right thing.
Thanks
The text was updated successfully, but these errors were encountered:
I should have added that I expected something similar to what I get now when I declare a Field and then refer to that with Body(filedName) in HTTP:
"requestBody" : {
"content" : {
"application/json" : {
"example" : "Sapiente possimus commodi qui sint aut.",
"schema" : {
"description" : "Metadata content",
"example" : "Ipsa autem non sapiente labore iste voluptas.",
"type" : "string"
}
}
},
"description" : "Metadata content",
"required" : true
},
At the moment I seem to get around by defining a Field with type Byte, but specifically for usecase 2) above, I would really prefer a Reader as the payload can be rather large
Hello, I am not sure how best to enable this. Obviously not all use of SkipResponseBodyEncodeDecode result in responses being sent in JSON format (most don't in my experience). So, there would have to be a mechanism to tell Goa that this is the case here. This mechanism would probably need to be fairly generic to make it possible to support other content types. It might be possible to add a new special key to Meta that could be used to do this, I'd gladly welcome a contribution that did that.
I'm using
SkipRequestBodyEncodeDecode
very similar to the Upload/Download example.I've been using one of the code generators using
openapi
files as input and it was not creating any code for thebody
portion of the respective command. When looking at the generatedopenapi
section, there is no"requestBody"
declared similar to when I would declare one inPayload
.I'm not an expert on openapi, and don't really know what exactly I would be expecting.
However, I have two use cases I would like to define:
body
is some unspecified json (required Content-Type json and maybe yaml)body
could be anything as long as Content-Type is providedIn both case I would like to get a
Reader
on the content, exactly as it happens now when usingSkipRequestBodyEncodeDecode
, but have the right info included inopenapi(3).json
which would allow code generators to do the right thing.Thanks
The text was updated successfully, but these errors were encountered: