We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent baa6fbc commit adf3493Copy full SHA for adf3493
src/models/representationExample.ts
@@ -27,7 +27,7 @@ export class RepresentationExample {
27
*/
28
public readonly contentType: string
29
) {
30
- if (this.contentType.includes("/xml")) {
+ if (/\bxml\b/i.test(this.contentType)) {
31
this.value = Utils.formatXml(value);
32
this.format = "xml";
33
@@ -36,7 +36,7 @@ export class RepresentationExample {
36
}
37
38
39
- if (this.contentType.includes("/json")) {
+ if (/\bjson\b/i.test(this.contentType)) {
40
this.value = Utils.formatJson(value);
41
this.format = "json";
42
0 commit comments