Skip to content

Commit

Permalink
Merge pull request #155 from mtuzinskiy/media-type-with-charset
Browse files Browse the repository at this point in the history
Support json media types with charset

Fixes #154
  • Loading branch information
luisfpg authored Jun 14, 2021
2 parents c42cc33 + a482bf4 commit 269238a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/operation-variant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class OperationVariant {
}

mediaType = mediaType.toLowerCase();
if (mediaType.endsWith('/json') || mediaType.endsWith('+json')) {
if (mediaType.includes('/json') || mediaType.includes('+json')) {
return 'json';
} else if (mediaType.startsWith('text/')) {
return 'text';
Expand Down

0 comments on commit 269238a

Please sign in to comment.