Skip to content

Commit b234286

Browse files
committed
update client for xrequestID header
1 parent 4450018 commit b234286

File tree

84 files changed

+98
-1206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+98
-1206
lines changed

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.0-beta2
1+
5.0.0

generator-templates/ApiClient.mustache

Lines changed: 0 additions & 601 deletions
This file was deleted.

generator-templates/api.mustache

Lines changed: 0 additions & 484 deletions
This file was deleted.

generator-templates/modelEnum.mustache

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/Regula.DocumentReader.WebClient/Api/DefaultApi.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public interface IDefaultApi : IApiAccessor
3434
/// <exception cref="Regula.DocumentReader.WebClient.Client.ApiException">Thrown when fails to make API call</exception>
3535
/// <param name="xRequestID"> (optional)</param>
3636
/// <returns>DeviceInfo</returns>
37-
DeviceInfo Ping (string xRequestID = default(string), Dictionary<String, String> headers);
37+
DeviceInfo Ping (string xRequestID = default(string));
3838

3939
/// <summary>
4040
/// Server health check
@@ -45,7 +45,7 @@ public interface IDefaultApi : IApiAccessor
4545
/// <exception cref="Regula.DocumentReader.WebClient.Client.ApiException">Thrown when fails to make API call</exception>
4646
/// <param name="xRequestID"> (optional)</param>
4747
/// <returns>ApiResponse of DeviceInfo</returns>
48-
ApiResponse<DeviceInfo> PingWithHttpInfo (string xRequestID = default(string), Dictionary<String, String> headers);
48+
ApiResponse<DeviceInfo> PingWithHttpInfo (string xRequestID = default(string));
4949
#endregion Synchronous Operations
5050
#region Asynchronous Operations
5151
/// <summary>
@@ -188,9 +188,9 @@ public void AddDefaultHeader(string key, string value)
188188
/// <exception cref="Regula.DocumentReader.WebClient.Client.ApiException">Thrown when fails to make API call</exception>
189189
/// <param name="xRequestID"> (optional)</param>
190190
/// <returns>DeviceInfo</returns>
191-
public DeviceInfo Ping (string xRequestID = default(string), Dictionary<String, String> headers)
191+
public DeviceInfo Ping (string xRequestID = default(string))
192192
{
193-
ApiResponse<DeviceInfo> localVarResponse = PingWithHttpInfo(xRequestID, headers);
193+
ApiResponse<DeviceInfo> localVarResponse = PingWithHttpInfo(xRequestID);
194194
return localVarResponse.Data;
195195
}
196196

