@@ -88,15 +88,15 @@ rename name (NamedSchema _ schema) = NamedSchema name schema
88-- data Coord = Coord { x :: Double, y :: Double }
88-- data Coord = Coord { x :: Double, y :: Double }
90-- instance ToSchema Coord where
90-- instance ToSchema Coord where
91−-- declareNamedSchema = pure (Just \"Coord\", schema)
91+-- declareNamedSchema = do
92−-- where
92+-- doubleSchema <- declareSchemaRef (Proxy :: Proxy Double)
93−-- schema = mempty
93+-- return $ NamedSchema (Just \"Coord\")) $ mempty
94−-- & type_ .~ SwaggerObject
94+-- & type_ .~ SwaggerObject
95−-- & properties .~
95+-- & properties .~
96−-- [ (\"x\", toSchemaRef (Proxy :: Proxy Double))
96+-- [ (\"x\", doubleSchema)
97−-- , (\"y\", toSchemaRef (Proxy :: Proxy Double))
97+-- , (\"y\", doubleSchema)
99−-- & required .~ [ \"x\", \"y\" ]
99+-- & required .~ [ \"x\", \"y\" ]
102-- Instead of manually writing your @'ToSchema'@ instance you can
102-- Instead of manually writing your @'ToSchema'@ instance you can