You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO validate ct against https://tools.ietf.org/html/rfc6838#section-4.2
332
-
should(ct.indexOf('/')).be.greaterThan(-1,'content-type must match RFC 6838');
331
+
// validate ct against https://tools.ietf.org/html/rfc6838#section-4.2
332
+
should(/[a-zA-Z0-9!#$%^&\*_\-\+{}\|'.`~]+\/[a-zA-Z0-9!#$%^&\*_\-\+{}\|'.`~]+/.test(ct)).be.exactly(true,'media-type should match RFC6838 format');// this is a SHOULD not MUST
333
333
contextAppend(options,jptr.jpescape(ct));
334
334
varcontentType=content[ct];
335
335
should(contentType).be.an.Object();
@@ -828,6 +828,7 @@ function validateSync(openapi, options, callback) {
0 commit comments