Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds support for type discriminator during deserialization #1174

Merged
merged 68 commits into from
Mar 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
4aa401f
- adds discriminator parsing in kiota builder
baywet Feb 8, 2022
4f99f85
- moves the discriminator mapping to code methods
baywet Feb 9, 2022
3160875
- adds a refiner to add usings of discriminator types in models
baywet Feb 9, 2022
b78bb92
- adds a refiner to import factory methods in request builder classes
baywet Feb 9, 2022
e2fc2ea
- defines a type for parsable factory in typescript
baywet Feb 9, 2022
1f4a4d8
- updates the discriminator factory parameter type
baywet Feb 9, 2022
5329176
- moves discriminator prop name to code method
baywet Feb 9, 2022
c7e78ac
- updates factory parameter name and type
baywet Feb 10, 2022
4459085
- implements facotry method generation in typescript
baywet Feb 10, 2022
3aa7d65
- updates TS executor and deserializer methods to use the factory
baywet Feb 10, 2022
c6c1880
- fixxes compilation issues for unit tests
baywet Feb 11, 2022
b60d672
- fixes unit tests for TS/gen for discriminator
baywet Feb 11, 2022
b112b05
- fixes unit tests issues for php with parameters ordering
baywet Feb 11, 2022
7447d71
- adds unit tests for factory method in typescript
baywet Feb 11, 2022
eb4ff90
- renames factory method name to avoid conflicts
baywet Feb 11, 2022
dc3b8c4
- adds support for declaring global functions
baywet Feb 11, 2022
9da637c
- fixes a bug where typescript would fail to parse primitive collections
baywet Feb 11, 2022
ad79a0b
- adds missing error types import for typescript
baywet Feb 11, 2022
62f4c82
- fixes unit tests after factory mehtod as static global
baywet Feb 14, 2022
520723f
- adds unit test for code function
baywet Feb 14, 2022
4be5c4c
- adds defensive programing test for new functions on namespace
baywet Feb 14, 2022
678244b
- code linting
baywet Feb 14, 2022
248cf35
- updates request adapter and parse node interfaces to parsable factory
baywet Feb 14, 2022
fe934de
- update dotnet abstractions for discriminator
baywet Feb 14, 2022
c3d90a8
- updates go refiner to adds reference to factories
baywet Feb 14, 2022
4e06e4d
- fixes retrun type for go discriminator factories
baywet Feb 14, 2022
ef391bd
- fixes parse node interface declaration for missing generic type
baywet Feb 15, 2022
a77cce2
- updates unit tests for go factory method
baywet Feb 15, 2022
38ed4e9
- fixes a bug where go discriminator wouldn't check for nil
baywet Feb 15, 2022
d135db6
- refactoring to reduce code duplication
baywet Feb 15, 2022
38dbfc3
- refactors code enum to avoid code duplication
baywet Feb 15, 2022
cee7991
- adds support for declaring interfaces
baywet Feb 15, 2022
f5e5797
- reflects kind refactoring after merge
baywet Feb 16, 2022
aac6616
- adds exclusion for samples to avoid accidental commits
baywet Feb 16, 2022
e56a9dc
- code linting
baywet Feb 16, 2022
29ae7a2
- draft implementation of interfaces addition
baywet Feb 16, 2022
d545ae2
- draft implementation of class to interface for properties
baywet Feb 17, 2022
9c9219d
- adds support for parameters and method type sreplacement
baywet Feb 17, 2022
2944111
- major refactoring to improve reusability for Code blocks
baywet Feb 17, 2022
91af084
- adds interface writer in go
baywet Feb 17, 2022
099e3dc
- multiple fixes to go code method writer for interface copy
baywet Feb 18, 2022
0d2a824
- fixes Go unit test following refactoring
baywet Feb 18, 2022
904c8b0
- code linting
baywet Feb 18, 2022
eb0a3b6
- code linting
baywet Feb 21, 2022
da4cfec
- fixes scopes closing accross languages after refactoring
baywet Feb 21, 2022
6797b08
- reverts interface subnamespace
baywet Feb 21, 2022
2e827d5
- switches fluent API return types and request bodies to interfaces
baywet Feb 21, 2022
46c087a
- udpates serialization and http implementations for CSharp parsable …
baywet Feb 21, 2022
4357c10
- implements factory generation for CSHarp
baywet Feb 22, 2022
0460968
- implements use of discriminator in request executory for CSharp
baywet Feb 22, 2022
2c7ed17
- adds parsable factory to java abstractions
baywet Feb 22, 2022
cf01e8f
- updates json and request adapter implementations for java discrimin…
baywet Feb 22, 2022
87b0060
- adds using to factory types in java
baywet Feb 22, 2022
ff9794c
- implements factory generation for Java
baywet Feb 22, 2022
bff70f6
- fixes a bug where accessors coudl end up using reserved names
baywet Feb 22, 2022
5407d42
- adds back properties for accessors on property DOM element
baywet Feb 22, 2022
9969abd
- updates unit tests following discriminator support for Java
baywet Feb 22, 2022
69dd415
- code linting
baywet Feb 23, 2022
12ba49d
- bumps versions for discriminator support
baywet Feb 23, 2022
8c45ef2
- updates conceptual documentation for the discriminator support
baywet Feb 23, 2022
52f73e9
- adds changelog entry for discriminator support
baywet Feb 23, 2022
27d044f
- adds unit tests for interface declaration writer in go
baywet Feb 23, 2022
1cea868
- adds a unit test for static methods replacement
baywet Feb 23, 2022
b9b195f
- adds unit tests for the model interface replacement refiner
baywet Feb 23, 2022
8302f69
Update docs/extending/models.md
baywet Feb 24, 2022
422ffb9
- code review suggestions
baywet Feb 25, 2022
15286b9
Merge branch 'main' into feature/discriminator
baywet Mar 1, 2022
a23bb66
Merge branch 'main' into feature/discriminator
baywet Mar 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -444,4 +444,6 @@ $RECYCLE.BIN/
reports/

