Skip to content

Add a new cli command to output version information#3892

Closed
MiguelGL wants to merge 5976 commits intoswagger-api:masterfrom
MiguelGL:version-cli-command
Closed

Add a new cli command to output version information#3892
MiguelGL wants to merge 5976 commits intoswagger-api:masterfrom
MiguelGL:version-cli-command

Conversation

@MiguelGL
Copy link
Copy Markdown
Contributor

PR checklist

  • Read the contribution guildelines.
  • Ran the shell/batch 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)
  • Filed the PR against the correct branch: master for non-breaking changes and 2.3.0 branch for breaking (non-backward compatible) changes.

Description of the PR

This is as per discussed in #3007. I am using maven resources filtering support to generate a resource file with the ${project.version} stamped on it.

Please note when running (from example from an IDE) from a non-maven env. this will lead to the
version be the literal ${project.version} string.

wing328 and others added 30 commits August 9, 2016 10:49
* better enum support for typescript angular2

* fix enum property for TS

* fix non-array enum datatype for TS

* update build name for TS fetch petstore client

* restore TS fetch enum naming

* [TS fetch]add test cases, fix enum integer naming
* Amending Path annotation

Changed the Path annotation value from "/" to "/{{baseName}}"

* jaxrs-cxf-petstore-server.sh script was not referencing cxf module directory. Included generated files following script run. Have amended Path annotation value to {{contextPath}} and removed public access modifier from template as this is redundant for Java interface definition.
[aspnet] Honor casing of properties from definition
[Java] minor indentation fix for java enum models
eleif zu else if
…ams-for-auth

Fix unknown parameter on api_client's update_params_for_auth method.
[Java][Spring] Add enum test cases and fix formParam's enum value
* show path

* install go
* prefix go local var with localVar

* remove pom from go, minor fix to headerParams
Right now, any generated code where the http basic authentication is
required is broken, as it tries to access nonexistent field in the
generated `Configuration` struct.

The alternative is to fix `configuration.mustache` to replace the
`UserName` field with `Username` field.
…ization

Go: Replace `.Username` with `.UserName` in generated API methods.
* add more tests for go, fix numeric form/header parameters

* update go sample
Removed CLI option declarations in JavaJAXRSSpecServerCodegen that also
appear in AbstractJavaJAXRSServerCodegen.
wing328 and others added 16 commits September 24, 2016 01:16
[Go] fix trailing comma in go api client
* add schema title, description to HTML output

* Include title, description in petstore sample (and HTML output)
* Show correct default value on CLI option description

Fixes #3861

* Changes after ./bin/jaxrs-petstore-server.sh
[Swfit] fix path parameter with baseName mustache tag
* fix jaxrs line break

* fix java gradle bat line break

* fix scala gradle line break

* fix undertow crt line break

* fix spring line break

* fix undertow line break in pom

* rollback undertwo petstore to use petstore.yaml
* feature(php-cs-fixer) add php-cs-fixer support

* feature(php-cs-fixer) tweak Mustache templates to fit PSR2

* feature(php-cs-fixer) bin/php-petstore.sh output
…l-request-template

Mention security script in pull request template
…3887)

* fix duplicated description in spring model

* fix duplicated description in jaxrs models

* fix resteasy dependency
* feature(phpunit) fix PHPUnit invocation, add basic phpunit.xml.dist

* fix(phpunit) add proper paths relative to phpunit.xml.dist
I am using maven resource filtering capabilities so that an existing version.properties resource file
gets filtered upon build and populated with the project version tag. This resource is then read
at runtime as required.
@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Sep 29, 2016

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/swagger-api/swagger-codegen/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/swagger-api/swagger-codegen/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

@wing328 wing328 added this to the v2.2.2 milestone Sep 29, 2016
# Conflicts:
#	.gitignore
#	modules/swagger-codegen-cli/pom.xml
#	modules/swagger-codegen-cli/src/main/java/io/swagger/codegen/SwaggerCodegen.java
#	modules/swagger-codegen-cli/src/main/java/io/swagger/codegen/cmd/Meta.java
#	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/StaticDocCodegen.java
#	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/StaticHtml2Generator.java
#	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/StaticHtmlGenerator.java
#	samples/html/index.html
# Conflicts:
#	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/StaticDocCodegen.java
#	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/StaticHtml2Generator.java
#	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/StaticHtmlGenerator.java
#	samples/html/index.html
@MiguelGL
Copy link
Copy Markdown
Contributor Author

I (thik I) fixed the account linking issue as per the instructions in the link (thanks!).

I can see this has sort of introduced a lot of noise, so just let me know if this still applies or maybe it's worth to reproduce the changes in another fork or something.

Thanks.

@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Sep 29, 2016

@MiguelGL If it's not taking you too much time, please submit a new one as the rebase seems to have add commits not related to this change.

@MiguelGL
Copy link
Copy Markdown
Contributor Author

Sure, i Will.

El jue., 29 sept. 2016 10:41, wing328 notifications@github.com escribió:

@MiguelGL https://github.com/MiguelGL If it's not taking you too much
time, please submit a new one as the rebase seems to have add commits not
related to this change.


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#3892 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAnMhYf2adgWPCYNcKO5yxQATDVPiv8fks5qu3mygaJpZM4KJUsR
.

MiguelGL pushed a commit to MiguelGL/swagger-codegen that referenced this pull request Sep 29, 2016
).

I am using maven resource filtering capabilities so that an existing version.properties resource file
gets filtered upon build and populated with the project version tag. This resource is then read
at runtime as required.
@MiguelGL
Copy link
Copy Markdown
Contributor Author

I am closing this PR in favour of a new fresh one.

@MiguelGL MiguelGL closed this Sep 29, 2016
wing328 pushed a commit that referenced this pull request Oct 3, 2016
… (#3899)

* Properly git-ignore all nbactions.xml files.

* Add a command line action to print the program version (#3892).

I am using maven resource filtering capabilities so that an existing version.properties resource file
gets filtered upon build and populated with the project version tag. This resource is then read
at runtime as required.

* Using a different version tag when unreadable.
acramatte added a commit to comerge/swagger-codegen that referenced this pull request Oct 4, 2016
* upstream/master: (79 commits)
  add undertow
  Add a new cli command to output version information (2nd attempt) swagger-api#3892 (swagger-api#3899)
  fix python flask controller without tag (default_controller)
  [aspnet5] Fix basePath application to operations (swagger-api#3911)
  Bugfix/issue 3723 (swagger-api#3726)
  Cgardens nested object regex (swagger-api#3879)
  [Cpprest] Fixing issue swagger-api#3773 (swagger-api#3876)
  escape callback parameter for java(okhttp) and python
  fix warning in html generator
  [PHP] fix PHPUnit invocation, add basic phpunit.xml.dist (swagger-api#3864)
  [Java] Remove duplicated model description in Spring, JAX-RS models (swagger-api#3887)
  [PHP] Better PSR2 compatibility (swagger-api#3863)
  Mention security script in pull request template
  [Swift] Use thread safe manager dictionary
  Replace ^M with new line (\r) in mustache template (swagger-api#3865)
  [swfit] fix url param with base name
  [JaxRS]Show correct default value on CLI option description (swagger-api#3862)
  add title, description to HTML output (swagger-api#3860)
  fix trailing comma in go api client
  fix typescript-fetch base path by removing ending slash
  ...
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.