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:Update OpenAPI Specification: Rename Schemas and Parameters for Clarity #56

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace Replicate.JsonConverters
{
/// <inheritdoc />
public sealed class VersionPredictionRequestWebhookEventsFilterItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Replicate.VersionPredictionRequestWebhookEventsFilterItem>
public sealed class SchemasPredictionRequestWebhookEventsFilterItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Replicate.SchemasPredictionRequestWebhookEventsFilterItem>
{
/// <inheritdoc />
public override global::Replicate.VersionPredictionRequestWebhookEventsFilterItem Read(
public override global::Replicate.SchemasPredictionRequestWebhookEventsFilterItem Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,15 +18,15 @@ public sealed class VersionPredictionRequestWebhookEventsFilterItemJsonConverter
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Replicate.VersionPredictionRequestWebhookEventsFilterItemExtensions.ToEnum(stringValue) ?? default;
return global::Replicate.SchemasPredictionRequestWebhookEventsFilterItemExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Replicate.VersionPredictionRequestWebhookEventsFilterItem)numValue;
return (global::Replicate.SchemasPredictionRequestWebhookEventsFilterItem)numValue;
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -38,12 +38,12 @@ public sealed class VersionPredictionRequestWebhookEventsFilterItemJsonConverter
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Replicate.VersionPredictionRequestWebhookEventsFilterItem value,
global::Replicate.SchemasPredictionRequestWebhookEventsFilterItem value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Replicate.VersionPredictionRequestWebhookEventsFilterItemExtensions.ToValueString(value));
writer.WriteStringValue(global::Replicate.SchemasPredictionRequestWebhookEventsFilterItemExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace Replicate.JsonConverters
{
/// <inheritdoc />
public sealed class VersionPredictionRequestWebhookEventsFilterItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Replicate.VersionPredictionRequestWebhookEventsFilterItem?>
public sealed class SchemasPredictionRequestWebhookEventsFilterItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Replicate.SchemasPredictionRequestWebhookEventsFilterItem?>
{
/// <inheritdoc />
public override global::Replicate.VersionPredictionRequestWebhookEventsFilterItem? Read(
public override global::Replicate.SchemasPredictionRequestWebhookEventsFilterItem? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,15 +18,15 @@ public sealed class VersionPredictionRequestWebhookEventsFilterItemNullableJsonC
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Replicate.VersionPredictionRequestWebhookEventsFilterItemExtensions.ToEnum(stringValue);
return global::Replicate.SchemasPredictionRequestWebhookEventsFilterItemExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Replicate.VersionPredictionRequestWebhookEventsFilterItem)numValue;
return (global::Replicate.SchemasPredictionRequestWebhookEventsFilterItem)numValue;
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -38,7 +38,7 @@ public sealed class VersionPredictionRequestWebhookEventsFilterItemNullableJsonC
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Replicate.VersionPredictionRequestWebhookEventsFilterItem? value,
global::Replicate.SchemasPredictionRequestWebhookEventsFilterItem? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
Expand All @@ -49,7 +49,7 @@ public override void Write(
}
else
{
writer.WriteStringValue(global::Replicate.VersionPredictionRequestWebhookEventsFilterItemExtensions.ToValueString(value.Value));
writer.WriteStringValue(global::Replicate.SchemasPredictionRequestWebhookEventsFilterItemExtensions.ToValueString(value.Value));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace Replicate.JsonConverters
{
/// <inheritdoc />
public sealed class PredictionRequestWebhookEventsFilterItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Replicate.PredictionRequestWebhookEventsFilterItem>
public sealed class SchemasTrainingRequestWebhookEventsFilterItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Replicate.SchemasTrainingRequestWebhookEventsFilterItem>
{
/// <inheritdoc />
public override global::Replicate.PredictionRequestWebhookEventsFilterItem Read(
public override global::Replicate.SchemasTrainingRequestWebhookEventsFilterItem Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,15 +18,15 @@ public sealed class PredictionRequestWebhookEventsFilterItemJsonConverter : glob
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Replicate.PredictionRequestWebhookEventsFilterItemExtensions.ToEnum(stringValue) ?? default;
return global::Replicate.SchemasTrainingRequestWebhookEventsFilterItemExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Replicate.PredictionRequestWebhookEventsFilterItem)numValue;
return (global::Replicate.SchemasTrainingRequestWebhookEventsFilterItem)numValue;
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -38,12 +38,12 @@ public sealed class PredictionRequestWebhookEventsFilterItemJsonConverter : glob
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Replicate.PredictionRequestWebhookEventsFilterItem value,
global::Replicate.SchemasTrainingRequestWebhookEventsFilterItem value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Replicate.PredictionRequestWebhookEventsFilterItemExtensions.ToValueString(value));
writer.WriteStringValue(global::Replicate.SchemasTrainingRequestWebhookEventsFilterItemExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace Replicate.JsonConverters
{
/// <inheritdoc />
public sealed class PredictionRequestWebhookEventsFilterItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Replicate.PredictionRequestWebhookEventsFilterItem?>
public sealed class SchemasTrainingRequestWebhookEventsFilterItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Replicate.SchemasTrainingRequestWebhookEventsFilterItem?>
{
/// <inheritdoc />
public override global::Replicate.PredictionRequestWebhookEventsFilterItem? Read(
public override global::Replicate.SchemasTrainingRequestWebhookEventsFilterItem? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,15 +18,15 @@ public sealed class PredictionRequestWebhookEventsFilterItemNullableJsonConverte
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Replicate.PredictionRequestWebhookEventsFilterItemExtensions.ToEnum(stringValue);
return global::Replicate.SchemasTrainingRequestWebhookEventsFilterItemExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Replicate.PredictionRequestWebhookEventsFilterItem)numValue;
return (global::Replicate.SchemasTrainingRequestWebhookEventsFilterItem)numValue;
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -38,7 +38,7 @@ public sealed class PredictionRequestWebhookEventsFilterItemNullableJsonConverte
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Replicate.PredictionRequestWebhookEventsFilterItem? value,
global::Replicate.SchemasTrainingRequestWebhookEventsFilterItem? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
Expand All @@ -49,7 +49,7 @@ public override void Write(
}
else
{
writer.WriteStringValue(global::Replicate.PredictionRequestWebhookEventsFilterItemExtensions.ToValueString(value.Value));
writer.WriteStringValue(global::Replicate.SchemasTrainingRequestWebhookEventsFilterItemExtensions.ToValueString(value.Value));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace Replicate.JsonConverters
{
/// <inheritdoc />
public sealed class TrainingRequestWebhookEventsFilterItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Replicate.TrainingRequestWebhookEventsFilterItem>
public sealed class SchemasVersionPredictionRequestWebhookEventsFilterItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Replicate.SchemasVersionPredictionRequestWebhookEventsFilterItem>
{
/// <inheritdoc />
public override global::Replicate.TrainingRequestWebhookEventsFilterItem Read(
public override global::Replicate.SchemasVersionPredictionRequestWebhookEventsFilterItem Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,15 +18,15 @@ public sealed class TrainingRequestWebhookEventsFilterItemJsonConverter : global
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Replicate.TrainingRequestWebhookEventsFilterItemExtensions.ToEnum(stringValue) ?? default;
return global::Replicate.SchemasVersionPredictionRequestWebhookEventsFilterItemExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Replicate.TrainingRequestWebhookEventsFilterItem)numValue;
return (global::Replicate.SchemasVersionPredictionRequestWebhookEventsFilterItem)numValue;
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -38,12 +38,12 @@ public sealed class TrainingRequestWebhookEventsFilterItemJsonConverter : global
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Replicate.TrainingRequestWebhookEventsFilterItem value,
global::Replicate.SchemasVersionPredictionRequestWebhookEventsFilterItem value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Replicate.TrainingRequestWebhookEventsFilterItemExtensions.ToValueString(value));
writer.WriteStringValue(global::Replicate.SchemasVersionPredictionRequestWebhookEventsFilterItemExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace Replicate.JsonConverters
{
/// <inheritdoc />
public sealed class TrainingRequestWebhookEventsFilterItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Replicate.TrainingRequestWebhookEventsFilterItem?>
public sealed class SchemasVersionPredictionRequestWebhookEventsFilterItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Replicate.SchemasVersionPredictionRequestWebhookEventsFilterItem?>
{
/// <inheritdoc />
public override global::Replicate.TrainingRequestWebhookEventsFilterItem? Read(
public override global::Replicate.SchemasVersionPredictionRequestWebhookEventsFilterItem? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,15 +18,15 @@ public sealed class TrainingRequestWebhookEventsFilterItemNullableJsonConverter
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Replicate.TrainingRequestWebhookEventsFilterItemExtensions.ToEnum(stringValue);
return global::Replicate.SchemasVersionPredictionRequestWebhookEventsFilterItemExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Replicate.TrainingRequestWebhookEventsFilterItem)numValue;
return (global::Replicate.SchemasVersionPredictionRequestWebhookEventsFilterItem)numValue;
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -38,7 +38,7 @@ public sealed class TrainingRequestWebhookEventsFilterItemNullableJsonConverter
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Replicate.TrainingRequestWebhookEventsFilterItem? value,
global::Replicate.SchemasVersionPredictionRequestWebhookEventsFilterItem? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
Expand All @@ -49,7 +49,7 @@ public override void Write(
}
else
{
writer.WriteStringValue(global::Replicate.TrainingRequestWebhookEventsFilterItemExtensions.ToValueString(value.Value));
writer.WriteStringValue(global::Replicate.SchemasVersionPredictionRequestWebhookEventsFilterItemExtensions.ToValueString(value.Value));
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/libs/Replicate/Generated/JsonSerializerContext.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ namespace Replicate
DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull,
Converters = new global::System.Type[]
{
typeof(global::Replicate.JsonConverters.PredictionRequestWebhookEventsFilterItemJsonConverter),
typeof(global::Replicate.JsonConverters.PredictionRequestWebhookEventsFilterItemNullableJsonConverter),
typeof(global::Replicate.JsonConverters.TrainingRequestWebhookEventsFilterItemJsonConverter),
typeof(global::Replicate.JsonConverters.TrainingRequestWebhookEventsFilterItemNullableJsonConverter),
typeof(global::Replicate.JsonConverters.VersionPredictionRequestWebhookEventsFilterItemJsonConverter),
typeof(global::Replicate.JsonConverters.VersionPredictionRequestWebhookEventsFilterItemNullableJsonConverter),
typeof(global::Replicate.JsonConverters.SchemasPredictionRequestWebhookEventsFilterItemJsonConverter),
typeof(global::Replicate.JsonConverters.SchemasPredictionRequestWebhookEventsFilterItemNullableJsonConverter),
typeof(global::Replicate.JsonConverters.SchemasTrainingRequestWebhookEventsFilterItemJsonConverter),
typeof(global::Replicate.JsonConverters.SchemasTrainingRequestWebhookEventsFilterItemNullableJsonConverter),
typeof(global::Replicate.JsonConverters.SchemasVersionPredictionRequestWebhookEventsFilterItemJsonConverter),
typeof(global::Replicate.JsonConverters.SchemasVersionPredictionRequestWebhookEventsFilterItemNullableJsonConverter),
typeof(global::Replicate.JsonConverters.ModelsCreateRequestVisibilityJsonConverter),
typeof(global::Replicate.JsonConverters.ModelsCreateRequestVisibilityNullableJsonConverter),
typeof(global::Replicate.JsonConverters.AccountGetResponseTypeJsonConverter),
Expand Down
Loading
Loading