mirror of https://github.com/vernonkeenan/lib
feat: Replace AccountID with CompanyID in GetIndustryCompaniesParams and update related Swagger definitions
parent
6f44181e08
commit
7b878f86d5
|
@ -72,11 +72,11 @@ type GetIndustryCompaniesParams struct {
|
|||
*/
|
||||
Active *bool
|
||||
|
||||
/* Email.
|
||||
/* CompanyID.
|
||||
|
||||
Email address used for identity lookup
|
||||
Company record ID
|
||||
*/
|
||||
Email *string
|
||||
CompanyID *string
|
||||
|
||||
/* IndustryCompanyID.
|
||||
|
||||
|
@ -170,15 +170,15 @@ func (o *GetIndustryCompaniesParams) SetActive(active *bool) {
|
|||
o.Active = active
|
||||
}
|
||||
|
||||
// WithEmail adds the email to the get industry companies params
|
||||
func (o *GetIndustryCompaniesParams) WithEmail(email *string) *GetIndustryCompaniesParams {
|
||||
o.SetEmail(email)
|
||||
// WithCompanyID adds the companyID to the get industry companies params
|
||||
func (o *GetIndustryCompaniesParams) WithCompanyID(companyID *string) *GetIndustryCompaniesParams {
|
||||
o.SetCompanyID(companyID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetEmail adds the email to the get industry companies params
|
||||
func (o *GetIndustryCompaniesParams) SetEmail(email *string) {
|
||||
o.Email = email
|
||||
// SetCompanyID adds the companyId to the get industry companies params
|
||||
func (o *GetIndustryCompaniesParams) SetCompanyID(companyID *string) {
|
||||
o.CompanyID = companyID
|
||||
}
|
||||
|
||||
// WithIndustryCompanyID adds the industryCompanyID to the get industry companies params
|
||||
|
@ -250,18 +250,18 @@ func (o *GetIndustryCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg
|
|||
}
|
||||
}
|
||||
|
||||
if o.Email != nil {
|
||||
if o.CompanyID != nil {
|
||||
|
||||
// query param email
|
||||
var qrEmail string
|
||||
// query param companyId
|
||||
var qrCompanyID string
|
||||
|
||||
if o.Email != nil {
|
||||
qrEmail = *o.Email
|
||||
if o.CompanyID != nil {
|
||||
qrCompanyID = *o.CompanyID
|
||||
}
|
||||
qEmail := qrEmail
|
||||
if qEmail != "" {
|
||||
qCompanyID := qrCompanyID
|
||||
if qCompanyID != "" {
|
||||
|
||||
if err := r.SetQueryParam("email", qEmail); err != nil {
|
||||
if err := r.SetQueryParam("companyId", qCompanyID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@ import (
|
|||
// swagger:model IndustryCompany
|
||||
type IndustryCompany struct {
|
||||
|
||||
// account ID
|
||||
AccountID *string `json:"AccountID,omitempty"`
|
||||
// company ID
|
||||
CompanyID *string `json:"CompanyID,omitempty"`
|
||||
|
||||
// Created By User ID
|
||||
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||
|
|
|
@ -104,6 +104,12 @@ parameters:
|
|||
name: industryCompanyId
|
||||
required: false
|
||||
type: string
|
||||
companyIdQuery:
|
||||
description: Company record ID
|
||||
in: query
|
||||
name: companyId
|
||||
required: false
|
||||
type: string
|
||||
industryCompanyRequest:
|
||||
description: An array of new IndustryCompany records
|
||||
in: body
|
||||
|
@ -803,7 +809,7 @@ paths:
|
|||
- $ref: "#/parameters/offsetQuery"
|
||||
- $ref: "#/parameters/activeQuery"
|
||||
- $ref: "#/parameters/industryCompanyIdQuery"
|
||||
- $ref: "#/parameters/emailQuery"
|
||||
- $ref: "#/parameters/companyIdQuery"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/IndustryCompanyResponse"
|
||||
|
@ -1728,7 +1734,7 @@ definitions:
|
|||
IndustryCompany:
|
||||
description: Junction object between Industry and Company
|
||||
properties:
|
||||
AccountID:
|
||||
CompanyID:
|
||||
type: string
|
||||
x-nullable: true
|
||||
CreatedByID:
|
||||
|
|
|
@ -104,6 +104,12 @@ parameters:
|
|||
name: industryCompanyId
|
||||
required: false
|
||||
type: string
|
||||
companyIdQuery:
|
||||
description: Company record ID
|
||||
in: query
|
||||
name: companyId
|
||||
required: false
|
||||
type: string
|
||||
industryCompanyRequest:
|
||||
description: An array of new IndustryCompany records
|
||||
in: body
|
||||
|
@ -803,7 +809,7 @@ paths:
|
|||
- $ref: "#/parameters/offsetQuery"
|
||||
- $ref: "#/parameters/activeQuery"
|
||||
- $ref: "#/parameters/industryCompanyIdQuery"
|
||||
- $ref: "#/parameters/emailQuery"
|
||||
- $ref: "#/parameters/companyIdQuery"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/IndustryCompanyResponse"
|
||||
|
@ -1728,7 +1734,7 @@ definitions:
|
|||
IndustryCompany:
|
||||
description: Junction object between Industry and Company
|
||||
properties:
|
||||
AccountID:
|
||||
CompanyID:
|
||||
type: string
|
||||
x-nullable: true
|
||||
CreatedByID:
|
||||
|
|
Loading…
Reference in New Issue