diff --git a/api/application.go b/api/application.go index 93195c5c..7b3a2605 100644 --- a/api/application.go +++ b/api/application.go @@ -1058,7 +1058,7 @@ func (h ApplicationHandler) AssessmentCreate(ctx *gin.Context) { // // Application REST resource. type Application struct { - Resource + Resource `yaml:",inline"` Name string `json:"name" binding:"required"` Description string `json:"description"` Bucket *Ref `json:"bucket"` diff --git a/api/archetype.go b/api/archetype.go index eda38969..5ed78309 100644 --- a/api/archetype.go +++ b/api/archetype.go @@ -331,7 +331,7 @@ func (h ArchetypeHandler) AssessmentCreate(ctx *gin.Context) { // // Archetype REST resource. type Archetype struct { - Resource + Resource `yaml:",inline"` Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` Comments string `json:"comments" yaml:"comments"` diff --git a/api/assessment.go b/api/assessment.go index edc4fa84..d069c532 100644 --- a/api/assessment.go +++ b/api/assessment.go @@ -150,7 +150,7 @@ func (h AssessmentHandler) Update(ctx *gin.Context) { // // Assessment REST resource. type Assessment struct { - Resource + Resource `yaml:",inline"` Application *Ref `json:"application,omitempty" yaml:",omitempty" binding:"excluded_with=Archetype"` Archetype *Ref `json:"archetype,omitempty" yaml:",omitempty" binding:"excluded_with=Application"` Questionnaire Ref `json:"questionnaire" binding:"required"` diff --git a/api/bucket.go b/api/bucket.go index 20483deb..0f789f51 100644 --- a/api/bucket.go +++ b/api/bucket.go @@ -192,7 +192,7 @@ func (h BucketHandler) BucketDelete(ctx *gin.Context) { // // Bucket REST resource. type Bucket struct { - Resource + Resource `yaml:",inline"` Path string `json:"path"` Expiration *time.Time `json:"expiration,omitempty"` } diff --git a/api/businessservice.go b/api/businessservice.go index b506ddb0..8cf8025d 100644 --- a/api/businessservice.go +++ b/api/businessservice.go @@ -167,7 +167,7 @@ func (h BusinessServiceHandler) Update(ctx *gin.Context) { // // BusinessService REST resource. type BusinessService struct { - Resource + Resource `yaml:",inline"` Name string `json:"name" binding:"required"` Description string `json:"description"` Stakeholder *Ref `json:"owner"` diff --git a/api/dependency.go b/api/dependency.go index 525a5ec4..bb92bc1e 100644 --- a/api/dependency.go +++ b/api/dependency.go @@ -148,9 +148,9 @@ func (h DependencyHandler) Delete(ctx *gin.Context) { // // Dependency REST resource. type Dependency struct { - Resource - To Ref `json:"to"` - From Ref `json:"from"` + Resource `yaml:",inline"` + To Ref `json:"to"` + From Ref `json:"from"` } // diff --git a/api/group.go b/api/group.go index 4d88b067..4d9f54e2 100644 --- a/api/group.go +++ b/api/group.go @@ -179,7 +179,7 @@ func (h StakeholderGroupHandler) Update(ctx *gin.Context) { // // StakeholderGroup REST resource. type StakeholderGroup struct { - Resource + Resource `yaml:",inline"` Name string `json:"name" binding:"required"` Description string `json:"description"` Stakeholders []Ref `json:"stakeholders"` diff --git a/api/identity.go b/api/identity.go index b882573c..7f81eabf 100644 --- a/api/identity.go +++ b/api/identity.go @@ -231,7 +231,7 @@ func (h *IdentityHandler) setDecrypted(ctx *gin.Context) { // // Identity REST resource. type Identity struct { - Resource + Resource `yaml:",inline"` Kind string `json:"kind" binding:"required"` Name string `json:"name" binding:"required"` Description string `json:"description"` diff --git a/api/import.go b/api/import.go index 17a03b39..48ddf4af 100644 --- a/api/import.go +++ b/api/import.go @@ -419,7 +419,7 @@ type Import map[string]interface{} // // ImportSummary REST resource. type ImportSummary struct { - Resource + Resource `yaml:",inline"` Filename string `json:"filename"` ImportStatus string `json:"importStatus" yaml:"importStatus"` ImportTime time.Time `json:"importTime" yaml:"importTime"` diff --git a/api/jobfunction.go b/api/jobfunction.go index e5ce1e0a..a11a7115 100644 --- a/api/jobfunction.go +++ b/api/jobfunction.go @@ -167,7 +167,7 @@ func (h JobFunctionHandler) Update(ctx *gin.Context) { // // JobFunction REST resource. type JobFunction struct { - Resource + Resource `yaml:",inline"` Name string `json:"name" binding:"required"` Stakeholders []Ref `json:"stakeholders"` } diff --git a/api/migrationwave.go b/api/migrationwave.go index 16ea85fc..a2290d8b 100644 --- a/api/migrationwave.go +++ b/api/migrationwave.go @@ -183,7 +183,7 @@ func (h MigrationWaveHandler) Delete(ctx *gin.Context) { // // MigrationWave REST Resource type MigrationWave struct { - Resource + Resource `yaml:",inline"` Name string `json:"name"` StartDate time.Time `json:"startDate" yaml:"startDate"` EndDate time.Time `json:"endDate" yaml:"endDate"` diff --git a/api/proxy.go b/api/proxy.go index e7aecaf8..cf7144e1 100644 --- a/api/proxy.go +++ b/api/proxy.go @@ -174,7 +174,7 @@ func (h ProxyHandler) Update(ctx *gin.Context) { // // Proxy REST resource. type Proxy struct { - Resource + Resource `yaml:",inline"` Enabled bool `json:"enabled"` Kind string `json:"kind" binding:"oneof=http https"` Host string `json:"host"` diff --git a/api/questionnaire.go b/api/questionnaire.go index cc7d3699..754f10aa 100644 --- a/api/questionnaire.go +++ b/api/questionnaire.go @@ -188,7 +188,7 @@ func (h QuestionnaireHandler) Update(ctx *gin.Context) { } type Questionnaire struct { - Resource + Resource `yaml:",inline"` Name string `json:"name" yaml:"name" binding:"required"` Description string `json:"description" yaml:"description"` Required bool `json:"required" yaml:"required"` diff --git a/api/review.go b/api/review.go index 102cdbdb..481149a3 100644 --- a/api/review.go +++ b/api/review.go @@ -224,7 +224,7 @@ func (h ReviewHandler) CopyReview(ctx *gin.Context) { // // Review REST resource. type Review struct { - Resource + Resource `yaml:",inline"` BusinessCriticality uint `json:"businessCriticality" yaml:"businessCriticality"` EffortEstimate string `json:"effortEstimate" yaml:"effortEstimate"` ProposedAction string `json:"proposedAction" yaml:"proposedAction"` diff --git a/api/ruleset.go b/api/ruleset.go index fd1d9991..0eff6906 100644 --- a/api/ruleset.go +++ b/api/ruleset.go @@ -301,7 +301,7 @@ func (h *RuleSetHandler) delete(ctx *gin.Context, id uint) (err error) { // // RuleSet REST resource. type RuleSet struct { - Resource + Resource `yaml:",inline"` Kind string `json:"kind,omitempty"` Name string `json:"name"` Description string `json:"description"` @@ -380,7 +380,7 @@ func (r *RuleSet) HasRule(id uint) (b bool) { // // Rule - REST Resource. type Rule struct { - Resource + Resource `yaml:",inline"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Labels []string `json:"labels,omitempty"` diff --git a/api/stakeholder.go b/api/stakeholder.go index f9f5afdc..975dc575 100644 --- a/api/stakeholder.go +++ b/api/stakeholder.go @@ -190,7 +190,7 @@ func (h StakeholderHandler) Update(ctx *gin.Context) { // // Stakeholder REST resource. type Stakeholder struct { - Resource + Resource `yaml:",inline"` Name string `json:"name" binding:"required"` Email string `json:"email" binding:"required"` Groups []Ref `json:"stakeholderGroups" yaml:"stakeholderGroups"` diff --git a/api/tag.go b/api/tag.go index d2e38545..115cdeb4 100644 --- a/api/tag.go +++ b/api/tag.go @@ -167,7 +167,7 @@ func (h TagHandler) Update(ctx *gin.Context) { // // Tag REST resource. type Tag struct { - Resource + Resource `yaml:",inline"` Name string `json:"name" binding:"required"` Category Ref `json:"category" binding:"required"` } diff --git a/api/tagcategory.go b/api/tagcategory.go index 4c87cbf3..75caff13 100644 --- a/api/tagcategory.go +++ b/api/tagcategory.go @@ -212,7 +212,7 @@ func (h TagCategoryHandler) TagList(ctx *gin.Context) { // // TagCategory REST resource. type TagCategory struct { - Resource + Resource `yaml:",inline"` Name string `json:"name" binding:"required"` Username string `json:"username"` Rank uint `json:"rank"` diff --git a/api/target.go b/api/target.go index 4c619ea4..877200d2 100644 --- a/api/target.go +++ b/api/target.go @@ -238,7 +238,7 @@ func (h TargetHandler) Update(ctx *gin.Context) { // // Target REST resource. type Target struct { - Resource + Resource `yaml:",inline"` Name string `json:"name"` Description string `json:"description"` Provider string `json:"provider,omitempty" yaml:",omitempty"` diff --git a/api/taskgroup.go b/api/taskgroup.go index 74cbcad6..49a12320 100644 --- a/api/taskgroup.go +++ b/api/taskgroup.go @@ -354,13 +354,13 @@ func (h TaskGroupHandler) BucketDelete(ctx *gin.Context) { // // TaskGroup REST resource. type TaskGroup struct { - Resource - Name string `json:"name"` - Addon string `json:"addon"` - Data interface{} `json:"data" swaggertype:"object" binding:"required"` - Bucket *Ref `json:"bucket,omitempty"` - State string `json:"state"` - Tasks []Task `json:"tasks"` + Resource `yaml:",inline"` + Name string `json:"name"` + Addon string `json:"addon"` + Data interface{} `json:"data" swaggertype:"object" binding:"required"` + Bucket *Ref `json:"bucket,omitempty"` + State string `json:"state"` + Tasks []Task `json:"tasks"` } // diff --git a/api/ticket.go b/api/ticket.go index 0a9e4d0c..11d28459 100644 --- a/api/ticket.go +++ b/api/ticket.go @@ -146,7 +146,7 @@ func (h TicketHandler) Delete(ctx *gin.Context) { // Ticket API Resource type Ticket struct { - Resource + Resource `yaml:",inline"` Kind string `json:"kind" binding:"required"` Reference string `json:"reference"` Link string `json:"link"` diff --git a/api/tracker.go b/api/tracker.go index 4f130de0..34d47567 100644 --- a/api/tracker.go +++ b/api/tracker.go @@ -311,7 +311,7 @@ func (h TrackerHandler) ProjectIssueTypeList(ctx *gin.Context) { // Tracker API Resource type Tracker struct { - Resource + Resource `yaml:",inline"` Name string `json:"name" binding:"required"` URL string `json:"url" binding:"required"` Kind string `json:"kind" binding:"required,oneof=jira-cloud jira-onprem"`