mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 01:22:44 +00:00
[haskell-http-client] regen samples (#709)
* [haskell-http-client] regen samples * ensure the haskell-http-client samples are always up-to-date
This commit is contained in:
@@ -57,30 +57,30 @@ import qualified Prelude as P
|
||||
|
||||
-- ** AnotherFake
|
||||
|
||||
-- *** testSpecialTags
|
||||
-- *** op123testSpecialTags
|
||||
|
||||
-- | @PATCH \/another-fake\/dummy@
|
||||
--
|
||||
-- To test special tags
|
||||
--
|
||||
-- To test special tags
|
||||
-- To test special tags and operation ID starting with number
|
||||
--
|
||||
testSpecialTags
|
||||
:: (Consumes TestSpecialTags MimeJSON, MimeRender MimeJSON Client)
|
||||
op123testSpecialTags
|
||||
:: (Consumes Op123testSpecialTags MimeJSON, MimeRender MimeJSON Client)
|
||||
=> Client -- ^ "client" - client model
|
||||
-> OpenAPIPetstoreRequest TestSpecialTags MimeJSON Client MimeJSON
|
||||
testSpecialTags client =
|
||||
-> OpenAPIPetstoreRequest Op123testSpecialTags MimeJSON Client MimeJSON
|
||||
op123testSpecialTags client =
|
||||
_mkRequest "PATCH" ["/another-fake/dummy"]
|
||||
`setBodyParam` client
|
||||
|
||||
data TestSpecialTags
|
||||
data Op123testSpecialTags
|
||||
|
||||
-- | /Body Param/ "Client" - client model
|
||||
instance HasBodyParam TestSpecialTags Client
|
||||
instance HasBodyParam Op123testSpecialTags Client
|
||||
|
||||
-- | @application/json@
|
||||
instance Consumes TestSpecialTags MimeJSON
|
||||
instance Consumes Op123testSpecialTags MimeJSON
|
||||
|
||||
-- | @application/json@
|
||||
instance Produces TestSpecialTags MimeJSON
|
||||
instance Produces Op123testSpecialTags MimeJSON
|
||||
|
||||
|
||||
@@ -303,13 +303,13 @@ instance Produces UploadFile MimeJSON
|
||||
--
|
||||
uploadFileWithRequiredFile
|
||||
:: (Consumes UploadFileWithRequiredFile MimeMultipartFormData)
|
||||
=> File2 -- ^ "file" - file to upload
|
||||
=> RequiredFile -- ^ "requiredFile" - file to upload
|
||||
-> PetId -- ^ "petId" - ID of pet to update
|
||||
-> OpenAPIPetstoreRequest UploadFileWithRequiredFile MimeMultipartFormData ApiResponse MimeJSON
|
||||
uploadFileWithRequiredFile (File2 file) (PetId petId) =
|
||||
uploadFileWithRequiredFile (RequiredFile requiredFile) (PetId petId) =
|
||||
_mkRequest "POST" ["/fake/",toPath petId,"/uploadImageWithRequiredFile"]
|
||||
`_hasAuthType` (P.Proxy :: P.Proxy AuthOAuthPetstoreAuth)
|
||||
`_addMultiFormPart` NH.partFileSource "file" file
|
||||
`_addMultiFormPart` NH.partFileSource "requiredFile" requiredFile
|
||||
|
||||
data UploadFileWithRequiredFile
|
||||
|
||||
|
||||
@@ -174,6 +174,9 @@ newtype Query = Query { unQuery :: Text } deriving (P.Eq, P.Show)
|
||||
-- ** RequestBody
|
||||
newtype RequestBody = RequestBody { unRequestBody :: (Map.Map String Text) } deriving (P.Eq, P.Show, A.ToJSON)
|
||||
|
||||
-- ** RequiredFile
|
||||
newtype RequiredFile = RequiredFile { unRequiredFile :: FilePath } deriving (P.Eq, P.Show)
|
||||
|
||||
-- ** Status
|
||||
newtype Status = Status { unStatus :: [E'Status2] } deriving (P.Eq, P.Show)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user