Skip to content

Commit

Permalink
fix(specs): recommend is optional (generated)
Browse files Browse the repository at this point in the history
  • Loading branch information
algolia-bot committed Oct 14, 2024
1 parent 4fbc9ec commit 6f09216
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions algoliasearch/Models/Recommend/RecommendHit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ public RecommendHit()
/// Initializes a new instance of the RecommendHit class.
/// </summary>
/// <param name="objectID">Unique record identifier. (required).</param>
/// <param name="score">Recommendation score. (required).</param>
public RecommendHit(string objectID, double score)
public RecommendHit(string objectID)
{
ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID));
Score = score;
AdditionalProperties = new Dictionary<string, object>();
}

Expand Down Expand Up @@ -74,7 +72,7 @@ public RecommendHit(string objectID, double score)
/// </summary>
/// <value>Recommendation score.</value>
[JsonPropertyName("_score")]
public double Score { get; set; }
public double? Score { get; set; }

/// <summary>
/// Gets or Sets additional properties
Expand Down
6 changes: 2 additions & 4 deletions algoliasearch/Models/Recommend/TrendingFacetHit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ public TrendingFacetHit() { }
/// <summary>
/// Initializes a new instance of the TrendingFacetHit class.
/// </summary>
/// <param name="score">Recommendation score. (required).</param>
/// <param name="facetName">Facet attribute. To be used in combination with &#x60;facetValue&#x60;. If specified, only recommendations matching the facet filter will be returned. (required).</param>
/// <param name="facetValue">Facet value. To be used in combination with &#x60;facetName&#x60;. If specified, only recommendations matching the facet filter will be returned. (required).</param>
public TrendingFacetHit(double score, string facetName, string facetValue)
public TrendingFacetHit(string facetName, string facetValue)
{
Score = score;
FacetName = facetName ?? throw new ArgumentNullException(nameof(facetName));
FacetValue = facetValue ?? throw new ArgumentNullException(nameof(facetValue));
}
Expand All @@ -39,7 +37,7 @@ public TrendingFacetHit(double score, string facetName, string facetValue)
/// </summary>
/// <value>Recommendation score.</value>
[JsonPropertyName("_score")]
public double Score { get; set; }
public double? Score { get; set; }

/// <summary>
/// Facet attribute. To be used in combination with `facetValue`. If specified, only recommendations matching the facet filter will be returned.
Expand Down

0 comments on commit 6f09216

Please sign in to comment.