## Java preference files
*.prefs
*.prefs

samples/
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
"squareup"
],
"cSpell.words": [
"deserialization",
"Kiota",
"npmrc",
"openapi",
"serializers"
],
"java.configuration.updateBuildConfiguration": "automatic"
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Adds support for downcast of types during deserialization according to the discriminator information in the description (CSharp/Go/Java/TypeScript). [#646](https://github.com/microsoft/kiota/issues/646)
- Adds support for generating interfaces for models in Go. [#646](https://github.com/microsoft/kiota/issues/646)
- Adds support for generating functions (as opposed to methods or static methods) in the generator (used in TypeScript for discriminator factories). [#646](https://github.com/microsoft/kiota/issues/646)
- Added support for global error handling in python abstractions #1289
- Added a HTTPRequestAdapter for python Requests library #1251

Expand Down
12 changes: 7 additions & 5 deletions abstractions/dotnet/src/IRequestAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,22 @@ public interface IRequestAdapter
/// Executes the HTTP request specified by the given RequestInformation and returns the deserialized response model.
/// </summary>
/// <param name="requestInfo">The RequestInformation object to use for the HTTP request.</param>
/// <param name="factory">The factory of the response model to deserialize the response into.</param>
/// <param name="responseHandler">The response handler to use for the HTTP request instead of the default handler.</param>
/// <param name="errorMapping">The error factories mapping to use in case of a failed request.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to use for cancelling the requests.</param>
/// <returns>The deserialized response model.</returns>
Task<ModelType> SendAsync<ModelType>(RequestInformation requestInfo, IResponseHandler responseHandler = default, Dictionary<string, Func<IParsable>> errorMapping = default, CancellationToken cancellationToken = default) where ModelType : IParsable;
Task<ModelType> SendAsync<ModelType>(RequestInformation requestInfo, ParsableFactory<ModelType> factory, IResponseHandler responseHandler = default, Dictionary<string, ParsableFactory<IParsable>> errorMapping = default, CancellationToken cancellationToken = default) where ModelType : IParsable;
/// <summary>
/// Executes the HTTP request specified by the given RequestInformation and returns the deserialized response model collection.
/// </summary>
/// <param name="requestInfo">The RequestInformation object to use for the HTTP request.</param>
/// <param name="factory">The factory of the response model to deserialize the response into.</param>
/// <param name="responseHandler">The response handler to use for the HTTP request instead of the default handler.</param>
/// <param name="errorMapping">The error factories mapping to use in case of a failed request.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to use for cancelling the requests.</param>
/// <returns>The deserialized response model collection.</returns>
Task<IEnumerable<ModelType>> SendCollectionAsync<ModelType>(RequestInformation requestInfo, IResponseHandler responseHandler = default, Dictionary<string, Func<IParsable>> errorMapping = default, CancellationToken cancellationToken = default) where ModelType : IParsable;
Task<IEnumerable<ModelType>> SendCollectionAsync<ModelType>(RequestInformation requestInfo, ParsableFactory<ModelType> factory, IResponseHandler responseHandler = default, Dictionary<string, ParsableFactory<IParsable>> errorMapping = default, CancellationToken cancellationToken = default) where ModelType : IParsable;
/// <summary>
/// Executes the HTTP request specified by the given RequestInformation and returns the deserialized primitive response model.
/// </summary>
Expand All @@ -51,7 +53,7 @@ public interface IRequestAdapter
/// <param name="errorMapping">The error factories mapping to use in case of a failed request.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to use for cancelling the requests.</param>
/// <returns>The deserialized primitive response model.</returns>
Task<ModelType> SendPrimitiveAsync<ModelType>(RequestInformation requestInfo, IResponseHandler responseHandler = default, Dictionary<string, Func<IParsable>> errorMapping = default, CancellationToken cancellationToken = default);
Task<ModelType> SendPrimitiveAsync<ModelType>(RequestInformation requestInfo, IResponseHandler responseHandler = default, Dictionary<string, ParsableFactory<IParsable>> errorMapping = default, CancellationToken cancellationToken = default);
/// <summary>
/// Executes the HTTP request specified by the given RequestInformation and returns the deserialized primitive response model collection.
/// </summary>
Expand All @@ -60,7 +62,7 @@ public interface IRequestAdapter
/// <param name="errorMapping">The error factories mapping to use in case of a failed request.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to use for cancelling the requests.</param>
/// <returns>The deserialized primitive response model collection.</returns>
Task<IEnumerable<ModelType>> SendPrimitiveCollectionAsync<ModelType>(RequestInformation requestInfo, IResponseHandler responseHandler = default, Dictionary<string, Func<IParsable>> errorMapping = default, CancellationToken cancellationToken = default);
Task<IEnumerable<ModelType>> SendPrimitiveCollectionAsync<ModelType>(RequestInformation requestInfo, IResponseHandler responseHandler = default, Dictionary<string, ParsableFactory<IParsable>> errorMapping = default, CancellationToken cancellationToken = default);
/// <summary>
/// Executes the HTTP request specified by the given RequestInformation with no return content.
/// </summary>
Expand All @@ -69,7 +71,7 @@ public interface IRequestAdapter
/// <param name="errorMapping">The error factories mapping to use in case of a failed request.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to use for cancelling the requests.</param>
/// <returns>A Task to await completion.</returns>
Task SendNoContentAsync(RequestInformation requestInfo, IResponseHandler responseHandler = default, Dictionary<string, Func<IParsable>> errorMapping = default, CancellationToken cancellationToken = default);
Task SendNoContentAsync(RequestInformation requestInfo, IResponseHandler responseHandler = default, Dictionary<string, ParsableFactory<IParsable>> errorMapping = default, CancellationToken cancellationToken = default);
/// <summary>
/// The base url for every request.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion abstractions/dotnet/src/IResponseHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ public interface IResponseHandler
/// <typeparam name="NativeResponseType">The type of the native response object.</typeparam>
/// <typeparam name="ModelType">The type of the response model object.</typeparam>
/// <returns>A task that represents the asynchronous operation and contains the deserialized response.</returns>
Task<ModelType> HandleResponseAsync<NativeResponseType, ModelType>(NativeResponseType response, Dictionary<string, Func<IParsable>> errorMappings);
Task<ModelType> HandleResponseAsync<NativeResponseType, ModelType>(NativeResponseType response, Dictionary<string, ParsableFactory<IParsable>> errorMappings);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<LangVersion>latest</LangVersion>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<RepositoryUrl>https://github.com/microsoft/kiota</RepositoryUrl>
<Version>1.0.30</Version>
<Version>1.0.31</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- Enable this line once we go live to prevent breaking changes -->
Expand Down
4 changes: 2 additions & 2 deletions abstractions/dotnet/src/NativeResponseHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public class NativeResponseHandler : IResponseHandler
/// <summary>
/// The error mappings for the response to use when deserializing failed responses bodies. Where an error code like 401 applies specifically to that status code, a class code like 4XX applies to all status codes within the range if an the specific error code is not present.
/// </summary>
public Dictionary<string, Func<IParsable>> ErrorMappings { get; set; }
public Dictionary<string, ParsableFactory<IParsable>> ErrorMappings { get; set; }

/// <inheritdoc />
public Task<ModelType> HandleResponseAsync<NativeResponseType, ModelType>(NativeResponseType response, Dictionary<string, Func<IParsable>> errorMappings)
public Task<ModelType> HandleResponseAsync<NativeResponseType, ModelType>(NativeResponseType response, Dictionary<string, ParsableFactory<IParsable>> errorMappings)
{
Value = response;
ErrorMappings = errorMappings;
Expand Down
12 changes: 4 additions & 8 deletions abstractions/dotnet/src/serialization/IParseNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ public interface IParseNode
/// <summary>
/// Gets the collection of model objects values of the node.
/// </summary>
/// <param name="factory">The factory to use to create the model object.</param>
/// <returns>The collection of model objects values.</returns>
IEnumerable<T> GetCollectionOfObjectValues<T>() where T : IParsable;
IEnumerable<T> GetCollectionOfObjectValues<T>(ParsableFactory<T> factory) where T : IParsable;
/// <summary>
/// Gets the enum value of the node.
/// </summary>
Expand All @@ -101,14 +102,9 @@ public interface IParseNode
/// <summary>
/// Gets the model object value of the node.
/// </summary>
/// <param name="factory">The factory to use to create the model object.</param>
/// <returns>The model object value of the node.</returns>
T GetObjectValue<T>() where T : IParsable;
/// <summary>
/// Gets the resulting error from the node.
/// </summary>
/// <returns>The error object value of the node.</returns>
/// <param name="factory">The error factory.</param>
IParsable GetErrorValue(Func<IParsable> factory);
T GetObjectValue<T>(ParsableFactory<T> factory) where T : IParsable;
/// <summary>
/// Callback called before the node is deserialized.
/// </summary>
Expand Down
15 changes: 15 additions & 0 deletions abstractions/dotnet/src/serialization/ParsableFactory.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------

using System;

namespace Microsoft.Kiota.Abstractions.Serialization;

/// <summary>
/// Defines the factory for creating parsable objects.
/// </summary>
/// <param name="node">The <see cref="IParseNode">node</see> to parse use to get the discriminator value from the payload.</param>
/// <returns>The <see cref="IParsable">parsable</see> object.</returns>
/// <typeparam name="T">The type of the parsable object.</typeparam>
public delegate T ParsableFactory<T>(IParseNode node) where T : IParsable;
andrueastman marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion abstractions/go/serialization/parsable.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ type Parsable interface {
}

// ParsableFactory is a factory for creating Parsable.
type ParsableFactory func() Parsable
type ParsableFactory func(parseNode ParseNode) (Parsable, error)
4 changes: 2 additions & 2 deletions abstractions/go/serialization/parse_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ type ParseNode interface {
// GetChildNode returns a new parse node for the given identifier.
GetChildNode(index string) (ParseNode, error)
// GetCollectionOfObjectValues returns the collection of Parsable values from the node.
GetCollectionOfObjectValues(ctor func() Parsable) ([]Parsable, error)
GetCollectionOfObjectValues(ctor ParsableFactory) ([]Parsable, error)
// GetCollectionOfPrimitiveValues returns the collection of primitive values from the node.
GetCollectionOfPrimitiveValues(targetType string) ([]interface{}, error)
// GetCollectionOfEnumValues returns the collection of Enum values from the node.
GetCollectionOfEnumValues(parser func(string) (interface{}, error)) ([]interface{}, error)
// GetObjectValue returns the Parsable value from the node.
GetObjectValue(ctor func() Parsable) (Parsable, error)
GetObjectValue(ctor ParsableFactory) (Parsable, error)
// GetStringValue returns a String value from the nodes.
GetStringValue() (*string, error)
// GetBoolValue returns a Bool value from the nodes.
Expand Down
2 changes: 1 addition & 1 deletion abstractions/java/lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ publishing {
publications {
gpr(MavenPublication) {
artifactId 'kiota-abstractions'
version '1.0.26'
version '1.0.27'
from(components.java)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import javax.annotation.Nullable;

import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParsableFactory;

/** Default response handler to access the native response object. */
public class NativeResponseHandler implements ResponseHandler {
Expand All @@ -16,14 +17,14 @@ public class NativeResponseHandler implements ResponseHandler {

/** The error mappings for the response to use when deserializing failed responses bodies. Where an error code like 401 applies specifically to that status code, a class code like 4XX applies to all status codes within the range if an the specific error code is not present. */
@Nullable
public HashMap<String, Class<? extends Parsable>> errorMappings;
public HashMap<String, ParsableFactory<? extends Parsable>> errorMappings;

/** {@inheritdoc} */
@Nonnull
@Override
public <NativeResponseType, ModelType> CompletableFuture<ModelType> handleResponseAsync(
NativeResponseType response,
HashMap<String, Class<? extends Parsable>> errorMappings) {
HashMap<String, ParsableFactory<? extends Parsable>> errorMappings) {
this.value = response;
this.errorMappings = errorMappings;
return CompletableFuture.completedFuture(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import javax.annotation.Nullable;

import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParsableFactory;
import com.microsoft.kiota.serialization.SerializationWriterFactory;
import com.microsoft.kiota.store.BackingStoreFactory;

Expand All @@ -26,23 +27,23 @@ public interface RequestAdapter {
/**
* Executes the HTTP request specified by the given RequestInformation and returns the deserialized response model.
* @param requestInfo the request info to execute.
* @param factory the factory to create the parsable object from the type discriminator.
* @param responseHandler The response handler to use for the HTTP request instead of the default handler.
* @param targetClass the class of the response model to deserialize the response into.
* @param errorMappings the error factories mapping to use in case of a failed request.
* @param <ModelType> the type of the response model to deserialize the response into.
* @return a {@link CompletableFuture} with the deserialized response model.
*/
<ModelType extends Parsable> CompletableFuture<ModelType> sendAsync(@Nonnull final RequestInformation requestInfo, @Nonnull final Class<ModelType> targetClass, @Nullable final ResponseHandler responseHandler, @Nullable final HashMap<String, Class<? extends Parsable>> errorMappings);
<ModelType extends Parsable> CompletableFuture<ModelType> sendAsync(@Nonnull final RequestInformation requestInfo, @Nonnull final ParsableFactory<ModelType> factory, @Nullable final ResponseHandler responseHandler, @Nullable final HashMap<String, ParsableFactory<? extends Parsable>> errorMappings);
/**
* Executes the HTTP request specified by the given RequestInformation and returns the deserialized response model collection.
* @param requestInfo the request info to execute.
* @param factory the factory to create the parsable object from the type discriminator.
* @param responseHandler The response handler to use for the HTTP request instead of the default handler.
* @param targetClass the class of the response model to deserialize the response into.
* @param errorMappings the error factories mapping to use in case of a failed request.
* @param <ModelType> the type of the response model to deserialize the response into.
* @return a {@link CompletableFuture} with the deserialized response model collection.
*/
<ModelType extends Parsable> CompletableFuture<Iterable<ModelType>> sendCollectionAsync(@Nonnull final RequestInformation requestInfo, @Nonnull final Class<ModelType> targetClass, @Nullable final ResponseHandler responseHandler, @Nullable final HashMap<String, Class<? extends Parsable>> errorMappings);
<ModelType extends Parsable> CompletableFuture<Iterable<ModelType>> sendCollectionAsync(@Nonnull final RequestInformation requestInfo, @Nonnull final ParsableFactory<ModelType> factory, @Nullable final ResponseHandler responseHandler, @Nullable final HashMap<String, ParsableFactory<? extends Parsable>> errorMappings);
/**
* Executes the HTTP request specified by the given RequestInformation and returns the deserialized primitive response model.
* @param requestInfo the request info to execute.
Expand All @@ -52,7 +53,7 @@ public interface RequestAdapter {
* @param <ModelType> the type of the response model to deserialize the response into.
* @return a {@link CompletableFuture} with the deserialized primitive response model.
*/
<ModelType> CompletableFuture<ModelType> sendPrimitiveAsync(@Nonnull final RequestInformation requestInfo, @Nonnull final Class<ModelType> targetClass, @Nullable final ResponseHandler responseHandler, @Nullable final HashMap<String, Class<? extends Parsable>> errorMappings);
<ModelType> CompletableFuture<ModelType> sendPrimitiveAsync(@Nonnull final RequestInformation requestInfo, @Nonnull final Class<ModelType> targetClass, @Nullable final ResponseHandler responseHandler, @Nullable final HashMap<String, ParsableFactory<? extends Parsable>> errorMappings);
/**
* Executes the HTTP request specified by the given RequestInformation and returns the deserialized primitive collection response model.
* @param requestInfo the request info to execute.
Expand All @@ -62,7 +63,7 @@ public interface RequestAdapter {
* @param <ModelType> the type of the response model to deserialize the response into.
* @return a {@link CompletableFuture} with the deserialized primitive collection response model.
*/
<ModelType> CompletableFuture<Iterable<ModelType>> sendPrimitiveCollectionAsync(@Nonnull final RequestInformation requestInfo, @Nonnull final Class<ModelType> targetClass, @Nullable final ResponseHandler responseHandler, @Nullable final HashMap<String, Class<? extends Parsable>> errorMappings);
<ModelType> CompletableFuture<Iterable<ModelType>> sendPrimitiveCollectionAsync(@Nonnull final RequestInformation requestInfo, @Nonnull final Class<ModelType> targetClass, @Nullable final ResponseHandler responseHandler, @Nullable final HashMap<String, ParsableFactory<? extends Parsable>> errorMappings);
/**
* Sets The base url for every request.
* @param baseUrl The base url for every request.
Expand Down
Loading