@@ -402,29 +402,6 @@ public void testJsonExampleIncludingValueWithCommas() throws Exception {
402402 assertFileContains (path , "\\ \" acceptHeader\\ \" : \\ \" text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8\\ \" " );
403403 }
404404
405- @ Test
406- public void testDeprecatedEndpoint () throws Exception {
407-
408- File output = Files .createTempDirectory ("postmantest_" ).toFile ();
409- output .deleteOnExit ();
410-
411- final CodegenConfigurator configurator = new CodegenConfigurator ()
412- .setGeneratorName ("postman-collection" )
413- .setInputSpec ("src/test/resources/3_0/postman-collection/SampleProject.yaml" )
414- .setOutputDir (output .getAbsolutePath ().replace ("\\ " , "/" ));
415-
416- DefaultGenerator generator = new DefaultGenerator ();
417- List <File > files = generator .opts (configurator .toClientOptInput ()).generate ();
418-
419- System .out .println (files );
420- files .forEach (File ::deleteOnExit );
421-
422- Path path = Paths .get (output + "/postman.json" );
423- assertFileExists (path );
424- // verify request name (from path)
425- assertFileContains (path , "(DEPRECATED)" );
426- }
427-
428405 @ Test
429406 public void testGeneratedVariables () throws Exception {
430407
@@ -479,36 +456,6 @@ public void testSkipGeneratedVariables() throws IOException, Exception {
479456
480457 }
481458
482- @ Test
483- public void testHeaderParameters () throws IOException {
484-
485- File output = Files .createTempDirectory ("postmantest_" ).toFile ();
486- output .deleteOnExit ();
487-
488- final CodegenConfigurator configurator = new CodegenConfigurator ()
489- .setGeneratorName ("postman-collection" )
490- .setInputSpec ("./src/test/resources/SampleProject.yaml" )
491- .setInputSpec ("src/test/resources/3_0/postman-collection/SampleProject.yaml" )
492- .setOutputDir (output .getAbsolutePath ().replace ("\\ " , "/" ));
493-
494- final ClientOptInput clientOptInput = configurator .toClientOptInput ();
495- DefaultGenerator generator = new DefaultGenerator ();
496- List <File > files = generator .opts (clientOptInput ).generate ();
497-
498- files .forEach (File ::deleteOnExit );
499-
500- Path path = Paths .get (output + "/postman.json" );
501- TestUtils .assertFileExists (path );
502- TestUtils .assertFileContains (path , "{ \" key\" : \" Content-Type\" , \" value\" : \" application/json\" " );
503- TestUtils .assertFileContains (path , "{ \" key\" : \" Accept\" , \" value\" : \" application/json\" " );
504- // header without default value (disabled: true)
505- TestUtils .assertFileContains (path , "{ \" key\" : \" Custom-Header\" , \" value\" : \" \" , \" description\" : \" Custom HTTP header\" , \" disabled\" : true" );
506- // header with default value (disabled: false)
507- TestUtils .assertFileContains (path , "{ \" key\" : \" Another-Custom-Header\" , \" value\" : \" abc\" , \" description\" : \" Custom HTTP header with default\" , \" disabled\" : false" );
508-
509- }
510-
511-
512459 @ Test
513460 public void testFormatDescription () {
514461
@@ -755,27 +702,4 @@ public void testAddToMapUsingDefaultTag() {
755702 assertEquals (true , postmanV2Generator .codegenOperationsByTag .containsKey ("default" ));
756703 }
757704
758- @ Test
759- public void testRequiredQueryParameter () throws IOException {
760-
761- File output = Files .createTempDirectory ("postmantest_" ).toFile ();
762- output .deleteOnExit ();
763-
764- final CodegenConfigurator configurator = new CodegenConfigurator ()
765- .setGeneratorName ("postman-collection" )
766- .setInputSpec ("src/test/resources/3_0/postman-collection/SampleProject.yaml" )
767- .setOutputDir (output .getAbsolutePath ().replace ("\\ " , "/" ));
768-
769- DefaultGenerator generator = new DefaultGenerator ();
770- List <File > files = generator .opts (configurator .toClientOptInput ()).generate ();
771-
772- System .out .println (files );
773- files .forEach (File ::deleteOnExit );
774-
775- Path path = Paths .get (output + "/postman.json" );
776- TestUtils .assertFileExists (path );
777- // verify param pUserId is set as disabled=false
778- TestUtils .assertFileContains (path , "{ \" key\" : \" pUserId\" , \" value\" : \" 888\" , \" description\" : \" Query Id.\" , \" disabled\" : false" );
779-
780- }
781705}
0 commit comments