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 Offset *int64
/* UserID.
Internal User ID
*/
UserID string
timeout time.Duration timeout time.Duration
Context context.Context Context context.Context
HTTPClient *http.Client HTTPClient *http.Client
@ -174,6 +180,17 @@ func (o *GetFavoritesParams) SetOffset(offset *int64) {
o.Offset = offset 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 // WriteToRequest writes these params to a swagger request
func (o *GetFavoritesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { 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 { if len(res) > 0 {
return errors.CompositeValidationError(res...) return errors.CompositeValidationError(res...)
} }

View File

@ -45,6 +45,9 @@ type Favorite struct {
// name // name
Name *string `json:"Name,omitempty"` Name *string `json:"Name,omitempty"`
// order
Order *int64 `json:"Order,omitempty"`
// path // path
Path *string `json:"Path,omitempty"` Path *string `json:"Path,omitempty"`

View File

@ -45,6 +45,9 @@ type Favorite struct {
// name // name
Name *string `json:"Name,omitempty"` Name *string `json:"Name,omitempty"`
// order
Order *int64 `json:"Order,omitempty"`
// path // path
Path *string `json:"Path,omitempty"` Path *string `json:"Path,omitempty"`

View File

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

View File

@ -246,6 +246,12 @@ parameters:
name: userId name: userId
required: false required: false
type: string type: string
userIdQueryRequired:
description: Internal User ID
in: query
name: userId
required: true
type: string
contactIdQuery: contactIdQuery:
description: Internal Contact ID (links to Account) description: Internal Contact ID (links to Account)
in: query in: query
@ -1209,6 +1215,7 @@ paths:
operationId: getFavorites operationId: getFavorites
parameters: parameters:
- $ref: "#/parameters/idQuery" - $ref: "#/parameters/idQuery"
- $ref: "#/parameters/userIdQueryRequired"
- $ref: "#/parameters/limitQuery" - $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/offsetQuery" - $ref: "#/parameters/offsetQuery"
responses: responses:

View File

@ -246,6 +246,12 @@ parameters:
name: userId name: userId
required: false required: false
type: string type: string
userIdQueryRequired:
description: Internal User ID
in: query
name: userId
required: true
type: string
contactIdQuery: contactIdQuery:
description: Internal Contact ID (links to Account) description: Internal Contact ID (links to Account)
in: query in: query
@ -1209,6 +1215,7 @@ paths:
operationId: getFavorites operationId: getFavorites
parameters: parameters:
- $ref: "#/parameters/idQuery" - $ref: "#/parameters/idQuery"
- $ref: "#/parameters/userIdQueryRequired"
- $ref: "#/parameters/limitQuery" - $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/offsetQuery" - $ref: "#/parameters/offsetQuery"
responses: responses: