git.iko.soy/typeable/openapi3
on master help sign in
Remove old types, migrate Param
0bf745eMaxim Koltsov
src/Data/Swagger.hs−4
@@ -38,8 +38,6 @@ module Data.Swagger (
38
38
39 -- * Swagger specification
39 -- * Swagger specification
40 Swagger(..),
40 Swagger(..),
41− Host(..),
42− Scheme(..),
43 Server(..),
41 Server(..),
44 ServerVariable(..),
42 ServerVariable(..),
45 Components(..),
43 Components(..),
@@ -65,8 +63,6 @@ module Data.Swagger (
65
63
66 -- ** Parameters
64 -- ** Parameters
67 Param(..),
65 Param(..),
68− ParamAnySchema(..),
69− ParamOtherSchema(..),
70 ParamLocation(..),
66 ParamLocation(..),
71 ParamName,
67 ParamName,
72 Header(..),
68 Header(..),
src/Data/Swagger/Internal.hs+25−107
@@ -179,6 +179,9 @@ data ServerVariable = ServerVariable
179 , _serverVariableDescription :: Maybe Text
179 , _serverVariableDescription :: Maybe Text
180 } deriving (Eq, Show, Generic, Data, Typeable)
180 } deriving (Eq, Show, Generic, Data, Typeable)
181
181
182+instance IsString Server where
183+ fromString s = Server (fromString s) Nothing mempty
184+
182-- | Holds a set of reusable objects for different aspects of the OAS.
185-- | Holds a set of reusable objects for different aspects of the OAS.
183-- All objects defined within the components object will have no effect on the API
186-- All objects defined within the components object will have no effect on the API
184-- unless they are explicitly referenced from properties outside the components object.
187-- unless they are explicitly referenced from properties outside the components object.
@@ -194,36 +197,6 @@ data Components = Components
194-- , _componentsCallbacks
197-- , _componentsCallbacks
195 } deriving (Eq, Show, Generic, Data, Typeable)
198 } deriving (Eq, Show, Generic, Data, Typeable)
196
199
197−-- | The host (name or ip) serving the API. It MAY include a port.
198−data Host = Host
199− { _hostName :: HostName -- ^ Host name.
200− , _hostPort :: Maybe PortNumber -- ^ Optional port.
201− } deriving (Eq, Show, Generic, Typeable)
202−
203−instance IsString Host where
204− fromString s = Host s Nothing
205−
206−hostConstr :: Constr
207−hostConstr = mkConstr hostDataType "Host" [] Prefix
208−
209−hostDataType :: DataType
210−hostDataType = mkDataType "Data.Swagger.Host" [hostConstr]
211−
212−instance Data Host where
213− gunfold k z c = case constrIndex c of
214− 1 -> k (k (z (\name mport -> Host name (fromInteger <$> mport))))
215− _ -> error $ "Data.Data.gunfold: Constructor " ++ show c ++ " is not of type Host."
216− toConstr (Host _ _) = hostConstr
217− dataTypeOf _ = hostDataType
218−
219−-- | The transfer protocol of the API.
220−data Scheme
221− = Http
222− | Https
223− | Ws
224− | Wss
225− deriving (Eq, Show, Generic, Data, Typeable)
226−
227-- | Describes the operations available on a single path.
200-- | Describes the operations available on a single path.
228-- A @'PathItem'@ may be empty, due to ACL constraints.
201-- A @'PathItem'@ may be empty, due to ACL constraints.
229-- The path itself is still exposed to the documentation viewer
202-- The path itself is still exposed to the documentation viewer
@@ -421,6 +394,9 @@ instance Data MimeList where
421 toConstr (MimeList _) = mimeListConstr
394 toConstr (MimeList _) = mimeListConstr
422 dataTypeOf _ = mimeListDataType
395 dataTypeOf _ = mimeListDataType
423
396
397+-- TODO style
398+-- TODO example
399+
424-- | Describes a single operation parameter.
400-- | Describes a single operation parameter.
425-- A unique parameter is defined by a combination of a name and location.
401-- A unique parameter is defined by a combination of a name and location.
426data Param = Param
402data Param = Param
@@ -438,27 +414,21 @@ data Param = Param
438 -- Otherwise, the property MAY be included and its default value is @False@.
414 -- Otherwise, the property MAY be included and its default value is @False@.
439 , _paramRequired :: Maybe Bool
415 , _paramRequired :: Maybe Bool
440
416
441− -- | Parameter schema.
417+ -- | Specifies that a parameter is deprecated and SHOULD be transitioned out of usage.
442− , _paramSchema :: ParamAnySchema
418+ -- Default value is @false@.
443− } deriving (Eq, Show, Generic, Data, Typeable)
419+ , _paramDeprecated :: Maybe Bool
444−
445−data ParamAnySchema
446− = ParamBody (Referenced Schema)
447− | ParamOther ParamOtherSchema
448− deriving (Eq, Show, Generic, Data, Typeable)
449
420
450−data ParamOtherSchema = ParamOtherSchema
451− { -- | The location of the parameter.
421+ -- | The location of the parameter.
452− _paramOtherSchemaIn :: ParamLocation
422+ , _paramIn :: ParamLocation
453
423
454 -- | Sets the ability to pass empty-valued parameters.
424 -- | Sets the ability to pass empty-valued parameters.
455− -- This is valid only for either @'ParamQuery'@ or @'ParamFormData'@
425+ -- This is valid only for 'ParamQuery' parameters and allows sending
456− -- and allows you to send a parameter with a name only or an empty value.
426+ -- a parameter with an empty value. Default value is @false@.
457− -- Default value is @False@.
458 , _paramOtherSchemaAllowEmptyValue :: Maybe Bool
427 , _paramOtherSchemaAllowEmptyValue :: Maybe Bool
459
428
460− , _paramOtherSchemaParamSchema :: ParamSchema 'SwaggerKindParamOtherSchema
429+ -- | Parameter schema.
430+ , _paramSchema :: Maybe (Referenced Schema)
461− } deriving (Eq, Show, Generic, Typeable, Data)
431+ } deriving (Eq, Show, Generic, Data, Typeable)
462
432
463data Example = Example
433data Example = Example
464 { -- | Short description for the example.
434 { -- | Short description for the example.
@@ -561,10 +531,11 @@ deriving instance Typeable 'SwaggerKindNormal
561deriving instance Typeable 'SwaggerKindParamOtherSchema
531deriving instance Typeable 'SwaggerKindParamOtherSchema
562deriving instance Typeable 'SwaggerKindSchema
532deriving instance Typeable 'SwaggerKindSchema
563
533
534+-- TODO remove
564type family SwaggerKindType (k :: SwaggerKind *) :: *
535type family SwaggerKindType (k :: SwaggerKind *) :: *
565type instance SwaggerKindType ('SwaggerKindNormal t) = t
536type instance SwaggerKindType ('SwaggerKindNormal t) = t
566type instance SwaggerKindType 'SwaggerKindSchema = Schema
537type instance SwaggerKindType 'SwaggerKindSchema = Schema
567−type instance SwaggerKindType 'SwaggerKindParamOtherSchema = ParamOtherSchema
538+--type instance SwaggerKindType 'SwaggerKindParamOtherSchema = ParamOtherSchema
568
539
569data SwaggerType t where
540data SwaggerType t where
570 SwaggerString :: SwaggerType t
541 SwaggerString :: SwaggerType t
@@ -967,7 +938,6 @@ deriveGeneric ''OAuth2Flow
967deriveGeneric ''OAuth2Flows
938deriveGeneric ''OAuth2Flows
968deriveGeneric ''Operation
939deriveGeneric ''Operation
969deriveGeneric ''Param
940deriveGeneric ''Param
970−deriveGeneric ''ParamOtherSchema
971deriveGeneric ''PathItem
941deriveGeneric ''PathItem
972deriveGeneric ''Response
942deriveGeneric ''Response
973deriveGeneric ''RequestBody
943deriveGeneric ''RequestBody
@@ -1032,12 +1002,6 @@ instance Monoid Param where
1032 mempty = genericMempty
1002 mempty = genericMempty
1033 mappend = (<>)
1003 mappend = (<>)
1034
1004
1035−instance Semigroup ParamOtherSchema where
1036− (<>) = genericMappend
1037−instance Monoid ParamOtherSchema where
1038− mempty = genericMempty
1039− mappend = (<>)
1040−
1041instance Semigroup Header where
1005instance Semigroup Header where
1042 (<>) = genericMappend
1006 (<>) = genericMappend
1043instance Monoid Header where
1007instance Monoid Header where
@@ -1086,6 +1050,12 @@ instance Monoid OAuth2Flows where
1086 mempty = genericMempty
1050 mempty = genericMempty
1087 mappend = (<>)
1051 mappend = (<>)
1088
1052
1053+instance Semigroup RequestBody where
1054+ (<>) = genericMappend
1055+instance Monoid RequestBody where
1056+ mempty = genericMempty
1057+ mappend = (<>)
1058+
1089-- =======================================================================
1059-- =======================================================================
1090-- SwaggerMonoid helper instances
1060-- SwaggerMonoid helper instances
1091-- =======================================================================
1061-- =======================================================================
@@ -1096,7 +1066,6 @@ instance SwaggerMonoid PathItem
1096instance SwaggerMonoid Schema
1066instance SwaggerMonoid Schema
1097instance SwaggerMonoid (ParamSchema t)
1067instance SwaggerMonoid (ParamSchema t)
1098instance SwaggerMonoid Param
1068instance SwaggerMonoid Param
1099−instance SwaggerMonoid ParamOtherSchema
1100instance SwaggerMonoid Responses
1069instance SwaggerMonoid Responses
1101instance SwaggerMonoid Response
1070instance SwaggerMonoid Response
1102instance SwaggerMonoid ExternalDocs
1071instance SwaggerMonoid ExternalDocs
@@ -1123,12 +1092,6 @@ instance Monoid a => SwaggerMonoid (Referenced a) where
1123 swaggerMappend (Inline x) (Inline y) = Inline (mappend x y)
1092 swaggerMappend (Inline x) (Inline y) = Inline (mappend x y)
1124 swaggerMappend _ y = y
1093 swaggerMappend _ y = y
1125
1094
1126−instance SwaggerMonoid ParamAnySchema where
1127− swaggerMempty = ParamOther swaggerMempty
1128− swaggerMappend (ParamBody x) (ParamBody y) = ParamBody (swaggerMappend x y)
1129− swaggerMappend (ParamOther x) (ParamOther y) = ParamOther (swaggerMappend x y)
1130− swaggerMappend _ y = y
1131−
1132-- =======================================================================
1095-- =======================================================================
1133-- Simple Generic-based ToJSON instances
1096-- Simple Generic-based ToJSON instances
1134-- =======================================================================
1097-- =======================================================================
@@ -1157,9 +1120,6 @@ instance ToJSON ApiKeyLocation where
1157instance ToJSON ApiKeyParams where
1120instance ToJSON ApiKeyParams where
1158 toJSON = genericToJSON (jsonPrefix "apiKey")
1121 toJSON = genericToJSON (jsonPrefix "apiKey")
1159
1122
1160−instance ToJSON Scheme where
1161− toJSON = genericToJSON (jsonPrefix "")
1162−
1163instance ToJSON Tag where
1123instance ToJSON Tag where
1164 toJSON = genericToJSON (jsonPrefix "Tag")
1124 toJSON = genericToJSON (jsonPrefix "Tag")
1165
1125
@@ -1212,9 +1172,6 @@ instance FromJSON ApiKeyLocation where
1212instance FromJSON ApiKeyParams where
1172instance FromJSON ApiKeyParams where
1213 parseJSON = genericParseJSON (jsonPrefix "apiKey")
1173 parseJSON = genericParseJSON (jsonPrefix "apiKey")
1214
1174
1215−instance FromJSON Scheme where
1216− parseJSON = genericParseJSON (jsonPrefix "")
1217−
1218instance FromJSON Tag where
1175instance FromJSON Tag where
1219 parseJSON = genericParseJSON (jsonPrefix "Tag")
1176 parseJSON = genericParseJSON (jsonPrefix "Tag")
1220
1177
@@ -1303,12 +1260,6 @@ instance ToJSON Components where
1303 toJSON = sopSwaggerGenericToJSON
1260 toJSON = sopSwaggerGenericToJSON
1304 toEncoding = sopSwaggerGenericToEncoding
1261 toEncoding = sopSwaggerGenericToEncoding
1305
1262
1306−instance ToJSON Host where
1307− toJSON (Host host mport) = toJSON $
1308− case mport of
1309− Nothing -> host
1310− Just port -> host ++ ":" ++ show port
1311−
1312instance ToJSON MimeList where
1263instance ToJSON MimeList where
1313 toJSON (MimeList xs) = toJSON (map show xs)
1264 toJSON (MimeList xs) = toJSON (map show xs)
1314
1265
@@ -1316,14 +1267,6 @@ instance ToJSON Param where
1316 toJSON = sopSwaggerGenericToJSON
1267 toJSON = sopSwaggerGenericToJSON
1317 toEncoding = sopSwaggerGenericToEncoding
1268 toEncoding = sopSwaggerGenericToEncoding
1318
1269
1319−instance ToJSON ParamAnySchema where
1320− toJSON (ParamBody s) = object [ "in" .= ("body" :: Text), "schema" .= s ]
1321− toJSON (ParamOther s) = toJSON s
1322−
1323−instance ToJSON ParamOtherSchema where
1324− toJSON = sopSwaggerGenericToJSON
1325− toEncoding = sopSwaggerGenericToEncoding
1326−
1327instance ToJSON Responses where
1270instance ToJSON Responses where
1328 toJSON = sopSwaggerGenericToJSON
1271 toJSON = sopSwaggerGenericToJSON
1329 toEncoding = sopSwaggerGenericToEncoding
1272 toEncoding = sopSwaggerGenericToEncoding
@@ -1466,34 +1409,12 @@ instance FromJSON (SwaggerItems 'SwaggerKindSchema) where
1466instance FromJSON Components where
1409instance FromJSON Components where
1467 parseJSON = sopSwaggerGenericParseJSON
1410 parseJSON = sopSwaggerGenericParseJSON
1468
1411
1469−instance FromJSON Host where
1470− parseJSON (String s) = case map Text.unpack $ Text.split (== ':') s of
1471− [host] -> return $ Host host Nothing
1472− [host, port] -> case readMaybe port of
1473− Nothing -> fail $ "Invalid port `" ++ port ++ "'"
1474− Just p -> return $ Host host (Just (fromInteger p))
1475− _ -> fail $ "Invalid host `" ++ Text.unpack s ++ "'"
1476− parseJSON _ = empty
1477−
1478instance FromJSON MimeList where
1412instance FromJSON MimeList where
1479 parseJSON js = (MimeList . map fromString) <$> parseJSON js
1413 parseJSON js = (MimeList . map fromString) <$> parseJSON js
1480
1414
1481instance FromJSON Param where
1415instance FromJSON Param where
1482 parseJSON = sopSwaggerGenericParseJSON
1416 parseJSON = sopSwaggerGenericParseJSON
1483
1417
1484−instance FromJSON ParamAnySchema where
1485− parseJSON js@(Object o) = do
1486− (i :: Text) <- o .: "in"
1487− case i of
1488− "body" -> do
1489− schema <- o .: "schema"
1490− ParamBody <$> parseJSON schema
1491− _ -> ParamOther <$> parseJSON js
1492− parseJSON _ = empty
1493−
1494−instance FromJSON ParamOtherSchema where
1495− parseJSON = sopSwaggerGenericParseJSON
1496−
1497instance FromJSON Responses where
1418instance FromJSON Responses where
1498 parseJSON (Object o) = Responses
1419 parseJSON (Object o) = Responses
1499 <$> o .:? "default"
1420 <$> o .:? "default"
@@ -1589,9 +1510,7 @@ instance HasSwaggerAesonOptions OAuth2Flows where
1589instance HasSwaggerAesonOptions Operation where
1510instance HasSwaggerAesonOptions Operation where
1590 swaggerAesonOptions _ = mkSwaggerAesonOptions "operation"
1511 swaggerAesonOptions _ = mkSwaggerAesonOptions "operation"
1591instance HasSwaggerAesonOptions Param where
1512instance HasSwaggerAesonOptions Param where
1592− swaggerAesonOptions _ = mkSwaggerAesonOptions "param" & saoSubObject ?~ "schema"
1513+ swaggerAesonOptions _ = mkSwaggerAesonOptions "param"
1593−instance HasSwaggerAesonOptions ParamOtherSchema where
1594− swaggerAesonOptions _ = mkSwaggerAesonOptions "paramOtherSchema" & saoSubObject ?~ "paramSchema"
1595instance HasSwaggerAesonOptions PathItem where
1514instance HasSwaggerAesonOptions PathItem where
1596 swaggerAesonOptions _ = mkSwaggerAesonOptions "pathItem"
1515 swaggerAesonOptions _ = mkSwaggerAesonOptions "pathItem"
1597instance HasSwaggerAesonOptions Response where
1516instance HasSwaggerAesonOptions Response where
@@ -1629,7 +1548,6 @@ instance AesonDefaultValue OAuth2ClientCredentialsFlow
1629instance AesonDefaultValue OAuth2AuthorizationCodeFlow
1548instance AesonDefaultValue OAuth2AuthorizationCodeFlow
1630instance AesonDefaultValue p => AesonDefaultValue (OAuth2Flow p)
1549instance AesonDefaultValue p => AesonDefaultValue (OAuth2Flow p)
1631instance AesonDefaultValue Responses
1550instance AesonDefaultValue Responses
1632−instance AesonDefaultValue ParamAnySchema
1633instance AesonDefaultValue SecuritySchemeType
1551instance AesonDefaultValue SecuritySchemeType
1634instance AesonDefaultValue (SwaggerType a)
1552instance AesonDefaultValue (SwaggerType a)
1635instance AesonDefaultValue MimeList where defaultValue = Just mempty
1553instance AesonDefaultValue MimeList where defaultValue = Just mempty
src/Data/Swagger/Lens.hs+1−7
@@ -33,15 +33,13 @@ makeFields ''Server
33--makeLensesWith swaggerFieldRules ''ServerVariable
33--makeLensesWith swaggerFieldRules ''ServerVariable
34makeFields ''RequestBody
34makeFields ''RequestBody
35makeFields ''MediaTypeObject
35makeFields ''MediaTypeObject
36−makeFields ''Host
37makeFields ''Info
36makeFields ''Info
38makeFields ''Contact
37makeFields ''Contact
39makeFields ''License
38makeFields ''License
40makeLensesWith swaggerFieldRules ''PathItem
39makeLensesWith swaggerFieldRules ''PathItem
41makeFields ''Tag
40makeFields ''Tag
42makeFields ''Operation
41makeFields ''Operation
43−makeFields ''Param
44−makeLensesWith swaggerFieldRules ''ParamOtherSchema
42+makeLensesWith swaggerFieldRules ''Param
45makeFields ''Header
43makeFields ''Header
46makeLensesWith swaggerFieldRules ''Schema
44makeLensesWith swaggerFieldRules ''Schema
47makeFields ''NamedSchema
45makeFields ''NamedSchema
@@ -63,8 +61,6 @@ makeFields ''Example
63makeFields ''Discriminator
61makeFields ''Discriminator
64
62
65-- * Prisms
63-- * Prisms
66−-- ** 'ParamAnySchema' prisms
67−makePrisms ''ParamAnySchema
68-- ** 'SecuritySchemeType' prisms
64-- ** 'SecuritySchemeType' prisms
69makePrisms ''SecuritySchemeType
65makePrisms ''SecuritySchemeType
70-- ** 'Referenced' prisms
66-- ** 'Referenced' prisms
@@ -114,12 +110,10 @@ instance HasParamSchema NamedSchema (ParamSchema 'SwaggerKindSchema) where param
114instance HasType Header (Maybe (SwaggerType ('SwaggerKindNormal Header))) where type_ = paramSchema.type_
110instance HasType Header (Maybe (SwaggerType ('SwaggerKindNormal Header))) where type_ = paramSchema.type_
115instance HasType Schema (Maybe (SwaggerType 'SwaggerKindSchema)) where type_ = paramSchema.type_
111instance HasType Schema (Maybe (SwaggerType 'SwaggerKindSchema)) where type_ = paramSchema.type_
116instance HasType NamedSchema (Maybe (SwaggerType 'SwaggerKindSchema)) where type_ = paramSchema.type_
112instance HasType NamedSchema (Maybe (SwaggerType 'SwaggerKindSchema)) where type_ = paramSchema.type_
117−instance HasType ParamOtherSchema (Maybe (SwaggerType 'SwaggerKindParamOtherSchema)) where type_ = paramSchema.type_
118
113
119-- HasDefault instances
114-- HasDefault instances
120instance HasDefault Header (Maybe Value) where default_ = paramSchema.default_
115instance HasDefault Header (Maybe Value) where default_ = paramSchema.default_
121instance HasDefault Schema (Maybe Value) where default_ = paramSchema.default_
116instance HasDefault Schema (Maybe Value) where default_ = paramSchema.default_
122−instance HasDefault ParamOtherSchema (Maybe Value) where default_ = paramSchema.default_
123
117
124-- OVERLAPPABLE instances
118-- OVERLAPPABLE instances
125
119
src/Data/Swagger/Optics.hs−101
@@ -80,7 +80,6 @@ makeFieldLabels ''Server
80makeFieldLabels ''ServerVariable
80makeFieldLabels ''ServerVariable
81makeFieldLabels ''RequestBody
81makeFieldLabels ''RequestBody
82makeFieldLabels ''MediaTypeObject
82makeFieldLabels ''MediaTypeObject
83−makeFieldLabels ''Host
84makeFieldLabels ''Info
83makeFieldLabels ''Info
85makeFieldLabels ''Contact
84makeFieldLabels ''Contact
86makeFieldLabels ''License
85makeFieldLabels ''License
@@ -88,7 +87,6 @@ makeFieldLabels ''PathItem
88makeFieldLabels ''Tag
87makeFieldLabels ''Tag
89makeFieldLabels ''Operation
88makeFieldLabels ''Operation
90makeFieldLabels ''Param
89makeFieldLabels ''Param
91−makeFieldLabels ''ParamOtherSchema
92makeFieldLabels ''Header
90makeFieldLabels ''Header
93makeFieldLabels ''Schema
91makeFieldLabels ''Schema
94makeFieldLabels ''NamedSchema
92makeFieldLabels ''NamedSchema
@@ -111,7 +109,6 @@ makeFieldLabels ''Discriminator
111
109
112-- Prisms
110-- Prisms
113
111
114−makePrismLabels ''ParamAnySchema
115makePrismLabels ''SecuritySchemeType
112makePrismLabels ''SecuritySchemeType
116makePrismLabels ''Referenced
113makePrismLabels ''Referenced
117
114
@@ -208,13 +205,6 @@ instance
208 labelOptic = #paramSchema % #type
205 labelOptic = #paramSchema % #type
209 {-# INLINE labelOptic #-}
206 {-# INLINE labelOptic #-}
210
207
211−instance
212− ( a ~ Maybe (SwaggerType 'SwaggerKindParamOtherSchema)
213− , b ~ Maybe (SwaggerType 'SwaggerKindParamOtherSchema)
214− ) => LabelOptic "type" A_Lens ParamOtherSchema ParamOtherSchema a b where
215− labelOptic = #paramSchema % #type
216− {-# INLINE labelOptic #-}
217−
218-- #default
208-- #default
219
209
220instance
210instance
@@ -235,12 +225,6 @@ instance
235 labelOptic = #paramSchema % #default
225 labelOptic = #paramSchema % #default
236 {-# INLINE labelOptic #-}
226 {-# INLINE labelOptic #-}
237
227
238−instance
239− ( a ~ Maybe Value, b ~ Maybe Value
240− ) => LabelOptic "default" A_Lens ParamOtherSchema ParamOtherSchema a b where
241− labelOptic = #paramSchema % #default
242− {-# INLINE labelOptic #-}
243−
244-- #format
228-- #format
245
229
246instance
230instance
@@ -261,12 +245,6 @@ instance
261 labelOptic = #paramSchema % #format
245 labelOptic = #paramSchema % #format
262 {-# INLINE labelOptic #-}
246 {-# INLINE labelOptic #-}
263
247
264−instance
265− ( a ~ Maybe Format, b ~ Maybe Format
266− ) => LabelOptic "format" A_Lens ParamOtherSchema ParamOtherSchema a b where
267− labelOptic = #paramSchema % #format
268− {-# INLINE labelOptic #-}
269−
270-- #items
248-- #items
271
249
272instance
250instance
@@ -290,13 +268,6 @@ instance
290 labelOptic = #paramSchema % #items
268 labelOptic = #paramSchema % #items
291 {-# INLINE labelOptic #-}
269 {-# INLINE labelOptic #-}
292
270
293−instance
294− ( a ~ Maybe (SwaggerItems 'SwaggerKindParamOtherSchema)
295− , b ~ Maybe (SwaggerItems 'SwaggerKindParamOtherSchema)
296− ) => LabelOptic "items" A_Lens ParamOtherSchema ParamOtherSchema a b where
297− labelOptic = #paramSchema % #items
298− {-# INLINE labelOptic #-}
299−
300-- #maximum
271-- #maximum
301
272
302instance
273instance
@@ -317,12 +288,6 @@ instance
317 labelOptic = #paramSchema % #maximum
288 labelOptic = #paramSchema % #maximum
318 {-# INLINE labelOptic #-}
289 {-# INLINE labelOptic #-}
319
290
320−instance
321− ( a ~ Maybe Scientific, b ~ Maybe Scientific
322− ) => LabelOptic "maximum" A_Lens ParamOtherSchema ParamOtherSchema a b where
323− labelOptic = #paramSchema % #maximum
324− {-# INLINE labelOptic #-}
325−
326-- #exclusiveMaximum
291-- #exclusiveMaximum
327
292
328instance
293instance
@@ -343,12 +308,6 @@ instance
343 labelOptic = #paramSchema % #exclusiveMaximum
308 labelOptic = #paramSchema % #exclusiveMaximum
344 {-# INLINE labelOptic #-}
309 {-# INLINE labelOptic #-}
345
310
346−instance
347− ( a ~ Maybe Bool, b ~ Maybe Bool
348− ) => LabelOptic "exclusiveMaximum" A_Lens ParamOtherSchema ParamOtherSchema a b where
349− labelOptic = #paramSchema % #exclusiveMaximum
350− {-# INLINE labelOptic #-}
351−
352-- #minimum
311-- #minimum
353
312
354instance
313instance
@@ -369,12 +328,6 @@ instance
369 labelOptic = #paramSchema % #minimum
328 labelOptic = #paramSchema % #minimum
370 {-# INLINE labelOptic #-}
329 {-# INLINE labelOptic #-}
371
330
372−instance
373− ( a ~ Maybe Scientific, b ~ Maybe Scientific
374− ) => LabelOptic "minimum" A_Lens ParamOtherSchema ParamOtherSchema a b where
375− labelOptic = #paramSchema % #minimum
376− {-# INLINE labelOptic #-}
377−
378-- #exclusiveMinimum
331-- #exclusiveMinimum
379
332
380instance
333instance
@@ -395,12 +348,6 @@ instance
395 labelOptic = #paramSchema % #exclusiveMinimum
348 labelOptic = #paramSchema % #exclusiveMinimum
396 {-# INLINE labelOptic #-}
349 {-# INLINE labelOptic #-}
397
350
398−instance
399− ( a ~ Maybe Bool, b ~ Maybe Bool
400− ) => LabelOptic "exclusiveMinimum" A_Lens ParamOtherSchema ParamOtherSchema a b where
401− labelOptic = #paramSchema % #exclusiveMinimum
402− {-# INLINE labelOptic #-}
403−
404-- #maxLength
351-- #maxLength
405
352
406instance
353instance
@@ -421,12 +368,6 @@ instance
421 labelOptic = #paramSchema % #maxLength
368 labelOptic = #paramSchema % #maxLength
422 {-# INLINE labelOptic #-}
369 {-# INLINE labelOptic #-}
423
370
424−instance
425− ( a ~ Maybe Integer, b ~ Maybe Integer
426− ) => LabelOptic "maxLength" A_Lens ParamOtherSchema ParamOtherSchema a b where
427− labelOptic = #paramSchema % #maxLength
428− {-# INLINE labelOptic #-}
429−
430-- #minLength
371-- #minLength
431
372
432instance
373instance
@@ -447,12 +388,6 @@ instance
447 labelOptic = #paramSchema % #minLength
388 labelOptic = #paramSchema % #minLength
448 {-# INLINE labelOptic #-}
389 {-# INLINE labelOptic #-}
449
390
450−instance
451− ( a ~ Maybe Integer, b ~ Maybe Integer
452− ) => LabelOptic "minLength" A_Lens ParamOtherSchema ParamOtherSchema a b where
453− labelOptic = #paramSchema % #minLength
454− {-# INLINE labelOptic #-}
455−
456-- #pattern
391-- #pattern
457
392
458instance
393instance
@@ -473,12 +408,6 @@ instance
473 labelOptic = #paramSchema % #pattern
408 labelOptic = #paramSchema % #pattern
474 {-# INLINE labelOptic #-}
409 {-# INLINE labelOptic #-}
475
410
476−instance
477− ( a ~ Maybe Text, b ~ Maybe Text
478− ) => LabelOptic "pattern" A_Lens ParamOtherSchema ParamOtherSchema a b where
479− labelOptic = #paramSchema % #pattern
480− {-# INLINE labelOptic #-}
481−
482-- #maxItems
411-- #maxItems
483
412
484instance
413instance
@@ -499,12 +428,6 @@ instance
499 labelOptic = #paramSchema % #maxItems
428 labelOptic = #paramSchema % #maxItems
500 {-# INLINE labelOptic #-}
429 {-# INLINE labelOptic #-}
501
430
502−instance
503− ( a ~ Maybe Integer, b ~ Maybe Integer
504− ) => LabelOptic "maxItems" A_Lens ParamOtherSchema ParamOtherSchema a b where
505− labelOptic = #paramSchema % #maxItems
506− {-# INLINE labelOptic #-}
507−
508-- #minItems
431-- #minItems
509
432
510instance
433instance
@@ -525,12 +448,6 @@ instance
525 labelOptic = #paramSchema % #minItems
448 labelOptic = #paramSchema % #minItems
526 {-# INLINE labelOptic #-}
449 {-# INLINE labelOptic #-}
527
450
528−instance
529− ( a ~ Maybe Integer, b ~ Maybe Integer
530− ) => LabelOptic "minItems" A_Lens ParamOtherSchema ParamOtherSchema a b where
531− labelOptic = #paramSchema % #minItems
532− {-# INLINE labelOptic #-}
533−
534-- #uniqueItems
451-- #uniqueItems
535
452
536instance
453instance
@@ -551,12 +468,6 @@ instance
551 labelOptic = #paramSchema % #uniqueItems
468 labelOptic = #paramSchema % #uniqueItems
552 {-# INLINE labelOptic #-}
469 {-# INLINE labelOptic #-}
553
470
554−instance
555− ( a ~ Maybe Bool, b ~ Maybe Bool
556− ) => LabelOptic "uniqueItems" A_Lens ParamOtherSchema ParamOtherSchema a b where
557− labelOptic = #paramSchema % #uniqueItems
558− {-# INLINE labelOptic #-}
559−
560-- #enum
471-- #enum
561
472
562instance
473instance
@@ -577,12 +488,6 @@ instance
577 labelOptic = #paramSchema % #enum
488 labelOptic = #paramSchema % #enum
578 {-# INLINE labelOptic #-}
489 {-# INLINE labelOptic #-}
579
490
580−instance
581− ( a ~ Maybe [Value], b ~ Maybe [Value]
582− ) => LabelOptic "enum" A_Lens ParamOtherSchema ParamOtherSchema a b where
583− labelOptic = #paramSchema % #enum
584− {-# INLINE labelOptic #-}
585−
586-- #multipleOf
491-- #multipleOf
587
492
588instance
493instance
@@ -602,9 +507,3 @@ instance
602 ) => LabelOptic "multipleOf" A_Lens NamedSchema NamedSchema a b where
507 ) => LabelOptic "multipleOf" A_Lens NamedSchema NamedSchema a b where
603 labelOptic = #paramSchema % #multipleOf
508 labelOptic = #paramSchema % #multipleOf
604 {-# INLINE labelOptic #-}
509 {-# INLINE labelOptic #-}
605−
606−instance
607− ( a ~ Maybe Scientific, b ~ Maybe Scientific
608− ) => LabelOptic "multipleOf" A_Lens ParamOtherSchema ParamOtherSchema a b where
609− labelOptic = #paramSchema % #multipleOf
610− {-# INLINE labelOptic #-}