Skip to content

Commit

Permalink
Fix camel case query string param naming
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
  • Loading branch information
Xtansia committed Feb 11, 2025
1 parent 973a855 commit 795d685
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ private GlobalOverrides() { }
{ "rest_total_hits_as_int", "total_hits_as_integer" },
{ "docvalue_fields", "doc_value_fields" },
{ "q", "query_on_query_string" },
{ "queryString", "query_string_param" },
//make cat parameters more descriptive
{ "h", "Headers" },
{ "s", "sort_by_columns" },
Expand Down
2 changes: 1 addition & 1 deletion src/ApiGenerator/Domain/ApiRequestParametersPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private static string CreateCSharpName(string queryStringKey, string endpointNam
if (queryStringKey == "format" && endpointName == "text_structure.find_structure")
return "TextStructureFindStructureFormat";

return queryStringKey.ToPascalCase();
return queryStringKey.SplitPascalCase().ToPascalCase();
}

private static IList<string> CreateSkipList(IEndpointOverrides local, ICollection<string> declaredKeys) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public long? IfSequenceNumber
get => Q<long?>("if_seq_no");
set => Q("if_seq_no", value);
}
public string Policyid
public string PolicyId
{
get => Q<string>("policyID");
set => Q("policyID", value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ public partial class DeleteObjectsRequestParameters
public override bool SupportsBody => false;

/// <summary>The ID of a single Observability Object to delete.</summary>
public string Objectid
public string ObjectId
{
get => Q<string>("objectId");
set => Q("objectId", value);
}

/// <summary>A comma-separated list of Observability Object IDs to delete.</summary>
public string Objectidlist
public string ObjectIdList
{
get => Q<string>("objectIdList");
set => Q("objectIdList", value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public int? From
}

/// <summary>A query string to filter policies.</summary>
public string Querystring
public string QueryStringParam
{
get => Q<string>("queryString");
set => Q("queryString", value);
Expand All @@ -105,14 +105,14 @@ public int? Size
}

/// <summary>The field to sort on.</summary>
public string Sortfield
public string SortField
{
get => Q<string>("sortField");
set => Q("sortField", value);
}

/// <summary>The order of sorting.</summary>
public string Sortorder
public string SortOrder
{
get => Q<string>("sortOrder");
set => Q("sortOrder", value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ public string Search
}

/// <summary>Specifies the direction to sort results in. Can be `ASC` or `DESC`. Default is `ASC`.</summary>
public string Sortdirection
public string SortDirection
{
get => Q<string>("sortDirection");
set => Q("sortDirection", value);
}

/// <summary>The field to sort results with.</summary>
public string Sortfield
public string SortField
{
get => Q<string>("sortField");
set => Q("sortField", value);
Expand Down

0 comments on commit 795d685

Please sign in to comment.