@@ -1257,11 +1257,10 @@ referencedToJSON :: ToJSON a => Text -> Referenced a -> Value
1257referencedToJSON prefix (Ref (Reference ref)) = object [ "$ref" .= (prefix <> ref) ]
1257referencedToJSON prefix (Ref (Reference ref)) = object [ "$ref" .= (prefix <> ref) ]
1258referencedToJSON _ (Inline x) = toJSON x
1258referencedToJSON _ (Inline x) = toJSON x
1261−instance ToJSON (Referenced Schema) where toJSON = referencedToJSON "#/definitions/"
1260+instance ToJSON (Referenced Schema) where toJSON = referencedToJSON "#/components/schemas/"
1262−instance ToJSON (Referenced Param) where toJSON = referencedToJSON "#/parameters/"
1261+instance ToJSON (Referenced Param) where toJSON = referencedToJSON "#/components/parameters/"
1263−instance ToJSON (Referenced Response) where toJSON = referencedToJSON "#/responses/"
1262+instance ToJSON (Referenced Response) where toJSON = referencedToJSON "#/components/responses/"
1264−instance ToJSON (Referenced RequestBody) where toJSON = referencedToJSON "#/!!!!/"
1263+instance ToJSON (Referenced RequestBody) where toJSON = referencedToJSON "#/components/requestBodies/"
1266instance ToJSON (SwaggerType t) where
1265instance ToJSON (SwaggerType t) where
1267 toJSON SwaggerArray = "array"
1266 toJSON SwaggerArray = "array"
@@ -1442,11 +1441,10 @@ referencedParseJSON prefix js@(Object o) = do
1442 Just suffix -> pure (Reference suffix)
1441 Just suffix -> pure (Reference suffix)
1443referencedParseJSON _ _ = fail "referenceParseJSON: not an object"
1442referencedParseJSON _ _ = fail "referenceParseJSON: not an object"
1446−instance FromJSON (Referenced Schema) where parseJSON = referencedParseJSON "#/definitions/"
1444+instance FromJSON (Referenced Schema) where parseJSON = referencedParseJSON "#/components/schemas/"
1447−instance FromJSON (Referenced Param) where parseJSON = referencedParseJSON "#/parameters/"
1445+instance FromJSON (Referenced Param) where parseJSON = referencedParseJSON "#/components/parameters/"
1448−instance FromJSON (Referenced Response) where parseJSON = referencedParseJSON "#/responses/"
1446+instance FromJSON (Referenced Response) where parseJSON = referencedParseJSON "#/components/responses/"
1449−instance FromJSON (Referenced RequestBody) where parseJSON = referencedParseJSON "#/!!!!/"
1447+instance FromJSON (Referenced RequestBody) where parseJSON = referencedParseJSON "#/components/requestBodies"
1451instance FromJSON Xml where
1449instance FromJSON Xml where
1452 parseJSON = genericParseJSON (jsonPrefix "xml")
1450 parseJSON = genericParseJSON (jsonPrefix "xml")