Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 21, 2024
1 parent a2a3550 commit af7d628
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ public partial interface IObjectClient
/// <param name="namespaceId"></param>
/// <param name="objectUid"></param>
/// <param name="objectName"></param>
/// <param name="expirationTime"></param>
/// <param name="urlExpireDays"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Instill.GetObjectDownloadURLResponse> GetObjectDownloadURLAsync(
string namespaceId,
string? objectUid = default,
string? objectName = default,
int? expirationTime = default,
int? urlExpireDays = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ public partial interface IObjectClient
/// </summary>
/// <param name="namespaceId"></param>
/// <param name="objectName"></param>
/// <param name="expirationTime"></param>
/// <param name="urlExpireDays"></param>
/// <param name="lastModifiedTime"></param>
/// <param name="objectExpireDays"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Instill.GetObjectUploadURLResponse> GetObjectUploadURLAsync(
string namespaceId,
string objectName,
int? expirationTime = default,
int? urlExpireDays = default,
global::System.DateTime? lastModifiedTime = default,
int? objectExpireDays = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
6 changes: 6 additions & 0 deletions src/libs/Instill/Generated/Instill.Models.Object.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ public sealed partial class Object
[global::System.Text.Json.Serialization.JsonPropertyName("objectExpireDays")]
public int? ObjectExpireDays { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("lastModifiedTime")]
public global::System.DateTime? LastModifiedTime { get; set; }

/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ partial void PrepareGetObjectDownloadURLArguments(
ref string namespaceId,
ref string? objectUid,
ref string? objectName,
ref int? expirationTime);
ref int? urlExpireDays);
partial void PrepareGetObjectDownloadURLRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string namespaceId,
string? objectUid,
string? objectName,
int? expirationTime);
int? urlExpireDays);
partial void ProcessGetObjectDownloadURLResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -33,14 +33,14 @@ partial void ProcessGetObjectDownloadURLResponseContent(
/// <param name="namespaceId"></param>
/// <param name="objectUid"></param>
/// <param name="objectName"></param>
/// <param name="expirationTime"></param>
/// <param name="urlExpireDays"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::Instill.GetObjectDownloadURLResponse> GetObjectDownloadURLAsync(
string namespaceId,
string? objectUid = default,
string? objectName = default,
int? expirationTime = default,
int? urlExpireDays = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
Expand All @@ -50,15 +50,15 @@ partial void ProcessGetObjectDownloadURLResponseContent(
namespaceId: ref namespaceId,
objectUid: ref objectUid,
objectName: ref objectName,
expirationTime: ref expirationTime);
urlExpireDays: ref urlExpireDays);

var __pathBuilder = new PathBuilder(
path: $"/v1alpha/namespaces/{namespaceId}/object-download-url",
baseUri: _httpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("objectUid", objectUid)
.AddOptionalParameter("objectName", objectName)
.AddOptionalParameter("expirationTime", expirationTime?.ToString())
.AddOptionalParameter("urlExpireDays", urlExpireDays?.ToString())
;
var __path = __pathBuilder.ToString();
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
Expand Down Expand Up @@ -90,7 +90,7 @@ partial void ProcessGetObjectDownloadURLResponseContent(
namespaceId: namespaceId,
objectUid: objectUid,
objectName: objectName,
expirationTime: expirationTime);
urlExpireDays: urlExpireDays);

