@@ -241,7 +241,7 @@ describe('Security Scheme Object', () => {
241241 expect ( members . get ( 0 ) . value . toValue ( ) ) . to . equal ( 'example' ) ;
242242 } ) ;
243243
244- it ( 'does not complain about scheme' , ( ) => {
244+ it ( 'provides warning for invalid scheme' , ( ) => {
245245 const securityScheme = new namespace . elements . Object ( {
246246 type : 'apiKey' ,
247247 name : 'example' ,
@@ -251,11 +251,11 @@ describe('Security Scheme Object', () => {
251251
252252 const parseResult = parse ( context , securityScheme ) ;
253253
254- expect ( parseResult . length ) . to . equal ( 1 ) ;
255- expect ( parseResult ) . to . not . contain . annotations ;
254+ expect ( parseResult . length ) . to . equal ( 2 ) ;
255+ expect ( parseResult ) . to . contain . warning ( "'Security Scheme Object' 'apiKey' contains invalid key 'scheme'" ) ;
256256 } ) ;
257257
258- it ( 'does not complain about flows' , ( ) => {
258+ it ( 'provides warning for invalid flows' , ( ) => {
259259 const securityScheme = new namespace . elements . Object ( {
260260 type : 'apiKey' ,
261261 name : 'example' ,
@@ -265,8 +265,8 @@ describe('Security Scheme Object', () => {
265265
266266 const parseResult = parse ( context , securityScheme ) ;
267267
268- expect ( parseResult . length ) . to . equal ( 1 ) ;
269- expect ( parseResult ) . to . not . contain . annotations ;
268+ expect ( parseResult . length ) . to . equal ( 2 ) ;
269+ expect ( parseResult ) . to . contain . warning ( "'Security Scheme Object' 'apiKey' contains invalid key 'flows'" ) ;
270270 } ) ;
271271 } ) ;
272272
@@ -320,7 +320,7 @@ describe('Security Scheme Object', () => {
320320 expect ( parseResult . get ( 0 ) . get ( 1 ) . description . toValue ( ) ) . to . equal ( 'oauth2 implementation' ) ;
321321 } ) ;
322322
323- it ( 'does not complain about name' , ( ) => {
323+ it ( 'provides warning for invalid name' , ( ) => {
324324 const securityScheme = new namespace . elements . Object ( {
325325 type : 'oauth2' ,
326326 flows : { } ,
@@ -329,11 +329,11 @@ describe('Security Scheme Object', () => {
329329
330330 const parseResult = parse ( context , securityScheme ) ;
331331
332- expect ( parseResult . length ) . to . equal ( 1 ) ;
333- expect ( parseResult ) . to . not . contain . annotations ;
332+ expect ( parseResult . length ) . to . equal ( 2 ) ;
333+ expect ( parseResult ) . to . contain . warning ( "'Security Scheme Object' 'oauth2' contains invalid key 'name'" ) ;
334334 } ) ;
335335
336- it ( 'does not complain about in' , ( ) => {
336+ it ( 'provides warning for invalid in' , ( ) => {
337337 const securityScheme = new namespace . elements . Object ( {
338338 type : 'oauth2' ,
339339 flows : { } ,
@@ -342,11 +342,11 @@ describe('Security Scheme Object', () => {
342342
343343 const parseResult = parse ( context , securityScheme ) ;
344344
345- expect ( parseResult . length ) . to . equal ( 1 ) ;
346- expect ( parseResult ) . to . not . contain . annotations ;
345+ expect ( parseResult . length ) . to . equal ( 2 ) ;
346+ expect ( parseResult ) . to . contain . warning ( "'Security Scheme Object' 'oauth2' contains invalid key 'in'" ) ;
347347 } ) ;
348348
349- it ( 'does not complain about scheme' , ( ) => {
349+ it ( 'provides warning for invalid scheme' , ( ) => {
350350 const securityScheme = new namespace . elements . Object ( {
351351 type : 'oauth2' ,
352352 flows : { } ,
@@ -355,8 +355,8 @@ describe('Security Scheme Object', () => {
355355
356356 const parseResult = parse ( context , securityScheme ) ;
357357
358- expect ( parseResult . length ) . to . equal ( 1 ) ;
359- expect ( parseResult ) . to . not . contain . annotations ;
358+ expect ( parseResult . length ) . to . equal ( 2 ) ;
359+ expect ( parseResult ) . to . contain . warning ( "'Security Scheme Object' 'oauth2' contains invalid key 'scheme'" ) ;
360360 } ) ;
361361 } ) ;
362362
@@ -375,7 +375,7 @@ describe('Security Scheme Object', () => {
375375 expect ( parseResult . get ( 0 ) . members . length ) . to . equal ( 0 ) ;
376376 } ) ;
377377
378- it ( 'does not complain about name' , ( ) => {
378+ it ( 'provides warning for invalid name' , ( ) => {
379379 const securityScheme = new namespace . elements . Object ( {
380380 type : 'http' ,
381381 scheme : 'basic' ,
@@ -384,11 +384,11 @@ describe('Security Scheme Object', () => {
384384
385385 const parseResult = parse ( context , securityScheme ) ;
386386
387- expect ( parseResult . length ) . to . equal ( 1 ) ;
388- expect ( parseResult ) . to . not . contain . annotations ;
387+ expect ( parseResult . length ) . to . equal ( 2 ) ;
388+ expect ( parseResult ) . to . contain . warning ( "'Security Scheme Object' 'http' contains invalid key 'name'" ) ;
389389 } ) ;
390390
391- it ( 'does not complain about in' , ( ) => {
391+ it ( 'provides warning for invalid in' , ( ) => {
392392 const securityScheme = new namespace . elements . Object ( {
393393 type : 'http' ,
394394 scheme : 'basic' ,
@@ -397,11 +397,11 @@ describe('Security Scheme Object', () => {
397397
398398 const parseResult = parse ( context , securityScheme ) ;
399399
400- expect ( parseResult . length ) . to . equal ( 1 ) ;
401- expect ( parseResult ) . to . not . contain . annotations ;
400+ expect ( parseResult . length ) . to . equal ( 2 ) ;
401+ expect ( parseResult ) . to . contain . warning ( "'Security Scheme Object' 'http' contains invalid key 'in'" ) ;
402402 } ) ;
403403
404- it ( 'does not complain about flows' , ( ) => {
404+ it ( 'provides warning for invalid flows' , ( ) => {
405405 const securityScheme = new namespace . elements . Object ( {
406406 type : 'http' ,
407407 scheme : 'basic' ,
@@ -410,8 +410,8 @@ describe('Security Scheme Object', () => {
410410
411411 const parseResult = parse ( context , securityScheme ) ;
412412
413- expect ( parseResult . length ) . to . equal ( 1 ) ;
414- expect ( parseResult ) . to . not . contain . annotations ;
413+ expect ( parseResult . length ) . to . equal ( 2 ) ;
414+ expect ( parseResult ) . to . contain . warning ( "'Security Scheme Object' 'http' contains invalid key 'flows'" ) ;
415415 } ) ;
416416 } ) ;
417417
0 commit comments