Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ public sealed partial class SearchResultOutputEntitieVariant3Properties
[global::System.Text.Json.Serialization.JsonPropertyName("referenceCount")]
public int? ReferenceCount { get; set; }

/// <summary>
/// Publication abstract text.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("abstract")]
public string? Abstract { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand Down Expand Up @@ -90,6 +96,9 @@ public sealed partial class SearchResultOutputEntitieVariant3Properties
/// <param name="referenceCount">
/// Number of works this publication cites (outgoing references).
/// </param>
/// <param name="abstract">
/// Publication abstract text.
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -101,7 +110,8 @@ public SearchResultOutputEntitieVariant3Properties(
global::Exa.SearchResultOutputEntitieVariant3PropertiesType2? type,
string? language,
int? citationCount,
int? referenceCount)
int? referenceCount,
string? @abstract)
{
this.Title = title;
this.Year = year;
Expand All @@ -111,6 +121,7 @@ public SearchResultOutputEntitieVariant3Properties(
this.CitationCount = citationCount;
this.Authors = authors ?? throw new global::System.ArgumentNullException(nameof(authors));
this.ReferenceCount = referenceCount;
this.Abstract = @abstract;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
#nullable enable

namespace Exa
{
public sealed partial class SearchResultOutputEntitieVariant3PropertiesAbstract
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
/// </summary>
public string ToJson()
{
return ToJson(global::Exa.SourceGenerationContext.Default);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[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 string ToJson(
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
if (jsonSerializerOptions is null)
{
return ToJson(global::Exa.SourceGenerationContext.Default);
}

return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::Exa.SearchResultOutputEntitieVariant3PropertiesAbstract? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::Exa.SearchResultOutputEntitieVariant3PropertiesAbstract),
jsonSerializerContext) as global::Exa.SearchResultOutputEntitieVariant3PropertiesAbstract;
}

/// <summary>
/// Deserializes a JSON string using the generated default JsonSerializerContext.
/// </summary>
public static global::Exa.SearchResultOutputEntitieVariant3PropertiesAbstract? FromJson(
string json)
{
return FromJson(
json,
global::Exa.SourceGenerationContext.Default);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[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::Exa.SearchResultOutputEntitieVariant3PropertiesAbstract? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
if (jsonSerializerOptions is null)
{
return FromJson(
json,
global::Exa.SourceGenerationContext.Default);
}

return global::System.Text.Json.JsonSerializer.Deserialize<global::Exa.SearchResultOutputEntitieVariant3PropertiesAbstract>(
json,
jsonSerializerOptions);
}

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

/// <summary>
/// Deserializes a JSON stream using the generated default JsonSerializerContext.
/// </summary>
public static global::System.Threading.Tasks.ValueTask<global::Exa.SearchResultOutputEntitieVariant3PropertiesAbstract?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream)
{
return FromJsonStreamAsync(
jsonStream,
global::Exa.SourceGenerationContext.Default);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#if NET8_0_OR_GREATER
[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::Exa.SearchResultOutputEntitieVariant3PropertiesAbstract?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
if (jsonSerializerOptions is null)
{
return FromJsonStreamAsync(
jsonStream,
global::Exa.SourceGenerationContext.Default);
}

return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Exa.SearchResultOutputEntitieVariant3PropertiesAbstract?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

#nullable enable

namespace Exa
{
/// <summary>
/// Publication abstract text.
/// </summary>
public sealed partial class SearchResultOutputEntitieVariant3PropertiesAbstract
{

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ public enum WebsetItemEvaluationSatisfied
/// <summary>
///
/// </summary>
No,
False,
/// <summary>
///
/// </summary>
Unclear,
True,
/// <summary>
///
/// </summary>
Yes,
Unclear,
}

/// <summary>
Expand All @@ -34,9 +34,9 @@ public static string ToValueString(this WebsetItemEvaluationSatisfied value)
{
return value switch
{
WebsetItemEvaluationSatisfied.No => "no",
WebsetItemEvaluationSatisfied.False => "false",
WebsetItemEvaluationSatisfied.True => "true",
WebsetItemEvaluationSatisfied.Unclear => "unclear",
WebsetItemEvaluationSatisfied.Yes => "yes",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -47,9 +47,9 @@ public static string ToValueString(this WebsetItemEvaluationSatisfied value)
{
return value switch
{
"no" => WebsetItemEvaluationSatisfied.No,
"false" => WebsetItemEvaluationSatisfied.False,
"true" => WebsetItemEvaluationSatisfied.True,
"unclear" => WebsetItemEvaluationSatisfied.Unclear,
"yes" => WebsetItemEvaluationSatisfied.Yes,
_ => null,
};
}
Expand Down
10 changes: 8 additions & 2 deletions src/libs/Exa/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8147,6 +8147,11 @@ components:
- type: 'null'
description: Number of works this publication cites (outgoing
references).
abstract:
anyOf:
- type: string
- type: 'null'
description: Publication abstract text.
required:
- title
- year
Expand All @@ -8156,6 +8161,7 @@ components:
- citationCount
- authors
- referenceCount
- abstract
additionalProperties: false
description: Publication-specific entity fields.
required:
Expand Down Expand Up @@ -11381,8 +11387,8 @@ components:
type:
- string
enum:
- 'yes'
- 'no'
- true
- false
- unclear
description: The satisfaction of the criterion
references:
Expand Down