diff --git a/project.go b/project.go index 24ca6db..8dfccf2 100644 --- a/project.go +++ b/project.go @@ -25,10 +25,10 @@ type ProjectList []struct { // ProjectCategory represents a single project category type ProjectCategory struct { - Self string `json:"self" structs:"self"` - ID string `json:"id" structs:"id"` - Name string `json:"name" structs:"name"` - Description string `json:"description" structs:"description"` + Self string `json:"self" structs:"self,omitempty"` + ID string `json:"id" structs:"id,omitempty"` + Name string `json:"name" structs:"name,omitempty"` + Description string `json:"description" structs:"description,omitempty"` } // Project represents a JIRA Project. @@ -55,30 +55,30 @@ type Project struct { // Version represents a single release version of a project type Version struct { - Self string `json:"self" structs:"self"` - ID string `json:"id" structs:"id"` - Name string `json:"name" structs:"name"` - Archived bool `json:"archived" structs:"archived"` - Released bool `json:"released" structs:"released"` - ReleaseDate string `json:"releaseDate" structs:"releaseDate"` - UserReleaseDate string `json:"userReleaseDate" structs:"userReleaseDate"` - ProjectID int `json:"projectId" structs:"projectId"` // Unlike other IDs, this is returned as a number + Self string `json:"self" structs:"self,omitempty"` + ID string `json:"id" structs:"id,omitempty"` + Name string `json:"name" structs:"name,omitempty"` + Archived bool `json:"archived" structs:"archived,omitempty"` + Released bool `json:"released" structs:"released,omitempty"` + ReleaseDate string `json:"releaseDate" structs:"releaseDate,omitempty"` + UserReleaseDate string `json:"userReleaseDate" structs:"userReleaseDate,omitempty"` + ProjectID int `json:"projectId" structs:"projectId,omitempty"` // Unlike other IDs, this is returned as a number } // ProjectComponent represents a single component of a project type ProjectComponent struct { - Self string `json:"self" structs:"self"` - ID string `json:"id" structs:"id"` - Name string `json:"name" structs:"name"` - Description string `json:"description" structs:"description"` - Lead User `json:"lead" structs:"lead"` - AssigneeType string `json:"assigneeType" structs:"assigneeType"` - Assignee User `json:"assignee" structs:"assignee"` - RealAssigneeType string `json:"realAssigneeType" structs:"realAssigneeType"` - RealAssignee User `json:"realAssignee" structs:"realAssignee"` - IsAssigneeTypeValid bool `json:"isAssigneeTypeValid" structs:"isAssigneeTypeValid"` - Project string `json:"project" structs:"project"` - ProjectID int `json:"projectId" structs:"projectId"` + Self string `json:"self" structs:"self,omitempty"` + ID string `json:"id" structs:"id,omitempty"` + Name string `json:"name" structs:"name,omitempty"` + Description string `json:"description" structs:"description,omitempty"` + Lead User `json:"lead,omitempty" structs:"lead,omitempty"` + AssigneeType string `json:"assigneeType" structs:"assigneeType,omitempty"` + Assignee User `json:"assignee" structs:"assignee,omitempty"` + RealAssigneeType string `json:"realAssigneeType" structs:"realAssigneeType,omitempty"` + RealAssignee User `json:"realAssignee" structs:"realAssignee,omitempty"` + IsAssigneeTypeValid bool `json:"isAssigneeTypeValid" structs:"isAssigneeTypeValid,omitempty"` + Project string `json:"project" structs:"project,omitempty"` + ProjectID int `json:"projectId" structs:"projectId,omitempty"` } // GetList gets all projects form JIRA