@@ -576,12 +576,12 @@ data Link = Link
576576-- __Warning__: OpenAPI 3.0 does not support tuple arrays. However, OpenAPI 3.1 will, as
577577-- it will incorporate Json Schema mostly verbatim.
578578--
579−-- @'SwaggerItemsObject'@ should be used to specify homogenous array @'Schema'@s.
579+-- @'OpenApiItemsObject'@ should be used to specify homogenous array @'Schema'@s.
580580--
581−-- @'SwaggerItemsArray'@ should be used to specify tuple @'Schema'@s.
582−data SwaggerItems where
583− SwaggerItemsObject :: Referenced Schema -> SwaggerItems
584− SwaggerItemsArray :: [Referenced Schema] -> SwaggerItems
581+-- @'OpenApiItemsArray'@ should be used to specify tuple @'Schema'@s.
582+data OpenApiItems where
583+ OpenApiItemsObject :: Referenced Schema -> OpenApiItems
584+ OpenApiItemsArray :: [Referenced Schema] -> OpenApiItems
585585 deriving (Eq, Show, Typeable, Data)
586586
587587data OpenApiType where
@@ -645,7 +645,7 @@ data Schema = Schema
645645
646646 , _schemaType :: Maybe OpenApiType
647647 , _schemaFormat :: Maybe Format
648− , _schemaItems :: Maybe SwaggerItems
648+ , _schemaItems :: Maybe OpenApiItems
649649 , _schemaMaximum :: Maybe Scientific
650650 , _schemaExclusiveMaximum :: Maybe Bool
651651 , _schemaMinimum :: Maybe Scientific
@@ -680,7 +680,7 @@ data NamedSchema = NamedSchema
680680
681681data Xml = Xml
682682 { -- | Replaces the name of the element/attribute used for the described schema property.
683− -- When defined within the @'SwaggerItems'@ (items), it will affect the name of the individual XML elements within the list.
683+ -- When defined within the @'OpenApiItems'@ (items), it will affect the name of the individual XML elements within the list.
684684 -- When defined alongside type being array (outside the items),
685685 -- it will affect the wrapping element and only if wrapped is true.
686686 -- If wrapped is false, it will be ignored.
@@ -1269,17 +1269,17 @@ instance ToJSON Header where
12691269-- | As for nullary schema for 0-arity type constructors, see
12701270-- <https://github.com/GetShopTV/swagger2/issues/167>.
12711271--
1272−-- >>> encode (SwaggerItemsArray [])
1272+-- >>> encode (OpenApiItemsArray [])
12731273-- "{\"example\":[],\"items\":{},\"maxItems\":0}"
12741274--
1275−instance ToJSON SwaggerItems where
1276− toJSON (SwaggerItemsObject x) = object [ "items" .= x ]
1277− toJSON (SwaggerItemsArray []) = object
1275+instance ToJSON OpenApiItems where
1276+ toJSON (OpenApiItemsObject x) = object [ "items" .= x ]
1277+ toJSON (OpenApiItemsArray []) = object
12781278 [ "items" .= object []
12791279 , "maxItems" .= (0 :: Int)
12801280 , "example" .= Array mempty
12811281 ]
1282− toJSON (SwaggerItemsArray x) = object [ "items" .= x ]
1282+ toJSON (OpenApiItemsArray x) = object [ "items" .= x ]
12831283
12841284instance ToJSON Components where
12851285 toJSON = sopSwaggerGenericToJSON
@@ -1399,7 +1399,7 @@ instance FromJSON Schema where
13991399 parseJSON = fmap nullaryCleanup . sopSwaggerGenericParseJSON
14001400 where nullaryCleanup :: Schema -> Schema
14011401 nullaryCleanup s =
1402− if _schemaItems s == Just (SwaggerItemsArray [])
1402+ if _schemaItems s == Just (OpenApiItemsArray [])
14031403 then s { _schemaExample = Nothing
14041404 , _schemaMaxItems = Nothing
14051405 }
@@ -1408,11 +1408,11 @@ instance FromJSON Schema where
14081408instance FromJSON Header where
14091409 parseJSON = sopSwaggerGenericParseJSON
14101410
1411−instance FromJSON SwaggerItems where
1411+instance FromJSON OpenApiItems where
14121412 parseJSON js@(Object obj)
1413− | null obj = pure $ SwaggerItemsArray [] -- Nullary schema.
1414− | otherwise = SwaggerItemsObject <$> parseJSON js
1415− parseJSON js@(Array _) = SwaggerItemsArray <$> parseJSON js
1413+ | null obj = pure $ OpenApiItemsArray [] -- Nullary schema.
1414+ | otherwise = OpenApiItemsObject <$> parseJSON js
1415+ parseJSON js@(Array _) = OpenApiItemsArray <$> parseJSON js
14161416 parseJSON _ = empty
14171417
14181418instance FromJSON Components where