swagger-api / swagger-api/swagger-codegen

[ALL] published 3.x branch of swagger-codegen-cli.jar might be broken

Open
#11,094 2 comments 1 reaction 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

EDIT: ok, so the sourcecode for the 3.x branch is in the other repository (https://github.com/swagger-api/swagger-codegen-generators) and that's what has been executing, there are minor differences between typescript-angular in 2.x and 3.x

Anyway, the CLI jar contains classes & mustache templates from both of the branches together, which sounds a bit weird. Feel free to close this if this is how it's supposed to work.


Description

For some reason the result from the source code was not reflecting the output in the console so that was really weird so I got digging and apparently, published jar file https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.27/swagger-codegen-cli-3.0.27.jar contains two classes named TypeScriptAngularClientCodegen (with different code) and it also contains two different mustache templates.

I have no idea where the different version got from because I can't find it in this repository but it's definitely the one which is being executed for me (and it's missing lots of newer updates)

The 2.x branch seems to be ok.

Swagger-codegen version

3.0.27 (but .26 is broken too and probably few others too)

Steps to reproduce

Open published jar in java decompiler, look for TypeScriptAngularClientCodegen (Open Type) and I think that there is duplicate type (two classes with the same name) and/or just jar -xvf swagger-cli.jar and then do find . | grep angular and you should see two duplicate angular templates with slightly different paths.

Suggest a fix/enhancement

No idea, I am not doing Java anymore for a quite a few years so I can't really help here but I think it might be just packaging thing.

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

Inspect the published swagger-codegen-cli-3.0.27.jar with a Java decompiler, or extract it with jar -xvf and search for angular as described. Compare the duplicate TypeScriptAngularClientCodegen classes and mustache templates, then trace which branches or repositories supplied them; done means the CLI jar contains only the intended set.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.