OpenAPITools / OpenAPITools/openapi-generator
[BUG] Elixir - api_clients/clients/elixir/lib/docspring/connection.ex has syntax errors
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
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:
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with api_clients/clients/elixir/lib/docspring/connection.ex and reproduce the Elixir compilation error at line 90. Inspect the malformed @spec for new/3 and any other reported syntax problems; done means the generated client compiles without the mismatched-delimiter error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100