favorites

v0.5.4 v0.5.4
Vernon Keenan 2023-05-14 21:32:28 +00:00
parent e9c37cf71d
commit de5fff1e75
6 changed files with 50 additions and 0 deletions

View File

@ -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...)
}

View File

@ -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"`

View File

@ -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"`

View File

@ -23,6 +23,9 @@ Favorite:
Name:
type: string
x-nullable: true
Order:
type: integer
x-nullable: true
Path:
type: string
x-nullable: true

View File

@ -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:

View File

@ -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: