Commit Graph

40 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
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
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
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
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
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
Nadezhda Makarkina
eca827613d Fixed #831: skipOverwrite flag has been added 2015-06-30 17:58:35 +03: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
Tony Tam
1df3ed4487 repackaged 2015-06-06 23:44:20 -07:00
Tony Tam
0c1657d744 updated package 2015-06-06 23:43:34 -07:00
hrachya
3e0913a813 removing generic header comments 2015-06-01 10:43:23 -07:00
hrachya
ba7025d54b Adding config-help command 2015-05-28 15:02:32 -07:00
hrachya
c9c58cbe4c new -c/--config option for swagger-cli to specify json config file path
setting options passed in config file if those were allowed by lang specific CodegenConfig
2015-05-27 17:37:07 -07:00
Ole Lensmar
17d8d14cc8 defaulted sources to go to src/gen/main and added possibility to set impl folder via system property at command-line 2015-05-20 16:49:50 -06:00
MerkushevKirill
0dcd307333 update docs and bash about CLI usage, deprecate old cli classes
(after #547)
2015-03-28 12:34:44 +03:00
Tony Tam
b7c2c3448e renamed package 2015-03-25 12:12:04 -07:00