Skip to content

Attribute Type Incorrect in CreateDOIContact Struct #23

@james-bjss

Description

@james-bjss

Issue

Currently the type for the Attribute field appears to be incorrect in the generated models.

The developer guides suggest this should be a map[string]interface{} however the field is a pointer to an interface type *interface{}. In its current state this field is not assignable. It is likely that this is also present in the other models (I noticed an open PR for a similar issue).

model_create_doi_contact.go

type CreateDoiContact struct {
	// Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes.
	Email string `json:"email"`
	// Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'}
	Attributes *interface{} `json:"attributes,omitempty"`
	// Lists under user account where contact should be added
	IncludeListIds []int64 `json:"includeListIds"`
	// Lists under user account where contact should not be added
	ExcludeListIds []int64 `json:"excludeListIds,omitempty"`
	// Id of the Double opt-in (DOI) template
	TemplateId int64 `json:"templateId"`
	// URL of the web page that user will be redirected to after clicking on the double opt in URL. When editing your DOI template you can reference this URL by using the tag {{ params.DOIurl }}.
	RedirectionUrl string `json:"redirectionUrl"`
}

Other Info

I tried regenerating the library using the latest swagger gen (v0.28.0) and noticed this changed to interface{} The following github discussion on the swagger project may be relevant:
go-swagger/go-swagger#1450 (comment)

For now I am going to fork this repo to make it usable.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions