diff --git a/.gitignore b/.gitignore index eb56850..92855d3 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ test-harness/docbox/** test-harness/testbox/** test-harness/logs/** test-harness/modules/** +test-harness/tests/resources/petstore/test.yaml # log files logs/** \ No newline at end of file diff --git a/test-harness/tests/specs/DocumentSpec.cfc b/test-harness/tests/specs/DocumentSpec.cfc index 9e03711..fb5bae4 100644 --- a/test-harness/tests/specs/DocumentSpec.cfc +++ b/test-harness/tests/specs/DocumentSpec.cfc @@ -30,19 +30,13 @@ component extends="BaseOpenAPISpec"{ .toHaveKey( "getDocument" ); // test that path items have resource IDs - var instanceDoc = DocumentObject.getDocument(); - - for( var pathKey in instanceDoc[ "paths" ] ){ - - expect( instanceDoc[ "paths" ][ pathKey ] ).toHaveKey( "x-resourceId" ); - - if( structKeyExists( instanceDoc[ "paths" ][ pathKey ], "methods" ) ){ - for( var methodKey in instanceDoc[ "paths" ][ pathKey ][ "methods" ] ){ - expect( instanceDoc[ "paths" ][ pathKey ][ "methods" ][ methodKey ] ).toHaveKey( "x-resourceId" ); - } - } - } + var instanceDoc = DocumentObject.getNormalizedDocument(); + expect( instanceDoc ).toHaveKey( "openapi" ) + .toHaveKey( "info" ) + .toHaveKey( "paths" ) + .toHaveKey( "servers" ) + .toHaveKey( "tags" ); } );