@@ -200,13 +200,13 @@ public void AddDefaultHeader(string key, string value)
200200
/// <exception cref="Regula.DocumentReader.WebClient.Client.ApiException">Thrown when fails to make API call</exception>
201201
/// <param name="xRequestID"> (optional)</param>
202202
/// <returns>ApiResponse of DeviceInfo</returns>
203-
public ApiResponse<DeviceInfo> PingWithHttpInfo (string xRequestID = default(string), Dictionary<String, String> headers)
203+
public ApiResponse<DeviceInfo> PingWithHttpInfo (string xRequestID = default(string))
204204
{
205205

206206
var localVarPath = "/api/ping";
207207
var localVarPathParams = new Dictionary<String, String>();
208208
var localVarQueryParams = new List<KeyValuePair<String, String>>();
209-
var localVarHeaderParams = this.Configuration.DefaultHeader.Union(headers).ToDictionary (k => k.Key, v => v.Value);
209+
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
210210
var localVarFormParams = new Dictionary<String, String>();
211211
var localVarFileParams = new Dictionary<String, FileParameter>();
212212
Object localVarPostBody = null;

src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,26 @@ public DocumentReaderApi(string basePath)
2020

2121
public RecognitionResponse Process(ProcessRequest processRequest)
2222
{
23-
return Process(processRequest, new Dictionary<String, String>());
23+
return Process(processRequest, default(string));
2424
}
2525

26-
public RecognitionResponse Process(ProcessRequest processRequest, Dictionary<String, String> headers)
26+
public RecognitionResponse Process(ProcessRequest processRequest, String xRequestID)
2727
{
2828
if (processRequest.SystemInfo == null)
2929
processRequest.SystemInfo = new ProcessSystemInfo(License);
3030
else
3131
processRequest.SystemInfo.License = License;
3232

33-
return new RecognitionResponse(this._processApi.ApiProcess(processRequest, headers));
33+
return new RecognitionResponse(this._processApi.ApiProcess(processRequest, xRequestID));
3434
}
35-
public DeviceInfo Ping ()
35+
public DeviceInfo Ping (string xRequestID)
3636
{
37-
return this._defaultApi.Ping(new Dictionary<String, String>());
37+
return this._defaultApi.Ping(xRequestID);
3838
}
3939

40-
public DeviceInfo Ping (Dictionary<String, String> headers)
40+
public DeviceInfo Ping ()
4141
{
42-
return this._defaultApi.Ping(headers);
42+
return this._defaultApi.Ping();
4343
}
4444

4545
public DocumentReaderApi WithLicense(string license)

src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public interface IProcessApi : IApiAccessor
3535
/// <param name="processRequest"></param>
3636
/// <param name="xRequestID"> (optional)</param>
3737
/// <returns>ProcessResponse</returns>
38-
ProcessResponse ApiProcess (ProcessRequest processRequest, , string xRequestID = default(string), Dictionary<String, String> headers);
38+
ProcessResponse ApiProcess (ProcessRequest processRequest, string xRequestID = default(string));
3939

4040
/// <summary>
4141
/// Process list of documents images and return extracted data
@@ -47,7 +47,7 @@ public interface IProcessApi : IApiAccessor
4747
/// <param name="processRequest"></param>
4848
/// <param name="xRequestID"> (optional)</param>
4949
/// <returns>ApiResponse of ProcessResponse</returns>
50-
ApiResponse<ProcessResponse> ApiProcessWithHttpInfo (ProcessRequest processRequest, , string xRequestID = default(string), Dictionary<String, String> headers);
50+
ApiResponse<ProcessResponse> ApiProcessWithHttpInfo (ProcessRequest processRequest, string xRequestID = default(string));
5151
#endregion Synchronous Operations
5252
#region Asynchronous Operations
5353
/// <summary>
@@ -193,9 +193,9 @@ public void AddDefaultHeader(string key, string value)
193193
/// <param name="processRequest"></param>
194194
/// <param name="xRequestID"> (optional)</param>
195195
/// <returns>ProcessResponse</returns>
196-
public ProcessResponse ApiProcess (ProcessRequest processRequest, , string xRequestID = default(string), Dictionary<String, String> headers)
196+
public ProcessResponse ApiProcess (ProcessRequest processRequest, string xRequestID = default(string))
197197
{
198-
ApiResponse<ProcessResponse> localVarResponse = ApiProcessWithHttpInfo(processRequest, , xRequestID, headers);
198+
ApiResponse<ProcessResponse> localVarResponse = ApiProcessWithHttpInfo(processRequest, xRequestID);
199199
return localVarResponse.Data;
200200
}
201201

@@ -206,7 +206,7 @@ public void AddDefaultHeader(string key, string value)
206206
/// <param name="processRequest"></param>
207207
/// <param name="xRequestID"> (optional)</param>
208208
/// <returns>ApiResponse of ProcessResponse</returns>
209-
public ApiResponse<ProcessResponse> ApiProcessWithHttpInfo (ProcessRequest processRequest, , string xRequestID = default(string), Dictionary<String, String> headers)
209+
public ApiResponse<ProcessResponse> ApiProcessWithHttpInfo (ProcessRequest processRequest, string xRequestID = default(string))
210210
{
211211
// verify the required parameter 'processRequest' is set
212212
if (processRequest == null)
@@ -215,7 +215,7 @@ public void AddDefaultHeader(string key, string value)
215215
var localVarPath = "/api/process";
216216
var localVarPathParams = new Dictionary<String, String>();
217217
var localVarQueryParams = new List<KeyValuePair<String, String>>();
218-
var localVarHeaderParams = this.Configuration.DefaultHeader.Union(headers).ToDictionary (k => k.Key, v => v.Value);
218+
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
219219
var localVarFormParams = new Dictionary<String, String>();
220220
var localVarFileParams = new Dictionary<String, FileParameter>();
221221
Object localVarPostBody = null;

src/Regula.DocumentReader.WebClient/Client/ApiClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace Regula.DocumentReader.WebClient.Client
2929
/// </summary>
3030
public partial class ApiClient
3131
{
32-
private JsonSerializerSettings serializerSettings = new JsonSerializerSettings
32+
public JsonSerializerSettings serializerSettings = new JsonSerializerSettings
3333
{
3434
ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor
3535
};

src/Regula.DocumentReader.WebClient/Model/AreaArray.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public override string ToString()
7373
/// <returns>JSON string presentation of the object</returns>
7474
public virtual string ToJson()
7575
{
76-
return JsonConvert.SerializeObject(this, Formatting.Indented);
76+
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
7777
}
7878

7979
/// <summary>

src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public override string ToString()
8282
/// <returns>JSON string presentation of the object</returns>
8383
public virtual string ToJson()
8484
{
85-
return JsonConvert.SerializeObject(this, Formatting.Indented);
85+
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
8686
}
8787

8888
/// <summary>

0 commit comments

Comments
 (0)