@@ -242,7 +242,7 @@ data SwaggerOperation = SwaggerOperation
242242 -- | Declares this operation to be deprecated.
243243 -- Usage of the declared operation should be refrained.
244244 -- Default value is @False@.
245− , _swaggerOperationDeprecated :: Bool
245+ , _swaggerOperationDeprecated :: Maybe Bool
246246
247247 -- | A declaration of which security schemes are applied for this operation.
248248 -- The list of values describes alternative security schemes that can be used
@@ -270,7 +270,7 @@ data SwaggerParameter = SwaggerParameter
270270 -- | Determines whether this parameter is mandatory.
271271 -- If the parameter is in "path", this property is required and its value MUST be true.
272272 -- Otherwise, the property MAY be included and its default value is @False@.
273− , _swaggerParameterRequired :: Bool
273+ , _swaggerParameterRequired :: Maybe Bool
274274
275275 -- | Parameter schema.
276276 , _swaggerParameterSchema :: SwaggerParameterSchema
@@ -300,7 +300,7 @@ data SwaggerParameterOtherSchema = SwaggerParameterOtherSchema
300300 -- This is valid only for either @'SwaggerParameterQuery'@ or @'SwaggerParameterFormData'@
301301 -- and allows you to send a parameter with a name only or an empty value.
302302 -- Default value is @False@.
303− , _swaggerParameterOtherSchemaAllowEmptyValue :: Bool
303+ , _swaggerParameterOtherSchemaAllowEmptyValue :: Maybe Bool
304304
305305 -- | __Required if type is @'SwaggerParamArray'@__.
306306 -- Describes the type of items in the array.
@@ -451,7 +451,7 @@ data SwaggerXml = SwaggerXml
451451
452452 -- | Declares whether the property definition translates to an attribute instead of an element.
453453 -- Default value is @False@.
454− , _swaggerXmlAttribute :: Bool
454+ , _swaggerXmlAttribute :: Maybe Bool
455455
456456 -- | MAY be used only for an array definition.
457457 -- Signifies whether the array is wrapped
@@ -459,7 +459,7 @@ data SwaggerXml = SwaggerXml
459459 -- or unwrapped (@\<book/\>\<book/\>@).
460460 -- Default value is @False@.
461461 -- The definition takes effect only when defined alongside type being array (outside the items).
462− , _swaggerXmlWrapped :: Bool
462+ , _swaggerXmlWrapped :: Maybe Bool
463463 } deriving (Eq, Show, Generic)
464464
465465data SwaggerItems = SwaggerItems
@@ -953,7 +953,6 @@ instance FromJSON SwaggerMimeList where
953953
954954instance FromJSON SwaggerParameter where
955955 parseJSON = genericParseJSONWithSub "schema" (jsonPrefix "swaggerParameter")
956− `withDefaults` [ "required" .= False ]
957956
958957instance FromJSON SwaggerParameterSchema where
959958 parseJSON json@(Object o) = do
@@ -967,7 +966,6 @@ instance FromJSON SwaggerParameterSchema where
967966
968967instance FromJSON SwaggerParameterOtherSchema where
969968 parseJSON = genericParseJSONWithSub "common" (jsonPrefix "swaggerParameterOtherSchema")
970− `withDefaults` [ "allowEmptyValue" .= False ]
971969
972970instance FromJSON SwaggerSchemaItems where
973971 parseJSON json@(Object _) = SwaggerSchemaItemsObject <$> parseJSON json
@@ -991,8 +989,7 @@ instance FromJSON SwaggerResponse where
991989
992990instance FromJSON SwaggerOperation where
993991 parseJSON = genericParseJSON (jsonPrefix "swaggerOperation")
994− `withDefaults` [ "deprecated" .= False
995− , "security" .= ([] :: [SwaggerSecurityRequirement]) ]
992+ `withDefaults` [ "security" .= ([] :: [SwaggerSecurityRequirement]) ]
996993
997994instance FromJSON SwaggerPathItem where
998995 parseJSON = genericParseJSON (jsonPrefix "swaggerPathItem")
@@ -1009,5 +1006,4 @@ instance FromJSON a => FromJSON (SwaggerReferenced a) where
10091006
10101007instance FromJSON SwaggerXml where
10111008 parseJSON = genericParseJSON (jsonPrefix "swaggerXml")
1012− `withDefaults` [ "attribute" .= False, "wrapped" .= False ]
10131009