git.iko.soy/typeable/openapi3
on master help sign in
Make NamedSchema a data type and move it to Data.Swagger.Internal
4b3a1d0Catherine Galkina
src/Data/Swagger/Internal.hs+7
@@ -485,6 +485,13 @@ data Schema = Schema
485 , _schemaParamSchema :: ParamSchema Schema
485 , _schemaParamSchema :: ParamSchema Schema
486 } deriving (Eq, Show, Generic, Data, Typeable)
486 } deriving (Eq, Show, Generic, Data, Typeable)
487
487
488+-- | A @'Schema'@ with an optional name.
489+-- This name can be used in references.
490+data NamedSchema = NamedSchema
491+ { _namedSchemaName :: Maybe Text
492+ , _namedSchemaSchema :: Schema
493+ } deriving (Eq, Show, Generic, Data, Typeable)
494+
488data ParamSchema t = ParamSchema
495data ParamSchema t = ParamSchema
489 { -- | Declares the value of the parameter that the server will use if none is provided,
496 { -- | Declares the value of the parameter that the server will use if none is provided,
490 -- for example a @"count"@ to control the number of results per page might default to @100@
497 -- for example a @"count"@ to control the number of results per page might default to @100@
src/Data/Swagger/Internal/Schema.hs−4
@@ -45,10 +45,6 @@ import Data.Swagger.Internal.ParamSchema (ToParamSchema(..))
45import Data.Swagger.Lens
45import Data.Swagger.Lens
46import Data.Swagger.SchemaOptions
46import Data.Swagger.SchemaOptions
47
47
48−-- | A @'Schema'@ with an optional name.
49−-- This name can be used in references.
50−type NamedSchema = (Maybe T.Text, Schema)
51−
52-- | Schema definitions, a mapping from schema name to @'Schema'@.
48-- | Schema definitions, a mapping from schema name to @'Schema'@.
53type Definitions = HashMap T.Text Schema
49type Definitions = HashMap T.Text Schema
54
50