update
This commit is contained in:
@@ -40,11 +40,11 @@ type CreateFeedbackParams struct {
|
||||
In: body
|
||||
*/
|
||||
Body *models.Feedback
|
||||
/*Session ID
|
||||
/*Session UUID
|
||||
Required: true
|
||||
In: query
|
||||
*/
|
||||
SessionID string
|
||||
SessionUUID string
|
||||
}
|
||||
|
||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
||||
@@ -86,8 +86,8 @@ func (o *CreateFeedbackParams) BindRequest(r *http.Request, route *middleware.Ma
|
||||
res = append(res, errors.Required("body", "body", ""))
|
||||
}
|
||||
|
||||
qSessionID, qhkSessionID, _ := qs.GetOK("session_id")
|
||||
if err := o.bindSessionID(qSessionID, qhkSessionID, route.Formats); err != nil {
|
||||
qSessionUUID, qhkSessionUUID, _ := qs.GetOK("session_uuid")
|
||||
if err := o.bindSessionUUID(qSessionUUID, qhkSessionUUID, route.Formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
if len(res) > 0 {
|
||||
@@ -96,10 +96,10 @@ func (o *CreateFeedbackParams) BindRequest(r *http.Request, route *middleware.Ma
|
||||
return nil
|
||||
}
|
||||
|
||||
// bindSessionID binds and validates parameter SessionID from query.
|
||||
func (o *CreateFeedbackParams) bindSessionID(rawData []string, hasKey bool, formats strfmt.Registry) error {
|
||||
// bindSessionUUID binds and validates parameter SessionUUID from query.
|
||||
func (o *CreateFeedbackParams) bindSessionUUID(rawData []string, hasKey bool, formats strfmt.Registry) error {
|
||||
if !hasKey {
|
||||
return errors.Required("session_id", "query", rawData)
|
||||
return errors.Required("session_uuid", "query", rawData)
|
||||
}
|
||||
var raw string
|
||||
if len(rawData) > 0 {
|
||||
@@ -109,10 +109,10 @@ func (o *CreateFeedbackParams) bindSessionID(rawData []string, hasKey bool, form
|
||||
// Required: true
|
||||
// AllowEmptyValue: false
|
||||
|
||||
if err := validate.RequiredString("session_id", "query", raw); err != nil {
|
||||
if err := validate.RequiredString("session_uuid", "query", raw); err != nil {
|
||||
return err
|
||||
}
|
||||
o.SessionID = raw
|
||||
o.SessionUUID = raw
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
// CreateFeedbackURL generates an URL for the create feedback operation
|
||||
type CreateFeedbackURL struct {
|
||||
SessionID string
|
||||
SessionUUID string
|
||||
|
||||
_basePath string
|
||||
// avoid unkeyed usage
|
||||
@@ -49,9 +49,9 @@ func (o *CreateFeedbackURL) Build() (*url.URL, error) {
|
||||
|
||||
qs := make(url.Values)
|
||||
|
||||
sessionIDQ := o.SessionID
|
||||
if sessionIDQ != "" {
|
||||
qs.Set("session_id", sessionIDQ)
|
||||
sessionUUIDQ := o.SessionUUID
|
||||
if sessionUUIDQ != "" {
|
||||
qs.Set("session_uuid", sessionUUIDQ)
|
||||
}
|
||||
|
||||
_result.RawQuery = qs.Encode()
|
||||
|
||||
@@ -32,11 +32,11 @@ type GetFeedbacksParams struct {
|
||||
// HTTP Request Object
|
||||
HTTPRequest *http.Request `json:"-"`
|
||||
|
||||
/*Session ID
|
||||
/*Session UUID
|
||||
Required: true
|
||||
In: query
|
||||
*/
|
||||
SessionID string
|
||||
SessionUUID string
|
||||
}
|
||||
|
||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
||||
@@ -50,8 +50,8 @@ func (o *GetFeedbacksParams) BindRequest(r *http.Request, route *middleware.Matc
|
||||
|
||||
qs := runtime.Values(r.URL.Query())
|
||||
|
||||
qSessionID, qhkSessionID, _ := qs.GetOK("session_id")
|
||||
if err := o.bindSessionID(qSessionID, qhkSessionID, route.Formats); err != nil {
|
||||
qSessionUUID, qhkSessionUUID, _ := qs.GetOK("session_uuid")
|
||||
if err := o.bindSessionUUID(qSessionUUID, qhkSessionUUID, route.Formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
if len(res) > 0 {
|
||||
@@ -60,10 +60,10 @@ func (o *GetFeedbacksParams) BindRequest(r *http.Request, route *middleware.Matc
|
||||
return nil
|
||||
}
|
||||
|
||||
// bindSessionID binds and validates parameter SessionID from query.
|
||||
func (o *GetFeedbacksParams) bindSessionID(rawData []string, hasKey bool, formats strfmt.Registry) error {
|
||||
// bindSessionUUID binds and validates parameter SessionUUID from query.
|
||||
func (o *GetFeedbacksParams) bindSessionUUID(rawData []string, hasKey bool, formats strfmt.Registry) error {
|
||||
if !hasKey {
|
||||
return errors.Required("session_id", "query", rawData)
|
||||
return errors.Required("session_uuid", "query", rawData)
|
||||
}
|
||||
var raw string
|
||||
if len(rawData) > 0 {
|
||||
@@ -73,10 +73,10 @@ func (o *GetFeedbacksParams) bindSessionID(rawData []string, hasKey bool, format
|
||||
// Required: true
|
||||
// AllowEmptyValue: false
|
||||
|
||||
if err := validate.RequiredString("session_id", "query", raw); err != nil {
|
||||
if err := validate.RequiredString("session_uuid", "query", raw); err != nil {
|
||||
return err
|
||||
}
|
||||
o.SessionID = raw
|
||||
o.SessionUUID = raw
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
// GetFeedbacksURL generates an URL for the get feedbacks operation
|
||||
type GetFeedbacksURL struct {
|
||||
SessionID string
|
||||
SessionUUID string
|
||||
|
||||
_basePath string
|
||||
// avoid unkeyed usage
|
||||
@@ -49,9 +49,9 @@ func (o *GetFeedbacksURL) Build() (*url.URL, error) {
|
||||
|
||||
qs := make(url.Values)
|
||||
|
||||
sessionIDQ := o.SessionID
|
||||
if sessionIDQ != "" {
|
||||
qs.Set("session_id", sessionIDQ)
|
||||
sessionUUIDQ := o.SessionUUID
|
||||
if sessionUUIDQ != "" {
|
||||
qs.Set("session_uuid", sessionUUIDQ)
|
||||
}
|
||||
|
||||
_result.RawQuery = qs.Encode()
|
||||
|
||||
Reference in New Issue
Block a user