@@ -326,18 +326,6 @@ describe('Openapi3 Operation Parameters', () => {
326326 ) )
327327 } )
328328
329- test ( 'Add style simple for path parameter' , async ( ) => {
330- const testId = 'add-style-simple-for-path-parameter'
331- const result = await compareFiles ( SUITE_ID , testId )
332- expect ( result ) . toEqual ( diffsMatcher ( [
333- expect . objectContaining ( {
334- action : DiffAction . add ,
335- afterDeclarationPaths : [ [ 'paths' , '/path1/{param1}' , 'get' , 'parameters' , 0 , 'style' ] ] ,
336- type : nonBreaking ,
337- } ) ,
338- ] ) )
339- } )
340-
341329 test ( 'Update style for path parameter' , async ( ) => {
342330 const testId = 'update-style-for-path-parameter'
343331 const result = await compareFiles ( SUITE_ID , testId )
@@ -350,42 +338,7 @@ describe('Openapi3 Operation Parameters', () => {
350338 } ) ,
351339 ] ) )
352340 } )
353-
354- test ( 'Add style form for query parameter' , async ( ) => {
355- const testId = 'add-style-form-for-query-parameter'
356- const result = await compareFiles ( SUITE_ID , testId )
357- expect ( result ) . toEqual ( diffsMatcher ( [
358- expect . objectContaining ( {
359- action : DiffAction . add ,
360- afterDeclarationPaths : [ [ ...OPERATION_PARAMETERS_PATH , 0 , 'style' ] ] ,
361- type : nonBreaking ,
362- } ) ,
363- ] ) )
364- } )
365-
366- test ( 'Add style simple for header parameter' , async ( ) => {
367- const testId = 'add-style-simple-for-header-parameter'
368- const result = await compareFiles ( SUITE_ID , testId )
369- expect ( result ) . toEqual ( diffsMatcher ( [
370- expect . objectContaining ( {
371- action : DiffAction . add ,
372- afterDeclarationPaths : [ [ ...OPERATION_PARAMETERS_PATH , 0 , 'style' ] ] ,
373- type : nonBreaking ,
374- } ) ,
375- ] ) )
376- } )
377-
378- test ( 'Add style form for cookie parameter' , async ( ) => {
379- const testId = 'add-style-form-for-cookie-parameter'
380- const result = await compareFiles ( SUITE_ID , testId )
381- expect ( result ) . toEqual ( diffsMatcher ( [
382- expect . objectContaining ( {
383- action : DiffAction . add ,
384- afterDeclarationPaths : [ [ ...OPERATION_PARAMETERS_PATH , 0 , 'style' ] ] ,
385- type : nonBreaking ,
386- } ) ,
387- ] ) )
388- } )
341+
389342
390343 // TODO: fixme
391344 test . skip ( 'Mark primitive parameter as exploded' , async ( ) => {
@@ -553,12 +506,6 @@ describe('Openapi3 Operation Parameters', () => {
553506 ) )
554507 } )
555508
556- test ( 'Explicitly prohibit reserved characters for query' , async ( ) => {
557- const testId = 'explicitly-prohibit-reserved-characters-for-query'
558- const result = await compareFiles ( SUITE_ID , testId )
559- expect ( result ) . toEqual ( [ ] )
560- } )
561-
562509 test ( 'Allow reserved characters for not query' , async ( ) => {
563510 const testId = 'allow-reserved-characters-for-not-query'
564511 const result = await compareFiles ( SUITE_ID , testId )
@@ -677,4 +624,103 @@ describe('Openapi3 Operation Parameters', () => {
677624 } ) ,
678625 ] ) )
679626 } )
627+
628+ describe ( 'Add/remove default values' , ( ) => {
629+
630+ test ( 'Add required attribute with default value for parameter' , async ( ) => {
631+ const testId = 'add-required-attribute-with-default-value-for-parameter'
632+ const result = await compareFiles ( SUITE_ID , testId )
633+ expect ( result ) . toEqual ( [ ] )
634+ } )
635+
636+ test ( 'Remove required attribute with default value from parameter' , async ( ) => {
637+ const testId = 'remove-required-attribute-with-default-value-from-parameter'
638+ const result = await compareFiles ( SUITE_ID , testId )
639+ expect ( result ) . toEqual ( [ ] )
640+ } )
641+
642+ test ( 'Add deprecated attribute with default value for parameter' , async ( ) => {
643+ const testId = 'add-deprecated-attribute-with-default-value-for-parameter'
644+ const result = await compareFiles ( SUITE_ID , testId )
645+ expect ( result ) . toEqual ( [ ] )
646+ } )
647+
648+ test ( 'Remove deprecated attribute with default value from parameter' , async ( ) => {
649+ const testId = 'remove-deprecated-attribute-with-default-value-from-parameter'
650+ const result = await compareFiles ( SUITE_ID , testId )
651+ expect ( result ) . toEqual ( [ ] )
652+ } )
653+
654+ test ( 'Add allowEmptyValue attribute with default value for parameter' , async ( ) => {
655+ const testId = 'add-allowEmptyValue-attribute-with-default-value-for-parameter'
656+ const result = await compareFiles ( SUITE_ID , testId )
657+ expect ( result ) . toEqual ( [ ] )
658+ } )
659+
660+ test ( 'Remove allowEmptyValue attribute with default value from parameter' , async ( ) => {
661+ const testId = 'remove-allowEmptyValue-attribute-with-default-value-from-parameter'
662+ const result = await compareFiles ( SUITE_ID , testId )
663+ expect ( result ) . toEqual ( [ ] )
664+ } )
665+
666+ test ( 'Add default style for path parameter' , async ( ) => {
667+ const testId = 'add-default-style-for-path-parameter'
668+ const result = await compareFiles ( SUITE_ID , testId )
669+ expect ( result ) . toEqual ( [ ] )
670+ } )
671+
672+ test ( 'Remove default style from path parameter' , async ( ) => {
673+ const testId = 'remove-default-style-from-path-parameter'
674+ const result = await compareFiles ( SUITE_ID , testId )
675+ expect ( result ) . toEqual ( [ ] )
676+ } )
677+
678+ test ( 'Add default style for query parameter' , async ( ) => {
679+ const testId = 'add-default-style-for-query-parameter'
680+ const result = await compareFiles ( SUITE_ID , testId )
681+ expect ( result ) . toEqual ( [ ] )
682+ } )
683+
684+ test ( 'Remove default style from query parameter' , async ( ) => {
685+ const testId = 'remove-default-style-from-query-parameter'
686+ const result = await compareFiles ( SUITE_ID , testId )
687+ expect ( result ) . toEqual ( [ ] )
688+ } )
689+
690+ test ( 'Add default style for header parameter' , async ( ) => {
691+ const testId = 'add-default-style-for-header-parameter'
692+ const result = await compareFiles ( SUITE_ID , testId )
693+ expect ( result ) . toEqual ( [ ] )
694+ } )
695+
696+ test ( 'Remove default style from header parameter' , async ( ) => {
697+ const testId = 'remove-default-style-from-header-parameter'
698+ const result = await compareFiles ( SUITE_ID , testId )
699+ expect ( result ) . toEqual ( [ ] )
700+ } )
701+
702+ test ( 'Add default style for cookie parameter' , async ( ) => {
703+ const testId = 'add-default-style-for-cookie-parameter'
704+ const result = await compareFiles ( SUITE_ID , testId )
705+ expect ( result ) . toEqual ( [ ] )
706+ } )
707+
708+ test ( 'Remove default style from cookie parameter' , async ( ) => {
709+ const testId = 'remove-default-style-from-cookie-parameter'
710+ const result = await compareFiles ( SUITE_ID , testId )
711+ expect ( result ) . toEqual ( [ ] )
712+ } )
713+
714+ test ( 'Add allowReserved attribute with default value for query parameter' , async ( ) => {
715+ const testId = 'add-allowReserved-attribute-with-default-value-for-query-parameter'
716+ const result = await compareFiles ( SUITE_ID , testId )
717+ expect ( result ) . toEqual ( [ ] )
718+ } )
719+
720+ test ( 'Remove allowReserved attribute with default value from query parameter' , async ( ) => {
721+ const testId = 'remove-allowReserved-attribute-with-default-value-from-query-parameter'
722+ const result = await compareFiles ( SUITE_ID , testId )
723+ expect ( result ) . toEqual ( [ ] )
724+ } )
725+ } )
680726} )
0 commit comments