Skip to content

Commit

Permalink
fix capitalization in JSON struct tag
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismarget-j committed Jul 22, 2023
1 parent 2da17b5 commit de4bd05
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions apstra/two_stage_l3_clos_connectivity_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ func (o rawConnectivityTemplatePolicy) attributes() (ConnectivityTemplatePrimiti
// Each "batch" policy, including the root batch keeps a list of child policies.
// These sub-policies are identified by ID. Each one is a "pipeline" policy.
type rawBatchAttributes struct {
Subpolicies []ObjectId `json:"Subpolicies"`
Subpolicies []ObjectId `json:"subpolicies"`
}

// rawPipelineAttributes
Expand Down Expand Up @@ -423,11 +423,7 @@ func rawBatch(id ObjectId, description, label string, subpolicies []*Connectivit
pipelines = append(pipelines, pipelineSlice...)
}

rawAttributes, err := json.Marshal(&struct {
Subpolicies []ObjectId `json:"Subpolicies"`
}{
Subpolicies: subpolicyIds,
})
rawAttributes, err := json.Marshal(&rawBatchAttributes{Subpolicies: subpolicyIds})
if err != nil {
return nil, fmt.Errorf("failed marshaling subpolicy ids for batch - %w", err)
}
Expand Down

0 comments on commit de4bd05

Please sign in to comment.