swagger-api / swagger-api/swagger-codegen

Elixir - generated code has errors and warnings on latest (1.7) elixir (pr incoming)

Open
#12,465 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

Hi @niku - thanks for your library - it's been a great help to me.

When testing it against teamwork.com swagger definition (my fork with fixes to make it compatible with swagger-codegen (changed nil to 0)) the generated code had a couple of (thousand) quoted atom warnings and some api binding errors, with the changes in the incomming PR those errors and warnings will be fixed.

I have also cherry picked my as unmerged PR commit https://github.com/swagger-api/swagger-codegen/pull/12464 as without it, the mvn package task fails to package modules/swagger-codegen-cli/target/swagger-codegen-cli.jar - lets see which gets merged first.

Swagger-codegen version

master (61cfeac3b9d855b4eb8bffa0d118bece117bcb7d)

Swagger declaration file content or url

https://gist.github.com/fcbry/465e767f059504c05717fc715345bf22

Command line used for generation
mvn package -DskipTests  -D"maven.test.skip=true" && java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
    -i "C:\Users\BryanHunt\Downloads\teamwork.com-api-object-reference.oas.yml" \
    -l elixir -D"packageName=fc_teamwork" -D"invokerPackage=FC.Teamwork" \
    -o C:\code\fcbry_teamwork_poc\apps\fc_teamwork_client
Steps to reproduce

As above

Related issues/PRs

No

Suggest a fix/enhancement

I'm providing a PR to fix this

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the reported Maven package and Java CLI generation command with the linked Swagger declaration, then inspect the generated Elixir output for the quoted-atom warnings and API binding errors. Compare the results with the incoming fix described in the issue; done means the generated code no longer produces those errors and warnings on Elixir 1.7.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir, java
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.