fix missing slugs

v0.3.6 v0.3.6
Vernon Keenan 2023-04-07 00:34:49 +00:00
parent c4d77b493c
commit 9a96094d63
13 changed files with 119 additions and 241 deletions

View File

@ -175,4 +175,4 @@ swagger:
#
# copy external swagger files
#
scp ./swagger/external/*.yaml root@whm.noc.tnxs.net:/home/taxnexus/www/assets/swagger/
scp ./swagger/external/*.yaml root@whm.noc.tnxs.net:/home/taxassets/www/swagger/external

View File

@ -78,12 +78,6 @@ type GetAccountsParams struct {
*/
Active *bool
/* Email.
Email address used for identity lookup
*/
Email *string
/* Limit.
How many objects to return at one time
@ -106,6 +100,12 @@ type GetAccountsParams struct {
*/
Offset *int64
/* Slug.
The Slug of this Object
*/
Slug *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
@ -181,17 +181,6 @@ func (o *GetAccountsParams) SetActive(active *bool) {
o.Active = active
}
// WithEmail adds the email to the get accounts params
func (o *GetAccountsParams) WithEmail(email *string) *GetAccountsParams {
o.SetEmail(email)
return o
}
// SetEmail adds the email to the get accounts params
func (o *GetAccountsParams) SetEmail(email *string) {
o.Email = email
}
// WithLimit adds the limit to the get accounts params
func (o *GetAccountsParams) WithLimit(limit *int64) *GetAccountsParams {
o.SetLimit(limit)
@ -225,6 +214,17 @@ func (o *GetAccountsParams) SetOffset(offset *int64) {
o.Offset = offset
}
// WithSlug adds the slug to the get accounts params
func (o *GetAccountsParams) WithSlug(slug *string) *GetAccountsParams {
o.SetSlug(slug)
return o
}
// SetSlug adds the slug to the get accounts params
func (o *GetAccountsParams) SetSlug(slug *string) {
o.Slug = slug
}
// WriteToRequest writes these params to a swagger request
func (o *GetAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
@ -267,23 +267,6 @@ func (o *GetAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R
}
}
if o.Email != nil {
// query param email
var qrEmail string
if o.Email != nil {
qrEmail = *o.Email
}
qEmail := qrEmail
if qEmail != "" {
if err := r.SetQueryParam("email", qEmail); err != nil {
return err
}
}
}
if o.Limit != nil {
// query param limit
@ -335,6 +318,23 @@ func (o *GetAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R
}
}
if o.Slug != nil {
// query param slug
var qrSlug string
if o.Slug != nil {
qrSlug = *o.Slug
}
qSlug := qrSlug
if qSlug != "" {
if err := r.SetQueryParam("slug", qSlug); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}

View File

@ -92,12 +92,6 @@ type GetContactsParams struct {
*/
Limit *int64
/* Name.
The Name of this Object
*/
Name *string
/* Offset.
How many objects to skip?
@ -106,6 +100,12 @@ type GetContactsParams struct {
*/
Offset *int64
/* Slug.
The Slug of this Object
*/
Slug *string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
@ -203,17 +203,6 @@ func (o *GetContactsParams) SetLimit(limit *int64) {
o.Limit = limit
}
// WithName adds the name to the get contacts params
func (o *GetContactsParams) WithName(name *string) *GetContactsParams {
o.SetName(name)
return o
}
// SetName adds the name to the get contacts params
func (o *GetContactsParams) SetName(name *string) {
o.Name = name
}
// WithOffset adds the offset to the get contacts params
func (o *GetContactsParams) WithOffset(offset *int64) *GetContactsParams {
o.SetOffset(offset)
@ -225,6 +214,17 @@ func (o *GetContactsParams) SetOffset(offset *int64) {
o.Offset = offset
}
// WithSlug adds the slug to the get contacts params
func (o *GetContactsParams) WithSlug(slug *string) *GetContactsParams {
o.SetSlug(slug)
return o
}
// SetSlug adds the slug to the get contacts params
func (o *GetContactsParams) SetSlug(slug *string) {
o.Slug = slug
}
// WriteToRequest writes these params to a swagger request
func (o *GetContactsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
@ -301,23 +301,6 @@ func (o *GetContactsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R
}
}
if o.Name != nil {
// query param name
var qrName string
if o.Name != nil {
qrName = *o.Name
}
qName := qrName
if qName != "" {
if err := r.SetQueryParam("name", qName); err != nil {
return err
}
}
}
if o.Offset != nil {
// query param offset
@ -335,6 +318,23 @@ func (o *GetContactsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R
}
}
if o.Slug != nil {
// query param slug
var qrSlug string
if o.Slug != nil {
qrSlug = *o.Slug
}
qSlug := qrSlug
if qSlug != "" {
if err := r.SetQueryParam("slug", qSlug); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}

View File

@ -42,7 +42,7 @@ type ClientService interface {
/*
GetCompanies gets a list of companies
Return a list of all available Companies
Return all or a single company fully hydrated object
*/
func (a *Client) GetCompanies(params *GetCompaniesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompaniesOK, error) {
// TODO: Validate the params before sending

View File

@ -18,7 +18,6 @@ import (
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// NewGetCompaniesParams creates a new GetCompaniesParams object,
@ -66,40 +65,12 @@ GetCompaniesParams contains all the parameters to send to the API endpoint
*/
type GetCompaniesParams struct {
/* Active.
Only retrieve active records?
*/
Active *bool
/* CompanyID.
Record Id of an Company
*/
CompanyID *string
/* Limit.
How many objects to return at one time
Format: int64
*/
Limit *int64
/* Name.
The Name of this Object
*/
Name *string
/* Offset.
How many objects to skip?
Format: int64
*/
Offset *int64
timeout time.Duration
Context context.Context
HTTPClient *http.Client
@ -153,17 +124,6 @@ func (o *GetCompaniesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithActive adds the active to the get companies params
func (o *GetCompaniesParams) WithActive(active *bool) *GetCompaniesParams {
o.SetActive(active)
return o
}
// SetActive adds the active to the get companies params
func (o *GetCompaniesParams) SetActive(active *bool) {
o.Active = active
}
// WithCompanyID adds the companyID to the get companies params
func (o *GetCompaniesParams) WithCompanyID(companyID *string) *GetCompaniesParams {
o.SetCompanyID(companyID)
@ -175,39 +135,6 @@ func (o *GetCompaniesParams) SetCompanyID(companyID *string) {
o.CompanyID = companyID
}
// WithLimit adds the limit to the get companies params
func (o *GetCompaniesParams) WithLimit(limit *int64) *GetCompaniesParams {
o.SetLimit(limit)
return o
}
// SetLimit adds the limit to the get companies params
func (o *GetCompaniesParams) SetLimit(limit *int64) {
o.Limit = limit
}
// WithName adds the name to the get companies params
func (o *GetCompaniesParams) WithName(name *string) *GetCompaniesParams {
o.SetName(name)
return o
}
// SetName adds the name to the get companies params
func (o *GetCompaniesParams) SetName(name *string) {
o.Name = name
}
// WithOffset adds the offset to the get companies params
func (o *GetCompaniesParams) WithOffset(offset *int64) *GetCompaniesParams {
o.SetOffset(offset)
return o
}
// SetOffset adds the offset to the get companies params
func (o *GetCompaniesParams) SetOffset(offset *int64) {
o.Offset = offset
}
// WriteToRequest writes these params to a swagger request
func (o *GetCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
@ -216,23 +143,6 @@ func (o *GetCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.
}
var res []error
if o.Active != nil {
// query param active
var qrActive bool
if o.Active != nil {
qrActive = *o.Active
}
qActive := swag.FormatBool(qrActive)
if qActive != "" {
if err := r.SetQueryParam("active", qActive); err != nil {
return err
}
}
}
if o.CompanyID != nil {
// query param companyId
@ -250,57 +160,6 @@ func (o *GetCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.
}
}
if o.Limit != nil {
// query param limit
var qrLimit int64
if o.Limit != nil {
qrLimit = *o.Limit
}
qLimit := swag.FormatInt64(qrLimit)
if qLimit != "" {
if err := r.SetQueryParam("limit", qLimit); err != nil {
return err
}
}
}
if o.Name != nil {
// query param name
var qrName string
if o.Name != nil {
qrName = *o.Name
}
qName := qrName
if qName != "" {
if err := r.SetQueryParam("name", qName); err != nil {
return err
}
}
}
if o.Offset != nil {
// query param offset
var qrOffset int64
if o.Offset != nil {
qrOffset = *o.Offset
}
qOffset := swag.FormatInt64(qrOffset)
if qOffset != "" {
if err := r.SetQueryParam("offset", qOffset); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}

View File

@ -23,6 +23,9 @@ import (
// swagger:model Company
type Company struct {
// Account Id
AccountID string `json:"AccountID,omitempty"`
// Company Number
AccountNumber string `json:"AccountNumber,omitempty"`
@ -47,6 +50,9 @@ type Company struct {
// Company Products
CompanyProducts []*CompanyProduct `json:"CompanyProducts"`
// Company Crunchbase URL
CrunchbaseURL string `json:"CrunchbaseURL,omitempty"`
// Description of the Company
Description string `json:"Description,omitempty"`

View File

@ -109,6 +109,9 @@ type Contact struct {
// Full Name
Name string `json:"Name,omitempty"`
// Number of Investments
NumberInvestments float64 `json:"NumberInvestments,omitempty"`
// other address
OtherAddress *Address `json:"OtherAddress,omitempty"`

View File

@ -125,6 +125,12 @@ parameters:
name: offset
required: false
type: integer
slugQuery:
description: The Slug of this Object
in: query
name: slug
required: false
type: string
typeQuery:
description: The Type of this Object
in: query
@ -267,7 +273,7 @@ paths:
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/activeQuery"
- $ref: "#/parameters/accountIdQuery"
- $ref: "#/parameters/emailQuery"
- $ref: "#/parameters/slugQuery"
responses:
"200":
$ref: "#/responses/AccountResponse"
@ -556,8 +562,8 @@ paths:
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/contactIdQuery"
- $ref: "#/parameters/activeQuery"
- $ref: "#/parameters/slugQuery"
- $ref: "#/parameters/emailQuery"
- $ref: "#/parameters/nameQuery"
responses:
"200":
$ref: "#/responses/ContactResponse"

View File

@ -125,6 +125,12 @@ parameters:
name: offset
required: false
type: integer
slugQuery:
description: The Slug of this Object
in: query
name: slug
required: false
type: string
typeQuery:
description: The Type of this Object
in: query
@ -267,7 +273,7 @@ paths:
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/activeQuery"
- $ref: "#/parameters/accountIdQuery"
- $ref: "#/parameters/emailQuery"
- $ref: "#/parameters/slugQuery"
responses:
"200":
$ref: "#/responses/AccountResponse"
@ -556,8 +562,8 @@ paths:
- $ref: "#/parameters/offsetQuery"
- $ref: "#/parameters/contactIdQuery"
- $ref: "#/parameters/activeQuery"
- $ref: "#/parameters/slugQuery"
- $ref: "#/parameters/emailQuery"
- $ref: "#/parameters/nameQuery"
responses:
"200":
$ref: "#/responses/ContactResponse"

View File

@ -41,12 +41,6 @@ parameters:
name: limit
required: false
type: integer
nameQuery:
description: The Name of this Object
in: query
name: name
required: false
type: string
offsetQuery:
description: How many objects to skip?
format: int64
@ -104,14 +98,10 @@ responses:
paths:
/companies:
get:
description: Return a list of all available Companies
description: Return all or a single company fully hydrated object
operationId: getCompanies
parameters:
- $ref: "#/parameters/CompanyIdQuery"
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/nameQuery"
- $ref: "#/parameters/activeQuery"
- $ref: "#/parameters/offsetQuery"
responses:
"200":
$ref: "#/responses/CompanyResponse"
@ -160,6 +150,9 @@ definitions:
ID:
description: Company Id
type: string
AccountID:
description: Account Id
type: string
AccountNumber:
description: Company Number
type: string
@ -172,8 +165,6 @@ definitions:
description: Annual Revenue Estimate
format: double
type: number
ListingAddress:
$ref: "#/definitions/Address"
CloudRevenueTotal:
type: number
CloudType:
@ -182,6 +173,9 @@ definitions:
CloudYear:
description: The year company started cloud revenue
type: string
CrunchbaseURL:
description: Company Crunchbase URL
type: string
Description:
description: Description of the Company
type: string
@ -219,6 +213,8 @@ definitions:
LinkedIn:
description: Company LinkedIn URL
type: string
ListingAddress:
$ref: "#/definitions/Address"
Location:
description: Headquarters Location Description
type: string

View File

@ -2007,6 +2007,9 @@ definitions:
Name:
description: Full Name
type: string
NumberInvestments:
description: Number of Investments
type: number
OtherAddress:
$ref: "#/definitions/Address"
OtherPhone:

View File

@ -41,12 +41,6 @@ parameters:
name: limit
required: false
type: integer
nameQuery:
description: The Name of this Object
in: query
name: name
required: false
type: string
offsetQuery:
description: How many objects to skip?
format: int64
@ -104,14 +98,10 @@ responses:
paths:
/companies:
get:
description: Return a list of all available Companies
description: Return all or a single company fully hydrated object
operationId: getCompanies
parameters:
- $ref: "#/parameters/CompanyIdQuery"
- $ref: "#/parameters/limitQuery"
- $ref: "#/parameters/nameQuery"
- $ref: "#/parameters/activeQuery"
- $ref: "#/parameters/offsetQuery"
responses:
"200":
$ref: "#/responses/CompanyResponse"
@ -160,6 +150,9 @@ definitions:
ID:
description: Company Id
type: string
AccountID:
description: Account Id
type: string
AccountNumber:
description: Company Number
type: string
@ -172,8 +165,6 @@ definitions:
description: Annual Revenue Estimate
format: double
type: number
ListingAddress:
$ref: "#/definitions/Address"
CloudRevenueTotal:
type: number
CloudType:
@ -182,6 +173,9 @@ definitions:
CloudYear:
description: The year company started cloud revenue
type: string
CrunchbaseURL:
description: Company Crunchbase URL
type: string
Description:
description: Description of the Company
type: string
@ -219,6 +213,8 @@ definitions:
LinkedIn:
description: Company LinkedIn URL
type: string
ListingAddress:
$ref: "#/definitions/Address"
Location:
description: Headquarters Location Description
type: string

View File

@ -2007,6 +2007,9 @@ definitions:
Name:
description: Full Name
type: string
NumberInvestments:
description: Number of Investments
type: number
OtherAddress:
$ref: "#/definitions/Address"
OtherPhone: