Name is derived from the map key.
Closes #11947
b := newTestSitesBuilder(t).
WithSimpleConfigFileAndSettings(map[string]any{
"outputFormats": map[string]any{
- "humansTXT": map[string]any{
- "name": "HUMANS",
+ "HUMANS": map[string]any{
"mediaType": "text/plain",
"baseName": "humans",
"isPlainText": true,
}
newOutFormat := defaultOutputFormat
- newOutFormat.Name = k
if err := decode(mediaTypes, v, &newOutFormat); err != nil {
return f, nil, err
}
+ newOutFormat.Name = k
f = append(f, newOutFormat)
// The Name is used as an identifier. Internal output formats (i.e. html and rss)
// can be overridden by providing a new definition for those types.
// <docsmeta>{ "identifiers": ["html", "rss"] }</docsmeta>
- Name string `json:"name"`
+ Name string `json:"-"`
MediaType media.Type `json:"-"`