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

Remove swagger-codegen-cli jar file #71

Merged

Conversation

ckadner
Copy link
Member

@ckadner ckadner commented Jun 2, 2021

The swagger-codegen CLI can be readily installed from external sources and need not be part of this repository.

The JAR file /api/swagger-codegen-cli-2.4.8.jar appears to contain a large number of Java dependencies in binary form (approx. 7000 .class Java binary files). We recommend that LF projects should not distribute binary files as part of their source code repositories. There are several reasons for this, including because it is harder for users of the source code repos to know about the provenance or contents of the binary files. In the presence of copyleft licenses these binaries might require sharing the corresponding source code.

It is strongly recommended this JAR file be removed from the source code repo, and instead (if necessary) configuring the build system to retrieve it from an upstream location at build time / install time, as applicable. Or, alternatively, adjusting the documentation to instruct users where they can obtain these dependencies themselves, rather than distributing the binaries

Furthermore, the swagger-cli is not required for code generation. Only the swagger-codegen is required.


Swagger Codegen 2.4.

We are using swagger-codegen version 2.4.x to generate our API as swagger-codegen
version 3.0.x no longer supports python (server).

Below are the instructions for installing the latest swagger-codegen@2 using Homebrew.

For installation on other platforms, go to swagger-api/swagger-codegen on GitHub.

Note: swagger-codegen 3.x does not support the Python (server) anymore, so we need to downgrade to version 2.x (@2):

brew search swagger-codegen@
brew install swagger-codegen@2
brew link --force swagger-codegen@2

Resolves #70

Signed-off-by: Christian Kadner ckadner@us.ibm.com

Resolves machine-learning-exchange#70

Signed-off-by: Christian Kadner <ckadner@us.ibm.com>
@ckadner ckadner requested review from Tomcli and removed request for drewbutlerbb4 June 2, 2021 18:34
@ckadner ckadner self-assigned this Jun 2, 2021
@Tomcli
Copy link
Member

Tomcli commented Jun 2, 2021

@ckadner we probably need a set of instructions for how to install the java jar version of codegen. Homebrew and maven plugin might be too complicated and it may change based on the user's java/brew config.

@Tomcli
Copy link
Member

Tomcli commented Jun 2, 2021

I opened an issue for the above comment.

/lgtm
/approve

@mlx-bot
Copy link
Collaborator

mlx-bot commented Jun 2, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ckadner, Tomcli

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mlx-bot mlx-bot merged commit 74940c1 into machine-learning-exchange:main Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove api/swagger-codegen-cli-2.4.8.jar file
3 participants