Skip to content

Commit 3fc3da8

Browse files
committed
Oops, forgot some instances
1 parent 26ee174 commit 3fc3da8

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

src/Data/OpenApi/Internal.hs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,24 +1238,12 @@ instance ToJSON OpenApiType where
12381238
instance ToJSON ParamLocation where
12391239
toJSON = genericToJSON (jsonPrefix "Param")
12401240

1241-
instance ToJSON ServerVariable where
1242-
toJSON = genericToJSON (jsonPrefix "ServerVariable")
1243-
12441241
instance ToJSON ApiKeyLocation where
12451242
toJSON = genericToJSON (jsonPrefix "ApiKey")
12461243

12471244
instance ToJSON ApiKeyParams where
12481245
toJSON = genericToJSON (jsonPrefix "apiKey")
12491246

1250-
instance ToJSON Tag where
1251-
toJSON = genericToJSON (jsonPrefix "Tag")
1252-
1253-
instance ToJSON ExternalDocs where
1254-
toJSON = genericToJSON (jsonPrefix "ExternalDocs")
1255-
1256-
instance ToJSON Xml where
1257-
toJSON = genericToJSON (jsonPrefix "Xml")
1258-
12591247
instance ToJSON Discriminator where
12601248
toJSON = genericToJSON (jsonPrefix "Discriminator")
12611249

@@ -1284,21 +1272,12 @@ instance FromJSON OpenApiType where
12841272
instance FromJSON ParamLocation where
12851273
parseJSON = genericParseJSON (jsonPrefix "Param")
12861274

1287-
instance FromJSON ServerVariable where
1288-
parseJSON = genericParseJSON (jsonPrefix "ServerVariable")
1289-
12901275
instance FromJSON ApiKeyLocation where
12911276
parseJSON = genericParseJSON (jsonPrefix "ApiKey")
12921277

12931278
instance FromJSON ApiKeyParams where
12941279
parseJSON = genericParseJSON (jsonPrefix "apiKey")
12951280

1296-
instance FromJSON Tag where
1297-
parseJSON = genericParseJSON (jsonPrefix "Tag")
1298-
1299-
instance FromJSON ExternalDocs where
1300-
parseJSON = genericParseJSON (jsonPrefix "ExternalDocs")
1301-
13021281
instance FromJSON Discriminator where
13031282
parseJSON = genericParseJSON (jsonPrefix "Discriminator")
13041283

@@ -1492,6 +1471,18 @@ instance ToJSON Contact where
14921471
instance ToJSON License where
14931472
toJSON = sopSwaggerGenericToJSONWithOpts (mkSwaggerAesonOptions "License")
14941473

1474+
instance ToJSON ServerVariable where
1475+
toJSON = sopSwaggerGenericToJSONWithOpts (mkSwaggerAesonOptions "ServerVariable")
1476+
1477+
instance ToJSON Tag where
1478+
toJSON = sopSwaggerGenericToJSONWithOpts (mkSwaggerAesonOptions "Tag")
1479+
1480+
instance ToJSON ExternalDocs where
1481+
toJSON = sopSwaggerGenericToJSONWithOpts (mkSwaggerAesonOptions "ExternalDocs")
1482+
1483+
instance ToJSON Xml where
1484+
toJSON = sopSwaggerGenericToJSONWithOpts (mkSwaggerAesonOptions "Xml")
1485+
14951486
-- =======================================================================
14961487
-- Manual FromJSON instances
14971488
-- =======================================================================
@@ -1635,9 +1626,6 @@ instance FromJSON (Referenced Header) where parseJSON = referencedParseJSON "#
16351626
instance FromJSON (Referenced Link) where parseJSON = referencedParseJSON "#/components/links/"
16361627
instance FromJSON (Referenced Callback) where parseJSON = referencedParseJSON "#/components/callbacks/"
16371628

1638-
instance FromJSON Xml where
1639-
parseJSON = genericParseJSON (jsonPrefix "xml")
1640-
16411629
instance FromJSON AdditionalProperties where
16421630
parseJSON (Bool b) = pure $ AdditionalPropertiesAllowed b
16431631
parseJSON js = AdditionalPropertiesSchema <$> parseJSON js
@@ -1666,6 +1654,18 @@ instance FromJSON Contact where
16661654
instance FromJSON License where
16671655
parseJSON = sopSwaggerGenericParseJSONWithOpts (mkSwaggerAesonOptions "License")
16681656

1657+
instance FromJSON ServerVariable where
1658+
parseJSON = sopSwaggerGenericParseJSONWithOpts (mkSwaggerAesonOptions "ServerVariable")
1659+
1660+
instance FromJSON Tag where
1661+
parseJSON = sopSwaggerGenericParseJSONWithOpts (mkSwaggerAesonOptions "Tag")
1662+
1663+
instance FromJSON ExternalDocs where
1664+
parseJSON = sopSwaggerGenericParseJSONWithOpts (mkSwaggerAesonOptions "ExternalDocs")
1665+
1666+
instance FromJSON Xml where
1667+
parseJSON = sopSwaggerGenericParseJSONWithOpts (mkSwaggerAesonOptions "xml")
1668+
16691669
instance HasSwaggerAesonOptions Server where
16701670
swaggerAesonOptions _ = mkSwaggerAesonOptions "server"
16711671
instance HasSwaggerAesonOptions Components where

0 commit comments

Comments
 (0)