git.iko.soy/typeable/swagger2
on master help sign in
Add models for Contact and License objects
commita3e83f12fcd52817d9733bcb0e4d936fdd57126c authorNickolay Kudasov <nickolay.kudasov@gmail.com> dateFri 6 Nov 2015, 16:36 (11 years ago) parent16a4c0d
2 files changed+19−2
src/Data/Swagger/Internal.hs+18−2 swagger2.cabal+1
src/Data/Swagger/Internal.hs+18−2
@@ -3,6 +3,7 @@ module Data.Swagger.Internal where
33import Data.Text (Text)
44import Network (HostName, PortNumber)
55import Network.HTTP.Media (MediaType)
6+import Network.URL (URL)
67
78-- | This is the root document object for the API specification.
89data Swagger = Swagger
@@ -90,11 +91,26 @@ data SwaggerInfo = SwaggerInfo
9091 , swaggerInfoVersion :: Text
9192 } deriving (Show)
9293
94+-- | Contact information for the exposed API.
9395data SwaggerContact = SwaggerContact
94− deriving (Show)
96+ { -- | The identifying name of the contact person/organization.
97+ swaggerContactName :: Maybe Text
98+
99+ -- | The URL pointing to the contact information.
100+ , swaggerContactURL :: Maybe URL
101+
102+ -- | The email address of the contact person/organization.
103+ , swaggerContactEmail :: Maybe Text
104+ } deriving (Show)
95105
106+-- | License information for the exposed API.
96107data SwaggerLicense = SwaggerLicense
97− deriving (Show)
108+ { -- | The license name used for the API.
109+ swaggerLicenseName :: Text
110+
111+ -- | A URL to the license used for the API.
112+ , swaggerLicenseURL :: Maybe URL
113+ } deriving (Show)
98114
99115-- | The host (name or ip) serving the API. It MAY include a port.
100116data SwaggerHost = SwaggerHost
swagger2.cabal+1
@@ -24,6 +24,7 @@ library
2424 , http-media
2525 , network
2626 , text
27+ , url
2728 default-language: Haskell2010
2829
2930source-repository head