From: Bjørn Erik Pedersen Date: Thu, 1 Apr 2021 17:02:39 +0000 (+0200) Subject: output: Only output mediaType once in docshelper JSON X-Git-Tag: v0.83.0~61 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7b4ade56dd50d89a91760fc5ef8e2f151874de96;p=brevno-suite%2Fhugo output: Only output mediaType once in docshelper JSON Fixes #8379 --- diff --git a/output/outputFormat.go b/output/outputFormat.go index 1bd86d2c..9a081121 100644 --- a/output/outputFormat.go +++ b/output/outputFormat.go @@ -33,7 +33,7 @@ type Format struct { // can be overridden by providing a new definition for those types. Name string `json:"name"` - MediaType media.Type `json:"mediaType"` + MediaType media.Type `json:"-"` // Must be set to a value when there are two or more conflicting mediatype for the same resource. Path string `json:"path"` @@ -382,7 +382,7 @@ func (f Format) BaseFilename() string { func (f Format) MarshalJSON() ([]byte, error) { type Alias Format return json.Marshal(&struct { - MediaType string + MediaType string `json:"mediaType"` Alias }{ MediaType: f.MediaType.String(),