Skip to content

[rust-server] add license and description to Cargo.toml#7080

Merged
wing328 merged 6 commits intoswagger-api:masterfrom
Metaswitch:rust-server-license
Dec 7, 2017
Merged

[rust-server] add license and description to Cargo.toml#7080
wing328 merged 6 commits intoswagger-api:masterfrom
Metaswitch:rust-server-license

Conversation

@bjgill
Copy link
Copy Markdown
Contributor

@bjgill bjgill commented Nov 30, 2017

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

In rust-server, we now fill in the license and description fields. license only appears if present in the swagger; description defaults to "No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)"

This allows the generated crate to be published to crates.io without needing manual modification.

Benjamin Gill added 2 commits November 30, 2017 15:19
Rust2 was the old name
For rust-server, getting them from the swagger
@bjgill
Copy link
Copy Markdown
Contributor Author

bjgill commented Nov 30, 2017

@farcaller @frol - I believe you are the Rust technical committee. Please may you have a look?

@farcaller
Copy link
Copy Markdown
Contributor

LGTM.

@frol
Copy link
Copy Markdown
Contributor

frol commented Nov 30, 2017

It seems that according to #4197, the license for the generated clients should be "Unlicense".

@bjgill
Copy link
Copy Markdown
Contributor Author

bjgill commented Nov 30, 2017

OK. Would it be acceptable then to set Unlicense as the default, but use the license specified in the swagger info instead if present?

EDIT: looking at #4197, it looks like the defaults for the other generators are actually a mixture of Unlicense and Proprietary. Given that a lack of license in the Cargo manifest implies that the crate is proprietary (and therefore cannot be published to crates.io), I suspect defaulting to not providing a license might be the least surprising option for users.

@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Nov 30, 2017

@frol is right. The default should be "Unlicense".

@frol
Copy link
Copy Markdown
Contributor

frol commented Nov 30, 2017

@bjgill It seems that the license specified in the Swagger Spec file is not the same license as one that is used for the generated client.

@wing328 wing328 merged commit a57fb0c into swagger-api:master Dec 7, 2017
@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Dec 7, 2017

@frol I think the license specified in the spec refers to "License information for the exposed API", which may or may not be the same as the license of the auto-generated code.

@bjgill bjgill deleted the rust-server-license branch December 7, 2017 17:08
Gingonic pushed a commit to wirelane/swagger-codegen that referenced this pull request Dec 9, 2017
…7080)

* Move errant file to 'rust-server'

Rust2 was the old name

* Add license and description to Cargo.toml

For rust-server, getting them from the swagger

* Valid Java doesn't have uninitialised variables...

* Default license to "Unlicense"

* Set license to "Unlicense" for generated crates
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.

4 participants