Skip to content

[BUG] Can't create policy with empty description #683

@SlavaUtesinov

Description

@SlavaUtesinov

What is the bug?

I can't create policy with empty description

How can one reproduce the bug?

Create policy with empty description

What is the expected behavior?

Policy with empty description created

Do you have any additional context?

type PolicyBody struct {
	PolicyID          string                   `json:"policy_id,omitempty"`
	// Description    string                   `json:"description,omitempty"`
	Description       string                   `json:"description"` // <-- fixed tag
	LastUpdatedTime   int64                    `json:"last_updated_time,omitempty"`
	SchemaVersion     int                      `json:"schema_version,omitempty"`
	ErrorNotification *PolicyErrorNotification `json:"error_notification"`
	DefaultState      string                   `json:"default_state"`
	States            []PolicyState            `json:"states"`
	Template          []Template               `json:"ism_template,omitempty"`
}

Description has omitempty tag, that is why empty string value will lead to the absence of this field at json.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions