Skip to content

[BUG] Elixir - api_clients/clients/elixir/lib/docspring/connection.ex has syntax errors #20562

@ndbroadbent

Description

@ndbroadbent

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Compiling 70 files (.ex)

== Compilation error in file lib/docspring/connection.ex ==
** (MismatchedDelimiterError) mismatched delimiter found on lib/docspring/connection.ex:90:45:
    error: unexpected token: )
    │
  4 │ defmodule Docspring.Connection do
    │                                └ unclosed delimiter
 ...
 90 │   @spec new(String.t(), String.t()), options) :: Tesla.Env.client()
    │                                             └ mismatched closing delimiter (expected "end")
    │
    └─ lib/docspring/connection.ex:90:45
    (elixir 1.18.2) lib/kernel/parallel_compiler.ex:428: anonymous fn/5 in Kernel.ParallelCompiler.spawn_workers/8
F
openapi-generator version

7.11.0

OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix

From ChatGPT:

  1. Incorrect @SPEC Syntax for new/3 Function

Issue: The @SPEC for the new/3 function has an extra parenthesis, making it invalid.

@spec new(String.t(), String.t()), options) :: Tesla.Env.client()

Fix: Remove the extra parenthesis and ensure all parameters are included correctly. Additionally, update the return type to Tesla.Client.t() which is the standard type for Tesla clients.

There might be some other problems too

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions