Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 6 tasks
ndbroadbent opened this issue Jan 30, 2025 · 1 comment
Open
1 of 6 tasks

Comments

@ndbroadbent
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant