-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
Ah my bad @minhaj10p. Can you actually make this change here -> /~https://github.com/docker/oscalkit/blob/3fb2c16f84b91d7c537bc85078cfca5e727573b4/metaschema/types.tmpl#L17 ... and re-run |
It looks like the struct for Profile. Is this the correct place to change? |
lol I'm 0 for 2. Wrong line. It actually needs to be fixed in the {{- range .Flags}}
{{- $cf := commentFlag .Name $m.DefineFlag}}
{{- range $cf}}
// {{ . }}
{{- end}}
{{- $dt := parseDatatype .Datatype $packageName}}
{{- if and (eq "id" .Name) (eq "profile" $packageName)}}
ID string `xml:"param-id,attr,omitempty" json:"id,omitempty"`
{{- else}}
{{toCamel .Name}} {{if eq "" $dt}}string{{else}}{{$dt}}{{end}} `xml:"{{ .Name }},attr,omitempty" json:"{{toLowerCamel .Name}},omitempty"`
{{- end}}
{{- end}}
... You can run |
@anweiss |
@minhaj10p I updated the code sample in my comment with a conditional ... check it again ... sorry for all the edits ... Go templates can be a bit finicky at times |
df92b96
to
9423f97
Compare
@anweiss The changes you did are working now! Much thanks for the help. PR updated. |
Awesome! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR addresses the discrepancy for
SetParam
struct: ID got reverted back toid
instead ofparam-id
in #40