Skip to content

LogsApi.submitLog() returns untyped Object — should use a named response model #3614

@danielvolovik96

Description

@danielvolovik96

Is your feature request related to a problem? Please describe.

LogsApi.submitLog() returns Object because the OpenAPI spec for POST /api/v2/logs defines the 202 response as a bare type: object with no named schema.
This means callers get no type safety, no IDE autocompletion, and no way to inspect the response without blind casting. The same applies across all SDK
languages (Go interface{}, Python dict, TypeScript any).

Describe the solution you'd like

Define a named schema (e.g. SubmitLogResponse) in the OpenAPI spec for the 202 response, even if it currently has no required properties. This way the generated SDK returns a concrete type instead of Object, is consistent with other endpoints (e.g. EventsApi.createEvent() returns a typed
EventCreateResponse), and provides a stable place to add fields in the future without a breaking change.

Describe alternatives you've considered

  • Using submitLogWithHttpInfo() to at least get the HTTP status code from ApiResponse<Object>, but the response body remains untyped.
  • Manually casting the returned Object to a Map, but this is fragile and undocumented.

Additional context

The root cause is in .generator/schemas/v2/openapi.yaml where the 202 response is:

  '202':
    content:
      application/json:
        schema:
          type: object
    description: Request accepted for processing (always 202 empty JSON).

The v1 logs endpoint (POST /v1/input) has the same pattern. Both could benefit from named response schemas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions