Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8fbbe02

Browse filesBrowse files
hikhvarMarcin Romaszewicz
andauthored
fix: Use helper function to detect general JSON responses (#945)
With out this fix, there are no responses generated if for example the response type is 'application/vnd.api+json' Co-authored-by: Marcin Romaszewicz <47459980+deepmap-marcinr@users.noreply.github.com>
1 parent e9033d1 commit 8fbbe02
Copy full SHA for 8fbbe02

1 file changed

+1-1Lines changed: 1 addition & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎pkg/codegen/operations.go‎

Copy file name to clipboardExpand all lines: pkg/codegen/operations.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func (o *OperationDefinition) GetResponseTypeDefinitions() ([]ResponseTypeDefini
297297
case StringInArray(contentTypeName, contentTypesHalJSON):
298298
typeName = fmt.Sprintf("HALJSON%s", ToCamelCase(responseName))
299299
// JSON:
300-
case StringInArray(contentTypeName, contentTypesJSON):
300+
case StringInArray(contentTypeName, contentTypesJSON) || util.IsMediaTypeJson(contentTypeName):
301301
typeName = fmt.Sprintf("JSON%s", ToCamelCase(responseName))
302302
// YAML:
303303
case StringInArray(contentTypeName, contentTypesYAML):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.