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

feat:Add new endpoints and enhance existing ones in Instill AI API OpenAPI spec #47

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
40 changes: 33 additions & 7 deletions src/libs/Instill/Generated/Instill.Models.EventSpecification.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,25 @@ namespace Instill
public sealed partial class EventSpecification
{
/// <summary>
/// JSON schema describing the component event setup data.<br/>
/// Event title.<br/>
/// Included only in responses
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("setupSchema")]
public object? SetupSchema { get; set; }
[global::System.Text.Json.Serialization.JsonPropertyName("title")]
public string? Title { get; set; }

/// <summary>
/// Event description.<br/>
/// Included only in responses
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("description")]
public string? Description { get; set; }

/// <summary>
/// JSON schema describing the component event config data.<br/>
/// Included only in responses
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("configSchema")]
public object? ConfigSchema { get; set; }

/// <summary>
/// JSON schema describing the component event message data.<br/>
Expand All @@ -38,8 +52,16 @@ public sealed partial class EventSpecification
/// <summary>
/// Initializes a new instance of the <see cref="EventSpecification" /> class.
/// </summary>
/// <param name="setupSchema">
/// JSON schema describing the component event setup data.<br/>
/// <param name="title">
/// Event title.<br/>
/// Included only in responses
/// </param>
/// <param name="description">
/// Event description.<br/>
/// Included only in responses
/// </param>
/// <param name="configSchema">
/// JSON schema describing the component event config data.<br/>
/// Included only in responses
/// </param>
/// <param name="messageSchema">
Expand All @@ -52,11 +74,15 @@ public sealed partial class EventSpecification
/// </param>
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public EventSpecification(
object? setupSchema,
string? title,
string? description,
object? configSchema,
object? messageSchema,
global::System.Collections.Generic.IList<object>? messageExamples)
{
this.SetupSchema = setupSchema;
this.Title = title;
this.Description = description;
this.ConfigSchema = configSchema;
this.MessageSchema = messageSchema;
this.MessageExamples = messageExamples;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Instill
{
public sealed partial class EventSpecificationSetupSchema
public sealed partial class EventSpecificationConfigSchema
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
Expand Down Expand Up @@ -34,14 +34,14 @@ public string ToJson(
/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::Instill.EventSpecificationSetupSchema? FromJson(
public static global::Instill.EventSpecificationConfigSchema? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::Instill.EventSpecificationSetupSchema),
jsonSerializerContext) as global::Instill.EventSpecificationSetupSchema;
typeof(global::Instill.EventSpecificationConfigSchema),
jsonSerializerContext) as global::Instill.EventSpecificationConfigSchema;
}

/// <summary>
Expand All @@ -51,26 +51,26 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::Instill.EventSpecificationSetupSchema? FromJson(
public static global::Instill.EventSpecificationConfigSchema? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::Instill.EventSpecificationSetupSchema>(
return global::System.Text.Json.JsonSerializer.Deserialize<global::Instill.EventSpecificationConfigSchema>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Instill.EventSpecificationSetupSchema?> FromJsonStreamAsync(
public static async global::System.Threading.Tasks.ValueTask<global::Instill.EventSpecificationConfigSchema?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::Instill.EventSpecificationSetupSchema),
jsonSerializerContext).ConfigureAwait(false)) as global::Instill.EventSpecificationSetupSchema;
typeof(global::Instill.EventSpecificationConfigSchema),
jsonSerializerContext).ConfigureAwait(false)) as global::Instill.EventSpecificationConfigSchema;
}

/// <summary>
Expand All @@ -80,11 +80,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
public static global::System.Threading.Tasks.ValueTask<global::Instill.EventSpecificationSetupSchema?> FromJsonStreamAsync(
public static global::System.Threading.Tasks.ValueTask<global::Instill.EventSpecificationConfigSchema?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Instill.EventSpecificationSetupSchema?>(
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Instill.EventSpecificationConfigSchema?>(
jsonStream,
jsonSerializerOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
namespace Instill
{
/// <summary>
/// JSON schema describing the component event setup data.<br/>
/// JSON schema describing the component event config data.<br/>
/// Included only in responses
/// </summary>
public sealed partial class EventSpecificationSetupSchema
public sealed partial class EventSpecificationConfigSchema
{

/// <summary>
Expand All @@ -17,10 +17,10 @@ public sealed partial class EventSpecificationSetupSchema
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

/// <summary>
/// Initializes a new instance of the <see cref="EventSpecificationSetupSchema" /> class.
/// Initializes a new instance of the <see cref="EventSpecificationConfigSchema" /> class.
/// </summary>
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public EventSpecificationSetupSchema(
public EventSpecificationConfigSchema(
)
{
}
Expand Down
12 changes: 10 additions & 2 deletions src/libs/Instill/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6856,9 +6856,17 @@ components:
EventSpecification:
type: object
properties:
setupSchema:
title:
type: string
description: Event title.
readOnly: true
description:
type: string
description: Event description.
readOnly: true
configSchema:
type: object
description: JSON schema describing the component event setup data.
description: JSON schema describing the component event config data.
readOnly: true
messageSchema:
type: object
Expand Down
Loading