@@ -46,6 +46,7 @@ spec = do
46 describe "OAuth2 Security Definitions with merged Scope" $ oAuth2SecurityDefinitionsExample <=> oAuth2SecurityDefinitionsExampleJSON
46 describe "OAuth2 Security Definitions with merged Scope" $ oAuth2SecurityDefinitionsExample <=> oAuth2SecurityDefinitionsExampleJSON
47 describe "Composition Schema Example" $ compositionSchemaExample <=> compositionSchemaExampleJSON
47 describe "Composition Schema Example" $ compositionSchemaExample <=> compositionSchemaExampleJSON
48 describe "Swagger Object" $ do
48 describe "Swagger Object" $ do
49+ context "Example with no paths" $ emptyPathsFieldExample <=> emptyPathsFieldExampleJSON
49 context "Todo Example" $ swaggerExample <=> swaggerExampleJSON
50 context "Todo Example" $ swaggerExample <=> swaggerExampleJSON
50 context "PetStore Example" $
51 context "PetStore Example" $
51 it "decodes successfully" $ do
52 it "decodes successfully" $ do
@@ -537,6 +538,18 @@ oAuth2SecurityDefinitionsExampleJSON = [aesonQQ|
537-- Swagger object
538-- Swagger object
538-- =======================================================================
539-- =======================================================================
541+emptyPathsFieldExample :: Swagger
542+emptyPathsFieldExample = mempty
544+emptyPathsFieldExampleJSON :: Value
545+emptyPathsFieldExampleJSON = [aesonQQ|
548+ "info": {"version": "", "title": ""},
540swaggerExample :: Swagger
553swaggerExample :: Swagger
541swaggerExample = mempty
554swaggerExample = mempty
542 & basePath ?~ "/"
555 & basePath ?~ "/"