@@ -3,6 +3,7 @@ module Data.Swagger.Internal where
3import Data.Text (Text)
3import Data.Text (Text)
4import Network (HostName, PortNumber)
4import Network (HostName, PortNumber)
5import Network.HTTP.Media (MediaType)
5import Network.HTTP.Media (MediaType)
6+import Network.URL (URL)
7-- | This is the root document object for the API specification.
8-- | This is the root document object for the API specification.
8data Swagger = Swagger
9data Swagger = Swagger
@@ -90,11 +91,26 @@ data SwaggerInfo = SwaggerInfo
90 , swaggerInfoVersion :: Text
91 , swaggerInfoVersion :: Text
91 } deriving (Show)
92 } deriving (Show)
94+-- | Contact information for the exposed API.
93data SwaggerContact = SwaggerContact
95data SwaggerContact = SwaggerContact
96+ { -- | The identifying name of the contact person/organization.
97+ swaggerContactName :: Maybe Text
99+ -- | The URL pointing to the contact information.
100+ , swaggerContactURL :: Maybe URL
102+ -- | The email address of the contact person/organization.
103+ , swaggerContactEmail :: Maybe Text
94− deriving (Show)
104+ } deriving (Show)
106+-- | License information for the exposed API.
96data SwaggerLicense = SwaggerLicense
107data SwaggerLicense = SwaggerLicense
108+ { -- | The license name used for the API.
109+ swaggerLicenseName :: Text
111+ -- | A URL to the license used for the API.
112+ , swaggerLicenseURL :: Maybe URL
97− deriving (Show)
113+ } deriving (Show)
99-- | The host (name or ip) serving the API. It MAY include a port.
115-- | The host (name or ip) serving the API. It MAY include a port.
100data SwaggerHost = SwaggerHost
116data SwaggerHost = SwaggerHost