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 @@ -2,7 +2,7 @@

namespace Jina
{
public sealed partial class SerpV1SerpPathGetResponse2
public sealed partial class SerpV1SerpPathPostResponse
{
/// <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::Jina.SerpV1SerpPathGetResponse2? FromJson(
public static global::Jina.SerpV1SerpPathPostResponse? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::Jina.SerpV1SerpPathGetResponse2),
jsonSerializerContext) as global::Jina.SerpV1SerpPathGetResponse2;
typeof(global::Jina.SerpV1SerpPathPostResponse),
jsonSerializerContext) as global::Jina.SerpV1SerpPathPostResponse;
}

/// <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::Jina.SerpV1SerpPathGetResponse2? FromJson(
public static global::Jina.SerpV1SerpPathPostResponse? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::Jina.SerpV1SerpPathGetResponse2>(
return global::System.Text.Json.JsonSerializer.Deserialize<global::Jina.SerpV1SerpPathPostResponse>(
json,
jsonSerializerOptions);
}

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

/// <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::Jina.SerpV1SerpPathGetResponse2?> FromJsonStreamAsync(
public static global::System.Threading.Tasks.ValueTask<global::Jina.SerpV1SerpPathPostResponse?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Jina.SerpV1SerpPathGetResponse2?>(
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Jina.SerpV1SerpPathPostResponse?>(
jsonStream,
jsonSerializerOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Jina
/// <summary>
///
/// </summary>
public sealed partial class SerpV1SerpPathGetResponse
public sealed partial class SerpV1SerpPathPostResponse
{

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Jina
{
public sealed partial class SerpV1SerpPathGetResponse
public sealed partial class SerpV1SerpPathPostResponse2
{
/// <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::Jina.SerpV1SerpPathGetResponse? FromJson(
public static global::Jina.SerpV1SerpPathPostResponse2? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::Jina.SerpV1SerpPathGetResponse),
jsonSerializerContext) as global::Jina.SerpV1SerpPathGetResponse;
typeof(global::Jina.SerpV1SerpPathPostResponse2),
jsonSerializerContext) as global::Jina.SerpV1SerpPathPostResponse2;
}

/// <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::Jina.SerpV1SerpPathGetResponse? FromJson(
public static global::Jina.SerpV1SerpPathPostResponse2? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::Jina.SerpV1SerpPathGetResponse>(
return global::System.Text.Json.JsonSerializer.Deserialize<global::Jina.SerpV1SerpPathPostResponse2>(
json,
jsonSerializerOptions);
}

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

/// <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::Jina.SerpV1SerpPathGetResponse?> FromJsonStreamAsync(
public static global::System.Threading.Tasks.ValueTask<global::Jina.SerpV1SerpPathPostResponse2?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Jina.SerpV1SerpPathGetResponse?>(
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Jina.SerpV1SerpPathPostResponse2?>(
jsonStream,
jsonSerializerOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Jina
/// <summary>
///
/// </summary>
public sealed partial class SerpV1SerpPathGetResponse2
public sealed partial class SerpV1SerpPathPostResponse2
{

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions src/libs/Jina/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ paths:
tags:
- serp
summary: Serp
operationId: serp_v1_serp__path__get
operationId: serp_v1_serp__path__post
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

🧩 Analysis chain

Duplicate and incorrect operationId on GET; must be unique and reflect the HTTP method

Both GET and POST use serp_v1_serp__path__post. This will collide in client code generation and is misleading for the GET operation. Fix by restoring a unique, method‑appropriate id.

Apply:

-      operationId: serp_v1_serp__path__post
+      operationId: serp_v1_serp__path__get

Run to confirm operationId uniqueness:


🏁 Script executed:

#!/bin/bash
rg -nP '^\s*operationId:\s*(\S+)' src/libs/Jina/openapi.yaml \
  | awk '{print $NF}' | sort | uniq -c | sort -nr | head

Length of output: 476


Fix duplicate operationId in openapi.yaml — make GET id unique

GET and POST both declare serp_v1_serp__path__post (duplicate; confirmed). Update the GET operationId to a method-appropriate unique value.

File: src/libs/Jina/openapi.yaml (GET operation, around line 306)

-      operationId: serp_v1_serp__path__post
+      operationId: serp_v1_serp__path__get
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
operationId: serp_v1_serp__path__post
operationId: serp_v1_serp__path__get
🤖 Prompt for AI Agents
In src/libs/Jina/openapi.yaml around line 306, the GET operation reuses the POST
operationId `serp_v1_serp__path__post`; update the GET operationId to a unique,
method-appropriate identifier (for example `serp_v1_serp__path__get`) so it no
longer duplicates the POST id, and ensure the new name follows existing naming
conventions and is referenced consistently (if used elsewhere) in the file.

parameters:
- name: path
in: path
Expand All @@ -327,7 +327,7 @@ paths:
tags:
- serp
summary: Serp
operationId: serp_v1_serp__path__get
operationId: serp_v1_serp__path__post
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

🧩 Analysis chain

POST operationId rename may be API‑breaking; confirm intent and downstream impact

If clients/SDKs rely on operationId, this rename can break generated method names. Proceed only if intentional and coordinated (release notes + SDK regen).

  • Verify no other operation shares this id (after fixing GET).
  • If rename is unintended, revert to the previous POST id; otherwise plan SDK regeneration and announce in CHANGELOG.

🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="src/libs/Jina/openapi.yaml"

if [ ! -f "$file" ]; then
  echo "FILE_NOT_FOUND: $file"
  exit 0
fi

echo "=== SNIPPET: lines 320-340 of $file ==="
nl -ba "$file" | sed -n '320,340p' || true
echo

echo "=== operationId lines in $file (with 2 lines context) ==="
rg -n -C2 'operationId:' "$file" || true
echo

echo "=== All operationId occurrences in repo (file:line:value) ==="
rg -n --hidden 'operationId:' -S -g '!.git/**' || true
echo

echo "=== Duplicate operationId values across repo (showing >1 occurrences) ==="
python - <<'PY'
import re,glob,os
pat=re.compile(r'operationId:\s*(\S.*)$')
counts={}
locs={}
for path in glob.glob('**/*', recursive=True):
    if '.git' in path.split(os.sep):
        continue
    if not (path.endswith('.yaml') or path.endswith('.yml') or path.endswith('.json')):
        continue
    try:
        with open(path,'r',encoding='utf-8') as fh:
            for i,line in enumerate(fh,1):
                m=pat.search(line)
                if m:
                    v=m.group(1).strip()
                    counts[v]=counts.get(v,0)+1
                    locs.setdefault(v,[]).append(f"{path}:{i}")
    except Exception:
        pass
dups=[(k,counts[k],locs[k]) for k in counts if counts[k]>1]
if not dups:
    print("NO_DUPLICATE_OPERATIONIDs_FOUND")
else:
    for k,c,ls in sorted(dups, key=lambda x:-x[1]):
        print(f"{c}x {k}")
        for l in ls:
            print("  "+l)
PY
echo

echo "=== Search for serp_v1_serp__path__post / serp_v1_serp__path__get occurrences ==="
rg -n --hidden 'serp_v1_serp__path__post|serp_v1_serp__path__get' -S -g '!.git/**' || true

Length of output: 3568


Duplicate operationId 'serp_v1_serp__path__post' — fix before merge

Both occurrences will break client SDK generation; operationId values must be unique.

  • src/libs/Jina/openapi.yaml — lines 306 and 330 both set operationId: serp_v1_serp__path__post.
  • Action: if one entry is the GET endpoint, rename it to serp_v1_serp__path__get; if the POST rename was accidental, revert to the previous POST id; if the change is intentional, regenerate SDKs and document the breaking change in CHANGELOG/Release notes.
🤖 Prompt for AI Agents
In src/libs/Jina/openapi.yaml around lines 306 and 330 there is a duplicate
operationId 'serp_v1_serp__path__post' which will break client SDK generation;
locate both occurrences and make the IDs unique: if the entry at one of these
lines is the GET endpoint rename it to 'serp_v1_serp__path__get', if the POST
rename at one line was accidental revert it back to the original POST id, and if
the change was intentional keep the new id and regenerate SDKs and add a note in
CHANGELOG/Release notes; ensure both operationId values are unique and
consistent with HTTP method semantics and update any references/tests that rely
on the old IDs.

parameters:
- name: path
in: path
Expand Down