Skip to content

Commit

Permalink
Update example for minItems/NonEmpty change
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrisbin committed Mar 29, 2024
1 parent 4f22d95 commit c22abc1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import OpenAPI.Types
-- | > POST /user/createWithArray
--
--
createUsersWithArrayInput :: forall m . OpenAPI.Common.MonadHTTP m => [User] -- ^ The request body to send
createUsersWithArrayInput :: forall m . OpenAPI.Common.MonadHTTP m => GHC.Base.NonEmpty User -- ^ The request body to send
-> OpenAPI.Common.ClientT m (Network.HTTP.Client.Types.Response CreateUsersWithArrayInputResponse) -- ^ Monadic computation which returns the result of the operation
createUsersWithArrayInput body = GHC.Base.fmap (\response_0 -> GHC.Base.fmap (Data.Either.either CreateUsersWithArrayInputResponseError GHC.Base.id GHC.Base.. (\response body -> if | GHC.Base.const GHC.Types.True (Network.HTTP.Client.Types.responseStatus response) -> Data.Either.Right CreateUsersWithArrayInputResponseDefault
| GHC.Base.otherwise -> Data.Either.Left "Missing default response type") response_0) response_0) (OpenAPI.Common.doBodyCallWithConfigurationM (Data.Text.toUpper GHC.Base.$ Data.Text.Internal.pack "POST") "/user/createWithArray" GHC.Base.mempty (GHC.Maybe.Just body) OpenAPI.Common.RequestBodyEncodingJSON)
Expand All @@ -63,22 +63,22 @@ data CreateUsersWithArrayInputResponse =
--
-- The same as 'createUsersWithArrayInput' but accepts an explicit configuration.
createUsersWithArrayInputWithConfiguration :: forall m . OpenAPI.Common.MonadHTTP m => OpenAPI.Common.Configuration -- ^ The configuration to use in the request
-> [User] -- ^ The request body to send
-> GHC.Base.NonEmpty User -- ^ The request body to send
-> m (Network.HTTP.Client.Types.Response CreateUsersWithArrayInputResponse) -- ^ Monadic computation which returns the result of the operation
createUsersWithArrayInputWithConfiguration config
body = GHC.Base.fmap (\response_1 -> GHC.Base.fmap (Data.Either.either CreateUsersWithArrayInputResponseError GHC.Base.id GHC.Base.. (\response body -> if | GHC.Base.const GHC.Types.True (Network.HTTP.Client.Types.responseStatus response) -> Data.Either.Right CreateUsersWithArrayInputResponseDefault
| GHC.Base.otherwise -> Data.Either.Left "Missing default response type") response_1) response_1) (OpenAPI.Common.doBodyCallWithConfiguration config (Data.Text.toUpper GHC.Base.$ Data.Text.Internal.pack "POST") "/user/createWithArray" GHC.Base.mempty (GHC.Maybe.Just body) OpenAPI.Common.RequestBodyEncodingJSON)
-- | > POST /user/createWithArray
--
-- The same as 'createUsersWithArrayInput' but returns the raw 'Data.ByteString.ByteString'.
createUsersWithArrayInputRaw :: forall m . OpenAPI.Common.MonadHTTP m => [User] -- ^ The request body to send
createUsersWithArrayInputRaw :: forall m . OpenAPI.Common.MonadHTTP m => GHC.Base.NonEmpty User -- ^ The request body to send
-> OpenAPI.Common.ClientT m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString) -- ^ Monadic computation which returns the result of the operation
createUsersWithArrayInputRaw body = GHC.Base.id (OpenAPI.Common.doBodyCallWithConfigurationM (Data.Text.toUpper GHC.Base.$ Data.Text.Internal.pack "POST") "/user/createWithArray" GHC.Base.mempty (GHC.Maybe.Just body) OpenAPI.Common.RequestBodyEncodingJSON)
-- | > POST /user/createWithArray
--
-- The same as 'createUsersWithArrayInput' but accepts an explicit configuration and returns the raw 'Data.ByteString.ByteString'.
createUsersWithArrayInputWithConfigurationRaw :: forall m . OpenAPI.Common.MonadHTTP m => OpenAPI.Common.Configuration -- ^ The configuration to use in the request
-> [User] -- ^ The request body to send
-> GHC.Base.NonEmpty User -- ^ The request body to send
-> m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString) -- ^ Monadic computation which returns the result of the operation
createUsersWithArrayInputWithConfigurationRaw config
body = GHC.Base.id (OpenAPI.Common.doBodyCallWithConfiguration config (Data.Text.toUpper GHC.Base.$ Data.Text.Internal.pack "POST") "/user/createWithArray" GHC.Base.mempty (GHC.Maybe.Just body) OpenAPI.Common.RequestBodyEncodingJSON)
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import OpenAPI.Types
-- | > POST /user/createWithList
--
--
createUsersWithListInput :: forall m . OpenAPI.Common.MonadHTTP m => [User] -- ^ The request body to send
createUsersWithListInput :: forall m . OpenAPI.Common.MonadHTTP m => GHC.Base.NonEmpty User -- ^ The request body to send
-> OpenAPI.Common.ClientT m (Network.HTTP.Client.Types.Response CreateUsersWithListInputResponse) -- ^ Monadic computation which returns the result of the operation
createUsersWithListInput body = GHC.Base.fmap (\response_0 -> GHC.Base.fmap (Data.Either.either CreateUsersWithListInputResponseError GHC.Base.id GHC.Base.. (\response body -> if | GHC.Base.const GHC.Types.True (Network.HTTP.Client.Types.responseStatus response) -> Data.Either.Right CreateUsersWithListInputResponseDefault
| GHC.Base.otherwise -> Data.Either.Left "Missing default response type") response_0) response_0) (OpenAPI.Common.doBodyCallWithConfigurationM (Data.Text.toUpper GHC.Base.$ Data.Text.Internal.pack "POST") "/user/createWithList" GHC.Base.mempty (GHC.Maybe.Just body) OpenAPI.Common.RequestBodyEncodingJSON)
Expand All @@ -63,22 +63,22 @@ data CreateUsersWithListInputResponse =
--
-- The same as 'createUsersWithListInput' but accepts an explicit configuration.
createUsersWithListInputWithConfiguration :: forall m . OpenAPI.Common.MonadHTTP m => OpenAPI.Common.Configuration -- ^ The configuration to use in the request
-> [User] -- ^ The request body to send
-> GHC.Base.NonEmpty User -- ^ The request body to send
-> m (Network.HTTP.Client.Types.Response CreateUsersWithListInputResponse) -- ^ Monadic computation which returns the result of the operation
createUsersWithListInputWithConfiguration config
body = GHC.Base.fmap (\response_1 -> GHC.Base.fmap (Data.Either.either CreateUsersWithListInputResponseError GHC.Base.id GHC.Base.. (\response body -> if | GHC.Base.const GHC.Types.True (Network.HTTP.Client.Types.responseStatus response) -> Data.Either.Right CreateUsersWithListInputResponseDefault
| GHC.Base.otherwise -> Data.Either.Left "Missing default response type") response_1) response_1) (OpenAPI.Common.doBodyCallWithConfiguration config (Data.Text.toUpper GHC.Base.$ Data.Text.Internal.pack "POST") "/user/createWithList" GHC.Base.mempty (GHC.Maybe.Just body) OpenAPI.Common.RequestBodyEncodingJSON)
-- | > POST /user/createWithList
--
-- The same as 'createUsersWithListInput' but returns the raw 'Data.ByteString.ByteString'.
createUsersWithListInputRaw :: forall m . OpenAPI.Common.MonadHTTP m => [User] -- ^ The request body to send
createUsersWithListInputRaw :: forall m . OpenAPI.Common.MonadHTTP m => GHC.Base.NonEmpty User -- ^ The request body to send
-> OpenAPI.Common.ClientT m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString) -- ^ Monadic computation which returns the result of the operation
createUsersWithListInputRaw body = GHC.Base.id (OpenAPI.Common.doBodyCallWithConfigurationM (Data.Text.toUpper GHC.Base.$ Data.Text.Internal.pack "POST") "/user/createWithList" GHC.Base.mempty (GHC.Maybe.Just body) OpenAPI.Common.RequestBodyEncodingJSON)
-- | > POST /user/createWithList
--
-- The same as 'createUsersWithListInput' but accepts an explicit configuration and returns the raw 'Data.ByteString.ByteString'.
createUsersWithListInputWithConfigurationRaw :: forall m . OpenAPI.Common.MonadHTTP m => OpenAPI.Common.Configuration -- ^ The configuration to use in the request
-> [User] -- ^ The request body to send
-> GHC.Base.NonEmpty User -- ^ The request body to send
-> m (Network.HTTP.Client.Types.Response Data.ByteString.Internal.Type.ByteString) -- ^ Monadic computation which returns the result of the operation
createUsersWithListInputWithConfigurationRaw config
body = GHC.Base.id (OpenAPI.Common.doBodyCallWithConfiguration config (Data.Text.toUpper GHC.Base.$ Data.Text.Internal.pack "POST") "/user/createWithList" GHC.Base.mempty (GHC.Maybe.Just body) OpenAPI.Common.RequestBodyEncodingJSON)

0 comments on commit c22abc1

Please sign in to comment.