feat: generated pkg/rest
This commit is contained in:
parent
419c07886c
commit
5158c5d7c9
20 changed files with 4199 additions and 1 deletions
32
pkg/rest/oas_request_encoders_gen.go
Normal file
32
pkg/rest/oas_request_encoders_gen.go
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
// Code generated by ogen, DO NOT EDIT.
|
||||
|
||||
package gsn
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"net/http"
|
||||
|
||||
"github.com/go-faster/jx"
|
||||
|
||||
ht "github.com/ogen-go/ogen/http"
|
||||
)
|
||||
|
||||
func encodePerformPredictionRequest(
|
||||
req OptParameters,
|
||||
r *http.Request,
|
||||
) error {
|
||||
const contentType = "application/json"
|
||||
if !req.Set {
|
||||
// Keep request with empty body if value is not set.
|
||||
return nil
|
||||
}
|
||||
e := new(jx.Encoder)
|
||||
{
|
||||
if req.Set {
|
||||
req.Encode(e)
|
||||
}
|
||||
}
|
||||
encoded := e.Bytes()
|
||||
ht.SetBody(r, bytes.NewReader(encoded), contentType)
|
||||
return nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue