Skip to content

Commit

Permalink
Merge pull request #29 from Avanis-GmbH/omitempty
Browse files Browse the repository at this point in the history
Fixed omitempty on booleans leading to missing values on false
  • Loading branch information
Valentin-Kaiser authored Apr 10, 2024
2 parents 5d1f259 + 1d64c32 commit a0f7092
Show file tree
Hide file tree
Showing 64 changed files with 123 additions and 123 deletions.
6 changes: 3 additions & 3 deletions model/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ type App struct {
AclRole *AclRole `json:"aclRole,omitempty"`
AclRoleId string `json:"aclRoleId,omitempty"` // required
ActionButtons []AppActionButton `json:"actionButtons,omitempty"`
Active bool `json:"active,omitempty"` // required
AllowDisable bool `json:"allowDisable,omitempty"` // required
Active bool `json:"activ"` // required
AllowDisable bool `json:"allowDisable"` // required
AppSecret string `json:"appSecret,omitempty"`
Author string `json:"author,omitempty"`
CmsBlocks []AppCmsBlock `json:"cmsBlocks,omitempty"`
Configurable bool `json:"configurable,omitempty"` // required
Configurable bool `json:"configurable"` // required
Cookies interface{} `json:"cookies,omitempty"`
Copyright string `json:"copyright,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion model/app_action_button.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type AppActionButton struct {
Entity string `json:"entity,omitempty"` // required
Id string `json:"id,omitempty"`
Label string `json:"label,omitempty"` // required
OpenNewTab bool `json:"openNewTab,omitempty"`
OpenNewTab bool `json:"openNewTab"`
Translated interface{} `json:"translated,omitempty"`
Translations []AppActionButtonTranslation `json:"translations,omitempty"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion model/app_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package model
import "time"

type AppTemplate struct {
Active bool `json:"active,omitempty"` // required
Active bool `json:"active"` // required
App *App `json:"app,omitempty"`
AppId string `json:"appId,omitempty"` // required
CreatedAt *time.Time `json:"createdAt,omitempty"`
Expand Down
8 changes: 4 additions & 4 deletions model/category.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package model
import "time"

type Category struct {
Active bool `json:"active,omitempty"`
Active bool `json:"active"`
AfterCategoryId string `json:"afterCategoryId,omitempty"`
AfterCategoryVersionId string `json:"afterCategoryVersionId,omitempty"`
AutoIncrement float64 `json:"autoIncrement,omitempty"`
Expand All @@ -16,14 +16,14 @@ type Category struct {
CreatedAt *time.Time `json:"createdAt,omitempty"`
CustomFields interface{} `json:"customFields,omitempty"`
Description string `json:"description"`
DisplayNestedProducts bool `json:"displayNestedProducts,omitempty"` // required
DisplayNestedProducts bool `json:"displayNestedProducts"` // required
ExternalLink string `json:"externalLink,omitempty"`
FooterSalesChannels []SalesChannel `json:"footerSalesChannels,omitempty"`
Id string `json:"id,omitempty"`
InternalLink string `json:"internalLink,omitempty"`
Keywords string `json:"keywords,omitempty"`
Level float64 `json:"level,omitempty"`
LinkNewTab bool `json:"linkNewTab,omitempty"`
LinkNewTab bool `json:"linkNewTab"`
LinkType string `json:"linkType,omitempty"`
MainCategories []MainCategory `json:"mainCategories,omitempty"`
Media *Media `json:"media,omitempty"`
Expand All @@ -50,5 +50,5 @@ type Category struct {
Type string `json:"type,omitempty"` // required
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
VersionId string `json:"versionId,omitempty"`
Visible bool `json:"visible,omitempty"`
Visible bool `json:"visible"`
}
2 changes: 1 addition & 1 deletion model/category_translation.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type CategoryTranslation struct {
Keywords string `json:"keywords,omitempty"`
Language *Language `json:"language,omitempty"`
LanguageId string `json:"languageId,omitempty"`
LinkNewTab bool `json:"linkNewTab,omitempty"`
LinkNewTab bool `json:"linkNewTab"`
LinkType string `json:"linkType,omitempty"`
MetaDescription string `json:"metaDescription,omitempty"`
MetaTitle string `json:"metaTitle,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion model/cms_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type CmsBlock struct {
CssClass string `json:"cssClass,omitempty"`
CustomFields interface{} `json:"customFields,omitempty"`
Id string `json:"id,omitempty"`
Locked bool `json:"locked,omitempty"`
Locked bool `json:"locked"`
MarginBottom string `json:"marginBottom,omitempty"`
MarginLeft string `json:"marginLeft,omitempty"`
MarginRight string `json:"marginRight,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion model/cms_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type CmsPage struct {
HomeSalesChannels []SalesChannel `json:"homeSalesChannels,omitempty"`
Id string `json:"id,omitempty"`
LandingPages []LandingPage `json:"landingPages,omitempty"`
Locked bool `json:"locked,omitempty"`
Locked bool `json:"locked"`
Name string `json:"name,omitempty"`
PreviewMedia *Media `json:"previewMedia,omitempty"`
PreviewMediaId string `json:"previewMediaId,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion model/cms_section.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type CmsSection struct {
CssClass string `json:"cssClass,omitempty"`
CustomFields interface{} `json:"customFields,omitempty"`
Id string `json:"id,omitempty"`
Locked bool `json:"locked,omitempty"`
Locked bool `json:"locked"`
MobileBehavior string `json:"mobileBehavior,omitempty"`
Name string `json:"name,omitempty"`
Page *CmsPage `json:"page,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion model/cms_slot.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type CmsSlot struct {
CustomFields interface{} `json:"customFields,omitempty"`
Data interface{} `json:"data,omitempty"`
Id string `json:"id,omitempty"`
Locked bool `json:"locked,omitempty"`
Locked bool `json:"locked"`
Slot string `json:"slot,omitempty"` // required
Translated interface{} `json:"translated,omitempty"`
Translations []CmsSlotTranslation `json:"translations,omitempty"`
Expand Down
16 changes: 8 additions & 8 deletions model/country.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ package model
import "time"

type Country struct {
Active bool `json:"active,omitempty"`
Active bool `json:"active"`
AddressFormat string `json:"addressFormat,omitempty"` // required
CheckVatIdPattern bool `json:"checkVatIdPattern,omitempty"`
CheckVatIdPattern bool `json:"checkVatIdPattern"`
CompanyTax interface{} `json:"companyTax,omitempty"`
CompanyTaxFree bool `json:"companyTaxFree,omitempty"`
CompanyTaxFree bool `json:"companyTaxFree"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
CurrencyCountryRoundings []CurrencyCountryRounding `json:"currencyCountryRoundings,omitempty"`
CustomerAddresses []CustomerAddress `json:"customerAddresses,omitempty"`
CustomerTax *CTax `json:"customerTax,omitempty"`
CustomFields *CTax `json:"customFields,omitempty"`
DisplayStateInRegistration bool `json:"displayStateInRegistration,omitempty"`
ForceStateInRegistration bool `json:"forceStateInRegistration,omitempty"`
DisplayStateInRegistration bool `json:"displayStateInRegistration"`
ForceStateInRegistration bool `json:"forceStateInRegistration"`
Id string `json:"id,omitempty"`
Iso string `json:"iso,omitempty"`
Iso3 string `json:"iso3,omitempty"`
Expand All @@ -23,13 +23,13 @@ type Country struct {
Position float64 `json:"position,omitempty"`
SalesChannelDefaultAssignments []SalesChannel `json:"salesChannelDefaultAssignments,omitempty"`
SalesChannels []SalesChannel `json:"salesChannels,omitempty"`
ShippingAvailable bool `json:"shippingAvailable,omitempty"`
ShippingAvailable bool `json:"shippingAvailable"`
States []CountryState `json:"states,omitempty"`
TaxFree bool `json:"taxFree,omitempty"`
TaxFree bool `json:"taxFree"`
TaxRules []TaxRule `json:"taxRules,omitempty"`
Translated interface{} `json:"translated,omitempty"`
Translations []CountryTranslation `json:"translations,omitempty"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
VatIdPattern string `json:"vatIdPattern,omitempty"`
VatIdRequired bool `json:"vatIdRequired,omitempty"`
VatIdRequired bool `json:"vatIdRequired"`
}
2 changes: 1 addition & 1 deletion model/country_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package model
import "time"

type CountryState struct {
Active bool `json:"active,omitempty"`
Active bool `json:"active"`
Country *Country `json:"country,omitempty"`
CountryId string `json:"countryId,omitempty"` // required
CreatedAt *time.Time `json:"createdAt,omitempty"`
Expand Down
8 changes: 4 additions & 4 deletions model/currency.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type Currency struct {
Factor float64 `json:"factor,omitempty"` // required
Id string `json:"id,omitempty"`
IsoCode string `json:"isoCode,omitempty"` // required
IsSystemDefault bool `json:"isSystemDefault,omitempty"`
IsSystemDefault bool `json:"isSystemDefault"`
ItemRounding Rounding `json:"itemRounding,omitempty"` // required
Name string `json:"name,omitempty"` // required
Orders []Order `json:"orders,omitempty"`
Expand All @@ -29,7 +29,7 @@ type Currency struct {
}

type Rounding struct {
Decimals int64 `json:"decimals,omitempty"` // required
Intervals int64 `json:"intervals,omitempty"` // required
RoundForNet bool `json:"roundForNet,omitempty"` // required
Decimals int64 `json:"decimals,omitempty"` // required
Intervals int64 `json:"intervals,omitempty"` // required
RoundForNet bool `json:"roundForNet"` // required
}
2 changes: 1 addition & 1 deletion model/custom_field.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package model
import "time"

type CustomField struct {
Active bool `json:"active,omitempty"`
Active bool `json:"active"`
Config interface{} `json:"config,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
CustomFieldSet *CustomFieldSet `json:"customFieldSet,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions model/custom_field_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package model
import "time"

type CustomFieldSet struct {
Active bool `json:"active,omitempty"`
Active bool `json:"active"`
App *App `json:"app,omitempty"`
AppId string `json:"appId,omitempty"`
Config interface{} `json:"config,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
CustomFields []CustomField `json:"customFields,omitempty"`
Global bool `json:"global,omitempty"`
Global bool `json:"global"`
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"` // required
Position float64 `json:"position,omitempty"`
Expand Down
8 changes: 4 additions & 4 deletions model/customer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package model
import "time"

type Customer struct {
Active bool `json:"active,omitempty"`
Active bool `json:"active"`
Addresses []CustomerAddress `json:"addresses,omitempty"`
AffiliateCode string `json:"affiliateCode,omitempty"`
AutoIncrement float64 `json:"autoIncrement,omitempty"`
Expand All @@ -23,13 +23,13 @@ type Customer struct {
DefaultShippingAddressId string `json:"defaultShippingAddressId,omitempty"`
DoubleOptInConfirmDate *time.Time `json:"doubleOptInConfirmDate,omitempty"`
DoubleOptInEmailSentDate *time.Time `json:"doubleOptInEmailSentDate,omitempty"`
DoubleOptInRegistration bool `json:"doubleOptInRegistration,omitempty"`
DoubleOptInRegistration bool `json:"doubleOptInRegistration"`
Email string `json:"email,omitempty"` // required
FirstLogin *time.Time `json:"firstLogin,omitempty"`
FirstName string `json:"firstName,omitempty"` // required
Group *CustomerGroup `json:"group,omitempty"`
GroupId string `json:"groupId,omitempty"` // required
Guest bool `json:"guest,omitempty"`
Guest bool `json:"guest"`
Hash string `json:"hash,omitempty"`
Id string `json:"id,omitempty"`
Language *Language `json:"language,omitempty"`
Expand All @@ -41,7 +41,7 @@ type Customer struct {
LastPaymentMethodId string `json:"lastPaymentMethodId,omitempty"`
LegacyEncoder string `json:"legacyEncoder,omitempty"`
LegacyPassword string `json:"legacyPassword,omitempty"`
Newsletter bool `json:"newsletter,omitempty"`
Newsletter bool `json:"newsletter"`
NewsletterSalesChannelIds interface{} `json:"newsletterSalesChannelIds,omitempty"`
OrderCount float64 `json:"orderCount,omitempty"`
OrderCustomers []OrderCustomer `json:"orderCustomers,omitempty"`
Expand Down
6 changes: 3 additions & 3 deletions model/customer_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ type CustomerGroup struct {
CreatedAt *time.Time `json:"createdAt,omitempty"`
Customers []Customer `json:"customers,omitempty"`
CustomFields interface{} `json:"customFields,omitempty"`
DisplayGross bool `json:"displayGross,omitempty"`
DisplayGross bool `json:"displayGross"`
Id string `json:"id,omitempty"`
Name string `json:"name,omitempty"` // required
RegistrationActive bool `json:"registrationActive,omitempty"`
RegistrationActive bool `json:"registrationActive"`
RegistrationIntroduction string `json:"registrationIntroduction,omitempty"`
RegistrationOnlyCompanyRegistration bool `json:"registrationOnlyCompanyRegistration,omitempty"`
RegistrationOnlyCompanyRegistration bool `json:"registrationOnlyCompanyRegistration"`
RegistrationSalesChannels []SalesChannel `json:"registrationSalesChannels,omitempty"`
RegistrationSeoMetaDescription string `json:"registrationSeoMetaDescription,omitempty"`
RegistrationTitle string `json:"registrationTitle,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion model/customer_group_translation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type CustomerGroupTranslation struct {
LanguageId string `json:"languageId,omitempty"`
Name string `json:"name,omitempty"`
RegistrationIntroduction string `json:"registrationIntroduction,omitempty"`
RegistrationOnlyCompanyRegistration bool `json:"registrationOnlyCompanyRegistration,omitempty"`
RegistrationOnlyCompanyRegistration bool `json:"registrationOnlyCompanyRegistration"`
RegistrationSeoMetaDescription string `json:"registrationSeoMetaDescription,omitempty"`
RegistrationTitle string `json:"registrationTitle,omitempty"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion model/dead_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "time"

type DeadMessage struct {
CreatedAt *time.Time `json:"createdAt,omitempty"`
Encrypted bool `json:"encrypted,omitempty"`
Encrypted bool `json:"encrypted"`
ErrorCount float64 `json:"errorCount,omitempty"`
Exception string `json:"exception,omitempty"`
ExceptionFile string `json:"exceptionFile,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions model/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Document struct {
OrderVersionId string `json:"orderVersionId,omitempty"`
ReferencedDocument *Document `json:"referencedDocument,omitempty"`
ReferencedDocumentId string `json:"referencedDocumentId,omitempty"`
Sent bool `json:"sent,omitempty"`
Static bool `json:"static,omitempty"`
Sent bool `json:"sent"`
Static bool `json:"static"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
}
2 changes: 1 addition & 1 deletion model/document_base_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type DocumentBaseConfig struct {
DocumentTypeId string `json:"documentTypeId,omitempty"` // required
FilenamePrefix string `json:"filenamePrefix,omitempty"`
FilenameSuffix string `json:"filenameSuffix,omitempty"`
Global bool `json:"global,omitempty"` // required
Global bool `json:"global"` // required
Id string `json:"id,omitempty"`
Logo *Media `json:"logo,omitempty"`
LogoId string `json:"logoId,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion model/event_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "time"

type EventAction struct {
ActionName string `json:"actionName,omitempty"`
Active bool `json:"active,omitempty"`
Active bool `json:"active"`
Config interface{} `json:"config,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
CustomFields interface{} `json:"customFields,omitempty"`
Expand Down
Loading

0 comments on commit a0f7092

Please sign in to comment.