git.iko.soy/typeable/swagger2
on master help sign in
Make NamedSchema a data type and move it to Data.Swagger.Internal
commit4b3a1d01d15dd31c1f451c4395e32e573c96c5e3 authorCatherine Galkina <catherine@getshoptv.com> dateThu 21 Jan 2016, 13:47 (11 years ago) parenta134310
2 files changed+7−4
src/Data/Swagger/Internal.hs+7 src/Data/Swagger/Internal/Schema.hs−4
src/Data/Swagger/Internal.hs+7
@@ -485,6 +485,13 @@ data Schema = Schema
485485 , _schemaParamSchema :: ParamSchema Schema
486486 } deriving (Eq, Show, Generic, Data, Typeable)
487487
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+
488495data ParamSchema t = ParamSchema
489496 { -- | Declares the value of the parameter that the server will use if none is provided,
490497 -- 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(..))
4545import Data.Swagger.Lens
4646import Data.Swagger.SchemaOptions
4747
48−-- | A @'Schema'@ with an optional name.
49−-- This name can be used in references.
50−type NamedSchema = (Maybe T.Text, Schema)
51−
5248-- | Schema definitions, a mapping from schema name to @'Schema'@.
5349type Definitions = HashMap T.Text Schema
5450