Skip to content

Commit

Permalink
output: Only output mediaType once in docshelper JSON
Browse files Browse the repository at this point in the history
Fixes #8379
  • Loading branch information
bep committed Apr 1, 2021
1 parent 7c7974b commit 7b4ade5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions output/outputFormat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 7b4ade5

Please sign in to comment.