using var response = await _httpClient.SendAsync(
request: httpRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ partial void PrepareGetObjectUploadURLArguments(
global::System.Net.Http.HttpClient httpClient,
ref string namespaceId,
ref string objectName,
ref int? expirationTime,
ref int? urlExpireDays,
ref global::System.DateTime? lastModifiedTime,
ref int? objectExpireDays);
partial void PrepareGetObjectUploadURLRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string namespaceId,
string objectName,
int? expirationTime,
int? urlExpireDays,
global::System.DateTime? lastModifiedTime,
int? objectExpireDays);
partial void ProcessGetObjectUploadURLResponse(
Expand All @@ -34,15 +34,15 @@ partial void ProcessGetObjectUploadURLResponseContent(
/// </summary>
/// <param name="namespaceId"></param>
/// <param name="objectName"></param>
/// <param name="expirationTime"></param>
/// <param name="urlExpireDays"></param>
/// <param name="lastModifiedTime"></param>
/// <param name="objectExpireDays"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::Instill.GetObjectUploadURLResponse> GetObjectUploadURLAsync(
string namespaceId,
string objectName,
int? expirationTime = default,
int? urlExpireDays = default,
global::System.DateTime? lastModifiedTime = default,
int? objectExpireDays = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand All @@ -53,7 +53,7 @@ partial void ProcessGetObjectUploadURLResponseContent(
httpClient: _httpClient,
namespaceId: ref namespaceId,
objectName: ref objectName,
expirationTime: ref expirationTime,
urlExpireDays: ref urlExpireDays,
lastModifiedTime: ref lastModifiedTime,
objectExpireDays: ref objectExpireDays);

Expand All @@ -62,7 +62,7 @@ partial void ProcessGetObjectUploadURLResponseContent(
baseUri: _httpClient.BaseAddress);
__pathBuilder
.AddRequiredParameter("objectName", objectName)
.AddOptionalParameter("expirationTime", expirationTime?.ToString())
.AddOptionalParameter("urlExpireDays", urlExpireDays?.ToString())
.AddOptionalParameter("lastModifiedTime", lastModifiedTime?.ToString("yyyy-MM-ddTHH:mm:ssZ"))
.AddOptionalParameter("objectExpireDays", objectExpireDays?.ToString())
;
Expand Down Expand Up @@ -95,7 +95,7 @@ partial void ProcessGetObjectUploadURLResponseContent(
httpRequestMessage: httpRequest,
namespaceId: namespaceId,
objectName: objectName,
expirationTime: expirationTime,
urlExpireDays: urlExpireDays,
lastModifiedTime: lastModifiedTime,
objectExpireDays: objectExpireDays);

Expand Down
20 changes: 12 additions & 8 deletions src/libs/Instill/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1719,21 +1719,21 @@ paths:
required: true
schema:
type: string
- name: expirationTime
- name: urlExpireDays
in: query
description: "expiration time in minutes for the URL with a default value of 1440 minutes (1 day).\nminimum is 60 minutes (1 hour) and maximum is 20160 minutes (14 days)"
description: "Expiration time in days for the URL.\nMinimum is 1 day and maximum is 7 days. If not set or set to 0, defaults to 1 day."
schema:
type: integer
format: int32
- name: lastModifiedTime
in: query
description: last modified time this value is provided by the client when the object url is created
description: "last modified time this value is provided by the client when the object url is created\nit must be in RFC3339 formatted date-time string"
schema:
type: string
format: date-time
- name: objectExpireDays
in: query
description: "object live time in days\nminimum is 1 day. if not set, the object will not be deleted automatically"
description: "object live time in days\nminimum is 1 day. if set to 0, the object will not be deleted automatically"
schema:
type: integer
format: int32
Expand Down Expand Up @@ -1778,9 +1778,9 @@ paths:
description: "object name\nif provided, object uid is not required"
schema:
type: string
- name: expirationTime
- name: urlExpireDays
in: query
description: "expiration time in minutes for url with default value to 1440 minutes (1 day).\nminimum is 60 minutes (1 hour) and maximum is 20160 minutes (14 days)"
description: "Expiration time in days for the URL.\nMinimum is 1 day and maximum is 7 days. If not set or set to 0, defaults to 1 day."
schema:
type: integer
format: int32
Expand Down Expand Up @@ -3411,7 +3411,7 @@ components:
type: string
format: int64
contentType:
title: "content type\nthis is from content-type header of http request"
title: "content type\nthis is mime type from content-type header of http request or from file extension"
type: string
namespaceUid:
title: namespace uid
Expand All @@ -3426,9 +3426,13 @@ components:
title: object path(optional)
type: string
objectExpireDays:
title: "object live time in days\nminimum is 1 day. if not set, the object will not be deleted automatically"
title: "object live time in days\nif set to 0, the object will not be deleted automatically"
type: integer
format: int32
lastModifiedTime:
title: last modified time
type: string
format: date-time
createdTime:
title: created time
type: string
Expand Down

0 comments on commit af7d628

Please sign in to comment.