Safe Haskell | None |
---|---|
Language | Haskell2010 |
SwaggerPetstore.Model
Description
- data ApiResponse = ApiResponse {}
- mkApiResponse :: ApiResponse
- data Category = Category {}
- mkCategory :: Category
- data Order = Order {}
- mkOrder :: Order
- data Pet = Pet {}
- mkPet :: Text -> [Text] -> Pet
- data Tag = Tag {}
- mkTag :: Tag
- data User = User {}
- mkUser :: User
- _omitNulls :: [(Text, Value)] -> Value
- _toFormItem :: (ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text])
- _emptyToNothing :: Maybe String -> Maybe String
- _memptyToNothing :: (Monoid a, Eq a) => Maybe a -> Maybe a
- _readDateTime :: (ParseTime t, Monad m, Alternative m) => String -> m t
- _showDateTime :: (t ~ UTCTime, FormatTime t) => t -> String
- _parseISO8601 :: (ParseTime t, Monad m, Alternative m) => String -> m t
- _readDate :: (ParseTime t, Monad m) => String -> m t
- _showDate :: FormatTime t => t -> String
Models
ApiResponse
data ApiResponse Source #
An uploaded response
Describes the result of uploading an image resource
Constructors
ApiResponse | |
Fields
|
Instances
mkApiResponse :: ApiResponse Source #
Construct a value of type ApiResponse
(by applying it's required fields, if any)
Category
Pet catehgry
A category for a pet
Constructors
Category | |
Fields
|
mkCategory :: Category Source #
Construct a value of type Category
(by applying it's required fields, if any)
Order
Pet Order
An order for a pets from the pet store
Constructors
Order | |
Fields
|
Pet
a Pet
A pet for sale in the pet store
Constructors
Pet | |
Construct a value of type Pet
(by applying it's required fields, if any)
Tag
Pet Tag
A tag for a pet
User
a User
A User who is purchasing from the pet store
Constructors
User | |
Fields
|
Instances
Eq User Source # | |
Show User Source # | |
ToJSON User Source # | |
FromJSON User Source # | |
HasBodyParam UpdateUser User Source # | Body Param "body" - Updated user object |
HasBodyParam CreateUser User Source # | Body Param "body" - Created user object |
HasBodyParam CreateUsersWithListInput [User] Source # | Body Param "body" - List of user object |
HasBodyParam CreateUsersWithArrayInput [User] Source # | Body Param "body" - List of user object |
Utils
_omitNulls :: [(Text, Value)] -> Value Source #
Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON)
_toFormItem :: (ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text]) Source #
DateTime Formatting
_readDateTime :: (ParseTime t, Monad m, Alternative m) => String -> m t Source #
_parseISO8601
_showDateTime :: (t ~ UTCTime, FormatTime t) => t -> String Source #
TI.formatISO8601Millis
_parseISO8601 :: (ParseTime t, Monad m, Alternative m) => String -> m t Source #
Date Formatting
_readDate :: (ParseTime t, Monad m) => String -> m t Source #
TI.parseTimeM True TI.defaultTimeLocale ""
_showDate :: FormatTime t => t -> String Source #
TI.formatTime TI.defaultTimeLocale ""