Merge remote-tracking branch 'origin/master' into 3.4.x

This commit is contained in:
William Cheng
2018-11-08 18:17:29 +08:00
683 changed files with 9676 additions and 2142 deletions

View File

@@ -368,6 +368,39 @@ instance Consumes TestEnumParameters MimeFormUrlEncoded
instance Produces TestEnumParameters MimeNoContent
-- *** testGroupParameters
-- | @DELETE \/fake@
--
-- Fake endpoint to test group parameters (optional)
--
-- Fake endpoint to test group parameters (optional)
--
testGroupParameters
:: OpenAPIPetstoreRequest TestGroupParameters MimeNoContent NoContent MimeNoContent
testGroupParameters =
_mkRequest "DELETE" ["/fake"]
data TestGroupParameters
-- | /Optional Param/ "string_group" - String in group parameters
instance HasOptionalParam TestGroupParameters StringGroup where
applyOptionalParam req (StringGroup xs) =
req `setQuery` toQuery ("string_group", Just xs)
-- | /Optional Param/ "boolean_group" - Boolean in group parameters
instance HasOptionalParam TestGroupParameters BooleanGroup where
applyOptionalParam req (BooleanGroup xs) =
req `setHeader` toHeader ("boolean_group", xs)
-- | /Optional Param/ "int64_group" - Integer in group parameters
instance HasOptionalParam TestGroupParameters Int64Group where
applyOptionalParam req (Int64Group xs) =
req `setQuery` toQuery ("int64_group", Just xs)
instance Produces TestGroupParameters MimeNoContent
-- *** testInlineAdditionalProperties
-- | @POST \/fake\/inline-additionalProperties@

View File

@@ -81,6 +81,9 @@ newtype BodyBool = BodyBool { unBodyBool :: Bool } deriving (P.Eq, P.Show, A.ToJ
-- ** BodyText
newtype BodyText = BodyText { unBodyText :: Text } deriving (P.Eq, P.Show, A.ToJSON)
-- ** BooleanGroup
newtype BooleanGroup = BooleanGroup { unBooleanGroup :: Bool } deriving (P.Eq, P.Show)
-- ** Byte
newtype Byte = Byte { unByte :: ByteArray } deriving (P.Eq, P.Show)
@@ -120,6 +123,9 @@ newtype Int32 = Int32 { unInt32 :: Int } deriving (P.Eq, P.Show)
-- ** Int64
newtype Int64 = Int64 { unInt64 :: Integer } deriving (P.Eq, P.Show)
-- ** Int64Group
newtype Int64Group = Int64Group { unInt64Group :: Integer } deriving (P.Eq, P.Show)
-- ** Name2
newtype Name2 = Name2 { unName2 :: Text } deriving (P.Eq, P.Show)
@@ -183,6 +189,9 @@ newtype Status = Status { unStatus :: [E'Status2] } deriving (P.Eq, P.Show)
-- ** StatusText
newtype StatusText = StatusText { unStatusText :: Text } deriving (P.Eq, P.Show)
-- ** StringGroup
newtype StringGroup = StringGroup { unStringGroup :: Int } deriving (P.Eq, P.Show)
-- ** Tags
newtype Tags = Tags { unTags :: [Text] } deriving (P.Eq, P.Show)

View File

@@ -589,6 +589,34 @@ paths:
tags:
- fake_classname_tags 123#$%^
/fake:
delete:
description: Fake endpoint to test group parameters (optional)
operationId: testGroupParameters
parameters:
- description: String in group parameters
in: query
name: string_group
schema:
type: integer
- description: Boolean in group parameters
in: header
name: boolean_group
schema:
type: boolean
- description: Integer in group parameters
in: query
name: int64_group
schema:
format: int64
type: integer
responses:
400:
content: {}
description: Someting wrong
summary: Fake endpoint to test group parameters (optional)
tags:
- fake
x-group-parameters: true
get:
description: To test enum parameters
operationId: testEnumParameters