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

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

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Jina.SerpV1SerpPathPostResponse2?> FromJsonStreamAsync(
public static async global::System.Threading.Tasks.ValueTask<global::Jina.SerpV1SerpPathGetResponse?> 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.SerpV1SerpPathPostResponse2),
jsonSerializerContext).ConfigureAwait(false)) as global::Jina.SerpV1SerpPathPostResponse2;
typeof(global::Jina.SerpV1SerpPathGetResponse),
jsonSerializerContext).ConfigureAwait(false)) as global::Jina.SerpV1SerpPathGetResponse;
}

/// <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.SerpV1SerpPathPostResponse2?> FromJsonStreamAsync(
public static global::System.Threading.Tasks.ValueTask<global::Jina.SerpV1SerpPathGetResponse?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Jina.SerpV1SerpPathPostResponse2?>(
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Jina.SerpV1SerpPathGetResponse?>(
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 SerpV1SerpPathPostResponse
public sealed partial class SerpV1SerpPathGetResponse
{

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

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

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::Jina.SerpV1SerpPathPostResponse?> FromJsonStreamAsync(
public static async global::System.Threading.Tasks.ValueTask<global::Jina.SerpV1SerpPathGetResponse2?> 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.SerpV1SerpPathPostResponse),
jsonSerializerContext).ConfigureAwait(false)) as global::Jina.SerpV1SerpPathPostResponse;
typeof(global::Jina.SerpV1SerpPathGetResponse2),
jsonSerializerContext).ConfigureAwait(false)) as global::Jina.SerpV1SerpPathGetResponse2;
}

/// <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.SerpV1SerpPathPostResponse?> FromJsonStreamAsync(
public static global::System.Threading.Tasks.ValueTask<global::Jina.SerpV1SerpPathGetResponse2?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Jina.SerpV1SerpPathPostResponse?>(
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::Jina.SerpV1SerpPathGetResponse2?>(
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 SerpV1SerpPathPostResponse2
public sealed partial class SerpV1SerpPathGetResponse2
{

/// <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__post
operationId: serp_v1_serp__path__get
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 operationId across GET and POST — must be unique

Both GET and POST at /v1/serp/{path} now share the same operationId serp_v1_serp__path__get. OpenAPI requires operationId to be unique; many generators will either error or overwrite one handler. Also, the POST operationId ending with _get is misleading.

Apply this diff to restore uniqueness and naming consistency:

   /v1/serp/{path}:
     get:
       tags:
         - serp
       summary: Serp
-      operationId: serp_v1_serp__path__get
+      operationId: serp_v1_serp__path__get
       parameters:
         - name: path
           in: path
           required: true
           schema:
             title: Path
             type: string
       responses:
         '200':
           description: Successful Response
           content:
             application/json:
               schema: { }
         '422':
           description: Validation Error
           content:
             application/json:
               schema:
                 $ref: '#/components/schemas/HTTPValidationError'
     post:
       tags:
         - serp
       summary: Serp
-      operationId: serp_v1_serp__path__get
+      operationId: serp_v1_serp__path__post
       parameters:
         - name: path
           in: path
           required: true
           schema:
             title: Path
             type: string

Run this script to verify operationId uniqueness across the spec:

Also applies to: 330-330


🏁 Script executed:

#!/bin/bash
set -euo pipefail
pip -q install pyyaml >/dev/null
python - <<'PY'
import yaml, collections
with open('src/libs/Jina/openapi.yaml', 'r', encoding='utf-8') as f:
    doc = yaml.safe_load(f)
ops = []
for path, methods in (doc.get('paths') or {}).items():
    if not isinstance(methods, dict): continue
    for method, op in methods.items():
        if not isinstance(op, dict): continue
        op_id = op.get('operationId')
        if op_id:
            ops.append((op_id, path, method))
counter = collections.Counter(op_id for op_id, _, _ in ops)
dups = [(op_id, [(p, m) for (o, p, m) in ops if o == op_id]) for op_id, c in counter.items() if c > 1]
if dups:
    print("Duplicate operationIds detected:")
    for op_id, locs in dups:
        print(f"  {op_id}: {locs}")
    exit(1)
print("No duplicate operationIds found.")
PY

Length of output: 117


Duplicate operationId across GET and POST — must be unique

GET and POST at /v1/serp/{path} both use operationId serp_v1_serp__path__get (src/libs/Jina/openapi.yaml — lines 306 and 330). OpenAPI requires unique operationId; generators may error or overwrite handlers. Apply this diff to restore uniqueness and correct naming:

  /v1/serp/{path}:
    get:
      tags:
        - serp
      summary: Serp
-      operationId: serp_v1_serp__path__get
+      operationId: serp_v1_serp__path__get
      parameters:
        - name: path
          in: path
          required: true
          schema:
            title: Path
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: { }
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
        - serp
      summary: Serp
-      operationId: serp_v1_serp__path__get
+      operationId: serp_v1_serp__path__post
      parameters:
        - name: path
          in: path
          required: true
          schema:
            title: Path
            type: string
📝 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__get
/v1/serp/{path}:
get:
tags:
- serp
summary: Serp
operationId: serp_v1_serp__path__get
parameters:
- name: path
in: path
required: true
schema:
title: Path
type: string
responses:
'200':
description: Successful Response
content:
application/json:
schema: { }
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
post:
tags:
- serp
summary: Serp
operationId: serp_v1_serp__path__post
parameters:
- name: path
in: path
required: true
schema:
title: Path
type: string
🤖 Prompt for AI Agents
In src/libs/Jina/openapi.yaml around lines 306 and 330, both the GET and POST
operations for /v1/serp/{path} share the same operationId
`serp_v1_serp__path__get`; update the POST operationId to a unique, correct name
such as `serp_v1_serp__path__post` (or equivalent POST-specific identifier), and
then search & update any codegen/handler references that expect the old
operationId so they point to the new POST operationId.

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