Commit Graph

61 Commits

Author SHA1 Message Date
wing328
029728d851 [maven-plugin] allow for ignore file override (#4597)
* [maven-plugin] allow for ignore file override

The .swagger-codegen-ignore file is beneficial for existing source
directories to provide pattern-based exclusion rules for existing source
to be ignored by swagger codegen. Until now, there's been no utility
other than skipOverwrite to modify the initial generation of code
(either via CLI or maven plugin).

This commit adds support for an ignoreFileOverride option to both the
CLI and the maven plugin.

Example CLI usage:

```
java -jar swagger-codegen.jar generate \
    -i swagger.json -l csharp \
    -o target --ignore-file-override /path/to/ignore-file
```

Example Maven Plugin configuration:

```
    <build>
        <plugins>
            <plugin>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-codegen-maven-plugin</artifactId>
                <version>2.2.2-SNAPSHOT</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <inputSpec>${project.basedir}/src/main/resources/swagger.yaml</inputSpec>
                            <language>csharp</language>
                            <invokerPackage>io.swagger</invokerPackage>
                            <modelPackage>io.swagger.models</modelPackage>
                            <apiPackage>io.swagger.apis</apiPackage>
                            <ignoreFileOverride>/Users/jim/projects/swagger-codegen/.sample-ignore</ignoreFileOverride>
                            <configOptions>
                            </configOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
```

* [maven-plugin] update new javadocs

* fix bad merge due to missing }
2017-01-19 23:17:25 +08:00
Alex Nolasco
26ead9b58f Issue 4416 (Assist escapeReservedWord with custom mappings) (#4480)
* Preliminary implementation for issue-4416

* Updated README.md with  reserved-words-mappings  parameter.
2017-01-09 18:22:25 +08:00
Nick Maynard
4c05d5f098 Allow Java source formatting mvn formatter:format (#4214)
Uses Eclipse formatting tools with a configuration matching Google's style guide (plus our customisations).
2016-11-23 15:07:25 +08:00
Miguel García
e633073082 Add a new cli command to output version information (2nd attempt) #3892 (#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.
2016-10-03 17:14:54 +08:00
Tony Tam
c4f3cb1d9e updated dev versions 2016-08-07 23:03:44 +02:00
Tony Tam
c147cfde1b updated release versions 2016-08-07 11:49:01 +02:00
Tony Tam
39cb6a24db updated dev versions 2016-07-17 15:43:30 -07:00
Tony Tam
c49db091ef updated versions for release 2016-07-15 13:45:22 -07:00
wing328
dbc3e418a9 udpate pom for other sub modules 2016-05-24 23:27:11 +08:00
Tony Tam
1fe2d3a165 release prepare 2016-04-06 14:07:52 -07:00
wing328
e10c28596c update user-agent for Ruby 2016-03-15 11:41:47 +08:00
wing328
df8d4fd8b8 remove releaseVersion (duplicated with packageVersion) 2016-03-15 11:40:09 +08:00
wing328
cdecb5133f add httpUserAgent option, add customized user-agent support to C# 2016-03-13 17:28:43 +08:00
wing328
3bebbada98 fix command line, update git_push.sh 2016-03-11 14:50:03 +08:00
wing328
4d023e9b92 add release support 2016-03-10 23:11:08 +08:00
wing328
6657434b08 Merge pull request #2168 from jimschubert/maven_plugin_configurator
[maven plugin] Use configurator for maven plugin
2016-03-01 11:31:01 +08:00
Jim Schubert
a6f3914a92 [feature #1255] prefix and suffix for model names.
This implements the command line arguments `--model-name-prefix` and `--model-name-suffix`
for all languages which do not override `DefaultCodegen.toModelName()`.
This fixes most of swagger-api/swagger-codegen#1255.

Connection to the maven plugin works with additional-properties, a more explicit
parameter waits for swagger-api/swagger-codegen#2168.
2016-02-26 11:20:19 +01:00
Jim Schubert
702d019bf8 [maven plugin] Use configurator for maven plugin
see swagger-api/swagger-codegen#2104
2016-02-17 22:33:39 -05:00
JULIEN MASNADA
2a9ead870c Use LOGGER instead of LOG
Use spaces instead of tabs
2016-01-28 00:12:24 +08:00
Tony Tam
b641d4a17a refactored for access in maven plugin 2016-01-25 21:33:58 -08:00
Maelig Nantel
370a8d136f fixes 2016-01-18 11:35:57 +01:00
Maelig Nantel
467939216c fix java warnings
Do not impact any feature. Juste correct some Java warnings (static
methods, unused imports or parameters...).
2016-01-15 14:02:55 +01:00
Tony Tam
7c3406804d updated versions 2016-01-07 20:43:49 -08:00
Tony Tam
d4d4c43032 updated versions 2016-01-06 09:47:32 -08:00
Tony Tam
788c70922d updated cli name 2015-12-30 13:40:51 -08:00
Kirill Vlasov
49a6d0e6c1 Fixing squid:S1161 - @Override annotation should be used on any method overriding (since Java 5) or implementing (since Java 6) another one 2015-12-15 14:09:31 +05:00
wing328
3872599be2 Merge pull request #1406 from testn/fix-meta
Use the version from the codegen for meta generator
2015-11-23 17:20:46 +08:00
Nadezhda Makarkina
5d8c23dd09 CliOption hah been change to allow enum values 2015-11-05 16:54:06 +03:00
Tony Tam
6b7ceab081 updated to dev version 2015-10-25 20:59:52 -07:00
Tony Tam
dd3b253e15 updated versions 2015-10-25 19:31:36 -07:00
Testo Nakada
f76a789a49 - make Meta generator take the swagger code gen version
- generate the class name correctly if the name contains hyphen
2015-10-24 11:36:00 -07:00
russellb337
6d7557971b switch Generate to use CodegenConfigurator 2015-09-02 09:28:40 -07:00
russellb337
074ba1ea54 undo some of the debugging changes I made 2015-08-27 09:11:49 -07:00
russellb337
cf5982d2c4 remove class comment 2015-08-26 17:51:19 -07:00
russellb337
e5811ebdc7 expose more generate options in the cli 2015-08-26 17:38:51 -07:00
Tony Tam
617fa43a89 updated development version 2015-08-24 00:52:35 -07:00
Tony Tam
dd67287d63 updated development version 2015-08-24 00:51:18 -07:00
Tony Tam
9cc7615b71 rebuilt, updated versions 2015-08-24 00:32:58 -07:00
Tony Tam
35ed412d1e moved file 2015-08-23 18:58:46 -07:00
xhh
569082743f Remove the unused LibraryHelp command 2015-08-22 22:05:43 +08:00
xhh
a41361c959 Change the "--library" option into a config option 2015-08-07 22:16:32 +08:00
xhh
07f10a8abc Add command to display all library templates supported
for a specific language
2015-08-05 16:37:08 +08:00
xhh
aff21e5e6b Add a "library" option to generate with sub-template 2015-08-04 18:32:54 +08:00
wing328
fc7f2a92d0 Merge pull request #878 from lugaru1234/issue798
Fixed #798: original jar generation has been fixed.
2015-07-20 21:50:51 +08:00
Nadezhda Makarkina
eca827613d Fixed #831: skipOverwrite flag has been added 2015-06-30 17:58:35 +03:00
Nadezhda Makarkina
7b5b874fdc Fixed #798: original jar generation has been fixed. 2015-06-16 11:58:22 +03:00
fehguy
672fcd5a14 updated dev version 2015-06-09 01:36:52 -07:00
fehguy
3d2f09a693 updated versions 2015-06-09 00:25:09 -07:00
Ron
56714e6c07 Code fixes after reformatting 2015-06-07 23:20:34 -04:00
Ron
1c2d0656b0 Code reformatting 2015-06-07 11:56:08 -04:00