mirror of https://github.com/vernonkeenan/lib
parent
e9c37cf71d
commit
de5fff1e75
|
@ -88,6 +88,12 @@ type GetFavoritesParams struct {
|
|||
*/
|
||||
Offset *int64
|
||||
|
||||
/* UserID.
|
||||
|
||||
Internal User ID
|
||||
*/
|
||||
UserID string
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
|
@ -174,6 +180,17 @@ func (o *GetFavoritesParams) SetOffset(offset *int64) {
|
|||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WithUserID adds the userID to the get favorites params
|
||||
func (o *GetFavoritesParams) WithUserID(userID string) *GetFavoritesParams {
|
||||
o.SetUserID(userID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetUserID adds the userId to the get favorites params
|
||||
func (o *GetFavoritesParams) SetUserID(userID string) {
|
||||
o.UserID = userID
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetFavoritesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
|
@ -233,6 +250,16 @@ func (o *GetFavoritesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.
|
|||
}
|
||||
}
|
||||
|
||||
// query param userId
|
||||
qrUserID := o.UserID
|
||||
qUserID := qrUserID
|
||||
if qUserID != "" {
|
||||
|
||||
if err := r.SetQueryParam("userId", qUserID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
|
|
|
@ -45,6 +45,9 @@ type Favorite struct {
|
|||
// name
|
||||
Name *string `json:"Name,omitempty"`
|
||||
|
||||
// order
|
||||
Order *int64 `json:"Order,omitempty"`
|
||||
|
||||
// path
|
||||
Path *string `json:"Path,omitempty"`
|
||||
|
||||
|
|
|
@ -45,6 +45,9 @@ type Favorite struct {
|
|||
// name
|
||||
Name *string `json:"Name,omitempty"`
|
||||
|
||||
// order
|
||||
Order *int64 `json:"Order,omitempty"`
|
||||
|
||||
// path
|
||||
Path *string `json:"Path,omitempty"`
|
||||
|
||||
|
|
|
@ -23,6 +23,9 @@ Favorite:
|
|||
Name:
|
||||
type: string
|
||||
x-nullable: true
|
||||
Order:
|
||||
type: integer
|
||||
x-nullable: true
|
||||
Path:
|
||||
type: string
|
||||
x-nullable: true
|
||||
|
|
|
@ -246,6 +246,12 @@ parameters:
|
|||
name: userId
|
||||
required: false
|
||||
type: string
|
||||
userIdQueryRequired:
|
||||
description: Internal User ID
|
||||
in: query
|
||||
name: userId
|
||||
required: true
|
||||
type: string
|
||||
contactIdQuery:
|
||||
description: Internal Contact ID (links to Account)
|
||||
in: query
|
||||
|
@ -1209,6 +1215,7 @@ paths:
|
|||
operationId: getFavorites
|
||||
parameters:
|
||||
- $ref: "#/parameters/idQuery"
|
||||
- $ref: "#/parameters/userIdQueryRequired"
|
||||
- $ref: "#/parameters/limitQuery"
|
||||
- $ref: "#/parameters/offsetQuery"
|
||||
responses:
|
||||
|
|
|
@ -246,6 +246,12 @@ parameters:
|
|||
name: userId
|
||||
required: false
|
||||
type: string
|
||||
userIdQueryRequired:
|
||||
description: Internal User ID
|
||||
in: query
|
||||
name: userId
|
||||
required: true
|
||||
type: string
|
||||
contactIdQuery:
|
||||
description: Internal Contact ID (links to Account)
|
||||
in: query
|
||||
|
@ -1209,6 +1215,7 @@ paths:
|
|||
operationId: getFavorites
|
||||
parameters:
|
||||
- $ref: "#/parameters/idQuery"
|
||||
- $ref: "#/parameters/userIdQueryRequired"
|
||||
- $ref: "#/parameters/limitQuery"
|
||||
- $ref: "#/parameters/offsetQuery"
|
||||
responses:
|
||||
|
|
Loading…
Reference in New Issue