@@ -46,6 +46,7 @@ spec = do
4646 describe "OAuth2 Security Definitions with merged Scope" $ oAuth2SecurityDefinitionsExample <=> oAuth2SecurityDefinitionsExampleJSON
4747 describe "Composition Schema Example" $ compositionSchemaExample <=> compositionSchemaExampleJSON
4848 describe "Swagger Object" $ do
49+ context "Example with no paths" $ emptyPathsFieldExample <=> emptyPathsFieldExampleJSON
4950 context "Todo Example" $ swaggerExample <=> swaggerExampleJSON
5051 context "PetStore Example" $
5152 it "decodes successfully" $ do
@@ -537,6 +538,18 @@ oAuth2SecurityDefinitionsExampleJSON = [aesonQQ|
537538-- Swagger object
538539-- =======================================================================
539540
541+emptyPathsFieldExample :: Swagger
542+emptyPathsFieldExample = mempty
543+
544+emptyPathsFieldExampleJSON :: Value
545+emptyPathsFieldExampleJSON = [aesonQQ|
546+{
547+ "swagger": "2.0",
548+ "info": {"version": "", "title": ""},
549+ "paths": {}
550+}
551+|]
552+
540553swaggerExample :: Swagger
541554swaggerExample = mempty
542555 & basePath ?~ "/"