Commit Graph

66 Commits

Author SHA1 Message Date
mtakaki
165c116661 Moving import-mappings out of configOptions and converting it into a list, rather than being a comma-separated string. (#5384)
* Moving import-mappings out of configOptions and converting it into a list, rather than being a comma-separated string. #5383

* Making the change to importMappings backwards compatible
2017-05-23 21:46:27 +08:00
wing328
8314f4e78a Add removeOperationIdPrefix option (#5674)
* add removeOperationIdPrefix option

* remove removeOperationIdPrefix from cli option for generators
2017-05-21 01:28:06 +08:00
wing328
d3ac4b686a fix CI issue by declaring originalEnvironmentVariables as a protected
member
2017-04-11 00:57:22 +08:00
Simon Marti
1734ac4ed0 Add option to skip Maven plugin execution (#5337)
* Add option to skip Maven plugin execution

The execution is skipped if either the codegen.skip property or the <skip>
configuration parameter is set. This is consistent with how many other Maven
plugins, such as maven-exec-plugin and maven-clean-plugin, handle this.

* Add documentation for Maven `skip` property
2017-04-10 23:31:58 +08:00
Simon Marti
fea8699d8b Fix environment variable support in successive Maven plugin executions (#5351)
* Fix environment variable support in successive Maven plugin executions

System properties were retained across multiple successive executions,
resulting in unpredictable behavior. Property values are now properly reset
to their original value after plugin execution.

Fixes #5350

* Add explanation to environment variable reset mechanism in Maven plugin
2017-04-10 23:25:09 +08:00
Johannes
e147fdec48 swagger-codegen-maven-plugin: hint added how to generate server code (#5342)
addresses issue #5332
2017-04-07 08:46:42 +08:00
Simon Marti
375e34fe12 Fix selective generation in successive Maven plugin executions (#5152)
Options passed as system properties are properly reset when
disabled in the execution configuration.

Fixes #5151
2017-03-23 00:49:57 +08:00
Brian Towles
0895e292c4 Add Selective Generation support to the Maven plugin. (#5036)
* Updated maven plugin to allow for selective generation

* Documentation of Selective generation options.
2017-03-18 15:46:10 +08:00
wing328
775f108d4e update version to 2.2.3-SNAPSHOT (#4894) 2017-03-02 16:54:37 +08:00
Tony Tam
8504c12ce0 update to release versions 2017-03-01 14:22:34 -05:00
eblis
869374125f #4625 - Check if configOptions are set before trying to get the source folder, otherwise assume null/empty. (#4626)
(reworked pr)
2017-01-27 17:04:32 +08:00
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
Dan Mikita
0a559f0dd2 Add support for modifier within the Jaxb XMLElement annotation (#4433)
* fixes #4432 Adding support for the  modifier within the Jaxb XMLElement annotation. Updated README with JaxbAnnotations configuration option.

* #4432 Running the Petstore files
2017-01-17 15:26:30 +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
Tadhg Pearson
79a71fd697 Update docs for Java code generation (#4303)
* Updated documentation to support Java code generation

* Tabs to spaces in example pom
2016-12-05 17:34:37 +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
mbohlool
355e694fb2 Add gitUseID and gitRepoID flags to maven plugin 2016-11-15 17:35:13 -08:00
Stephan Wienczny
9436ba106c Default added sourceFolder to src/main/java
Fallback to "src/main/java" for added source folder instead of a NullpointerException when no source folder ist configured in the pom
2016-11-04 15:35:48 +01:00
wing328
1e57ba96d7 Correct source folder for generated files 2016-10-17 00:48:14 +08:00
Ville Skyttä
b4c139f19b Spelling fixes 2016-08-27 02:34:33 +03:00
wing328
d7d351682f Merge pull request #3610 from michalyao/master
update to version 2.2.2
2016-08-18 10:17:35 +08:00
Yao Yao
52125c33ad update to version 2.2.2 2016-08-18 09:10:16 +08:00
Yao Yao
262dc14143 update to version 2.2.2 2016-08-17 15:16:56 +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
christian
8533ca43b4 #3285 replaced setModelNamePrefix by setModelNameSuffix 2016-07-09 23:50:23 +02:00
christian
0ada53435c #3284: Made modelNamePrefix and -Suffix available through maven 2016-07-04 19:51:38 +02:00
wing328
af0c8b5ed0 Merge pull request #3005 from pablograna/remove-unnecessary-call-to-parser
Remove unnecessary 2nd call to SwaggerParser.
2016-05-31 14:10:20 +08:00
Pablo Gra\~na
50a346ca91 Remove unnecessary 2nd call to SwaggerParser.
Both CodeGenMojo and CodegenConfigurator where parsing the swagger input.
The result in CodeGenMojo was discarded. I simply removed the line in
CodeGenMojo.
2016-05-30 18:56:15 -03:00
wing328
31aee5b3a7 Merge pull request #2950 from wing328/update_pom_220
Update pom.xml to use 2.2.0-SNAPSHOT
2016-05-25 21:10:43 +08:00
Shaun Reich
06dd7c4794 add custom generator example to readme
fixes #2923
2016-05-24 14:44:21 -04: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
Jim Schubert
702d019bf8 [maven plugin] Use configurator for maven plugin
see swagger-api/swagger-codegen#2104
2016-02-17 22:33:39 -05:00
evigeant
bff0e2ad19 Fixed indentation to use spaces instead of tabs 2016-02-13 11:15:04 -05:00
evigeant
6db358dd39 Merge remote-tracking branch 'upstream/master'
Conflicts:
	modules/swagger-codegen-maven-plugin/src/main/java/io/swagger/codegen/plugin/CodeGenMojo.java
2016-01-28 09:18:24 -05:00
Tony Tam
3ddccb5e5c fix for #1976, added missing types 2016-01-25 21:34:28 -08:00
evigeant
f13b4deb2e Added warnings when the additionalProperties are not defined in the
cliOptions of a language.
2016-01-25 21:22:18 -05:00
evigeant
68c6954615 Fixed indentation 2016-01-25 13:53:31 -05:00
evigeant
6b59dd0899 Allow mave-codegen-plugin to set additionalProperties even if they are
not declared in the cliOptions.
2016-01-25 13:51:42 -05: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
380d8c1d15 added config help, example for https://github.com/swagger-api/swagger-codegen/pull/1784#issuecomment-168599569 2016-01-05 05:02:05 -08:00
Ron
9a54371ca9 Swagger Spec -> OpenAPI Spec 2015-12-30 14:52:15 -08:00
Tony Tam
b46e3ad400 updated for #1749 2015-12-21 22:16:11 -08:00
Tony Tam
6b7ceab081 updated to dev version 2015-10-25 20:59:52 -07:00