Commit Graph

739 Commits

Author SHA1 Message Date
Benjamin Douglas
7d22605473 Adding stub test for CXF
It looks like these are not automatically generated and so needed to be filled
in manually.
2017-04-17 18:23:11 -07:00
Benjamin Douglas
07ba1eb6f8 Fixup generation of Javascript samples
The generation code was ignoring top-level aliases for any language config that
contained "java", which included "javascript", a completely different language.

Changed this to be those configs based on the JavaAbstractGenerator class.
2017-04-17 17:50:01 -07:00
Benjamin Douglas
73454e95dc Fixed up duplicate pom ids
These were generated by bin/run-all-petstore, so ultimately that script should
be modified to not generate the duplicate artifact ids.
2017-04-17 16:30:38 -07:00
Benjamin Douglas
9058099e5b Add alias type definitions for Java
When a spec defines a Model at the top level that is a non-aggretate type (such
as string, number or boolean), it essentially represents an alias for the simple
type. For example, the following spec snippet creates an alias of the boolean
type that for all intents and purposes acts just like a regular boolean.

    definitions:
      JustABoolean:
        type: boolean

This can be modeled in some languages through built-in mechanisms, such as
typedefs in C++. Java, however, just not have a clean way of representing this.

This change introduces an internal mechanism for representing aliases. It
maintains a map in DefaultCodegen that tracks these types of definitions, and
wherever it sees the "JustABoolean" type in the spec, it generates code that
uses the built-in "Boolean" instead.

This functionality currenlty only applies to Java, but could be extended to
other languages later.

The change adds a few examples of this to the fake endpoint spec for testing,
which means all of the samples change as well.
2017-04-17 12:58:31 -07:00
wing328
a17e80dfb1 minor fix to spring use of examples 2017-04-18 01:42:29 +08:00
wing328
34a99d6dba update spring petstore samples 2017-04-17 23:32:03 +08:00
wing328
a32774c541 update spring boot bean validation script 2017-04-17 23:25:27 +08:00
wing328
c7ccb1a9a9 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-04-17 23:05:46 +08:00
wing328
4e6a342c13 replace tab with 4-space in spring templates (#5389) 2017-04-13 19:03:34 +08:00
wing328
c637157f9e update project identifier for spring boot beanvalidation 2017-04-13 18:38:34 +08:00
wing328
50c6f87d98 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-04-13 17:48:34 +08:00
wing328
0682e41d6d update spring petstore sample 2017-04-13 17:44:38 +08:00
dhuning
8cf0f7046e Adds @Valid to request body for the JavaSpring (#4850)
* Adds Valid annotation for request body (#4847)

If useBeanValidation is active, this change will add Valid annotation to ReqeustBody

* Adds generated samples for bean vaildation in spring boot (#4847)

* Adds Valid import to Controller

* Adds generated code for bean validation change
2017-04-13 17:42:02 +08:00
Benjamin Douglas
ab69ce5dc3 Add null pointer check to add/put methods (#5385) (#5386)
Commit e3d04ee01 (issue #5240) introduced unsafe add/put methods for optional
list/map parameters. This change maintains the spirit of issue #5240 (optional
containers are null by default) while still making add/put calls safe. It does
this by checking for null first and, if so, initializing it with an empty
container.

Also updated the affected samples using the various scripts in bin/.
2017-04-13 17:37:49 +08:00
wing328
1f4261d20b Merge remote-tracking branch 'origin/master' into 2.3.0 2017-04-11 22:29:28 +08:00
wing328
1fdd3e6ffa [Java][Spring] fix enum allowable values in Spring generators (#5364)
* fix enum allowable values in spring generators

* use values instead of enumVars in spring annoation
2017-04-11 22:23:09 +08:00
wing328
e3d04ee01f [Java] remove initialization for optional list property (#5363)
* set list to null in java if not required

* update petstore sample for java server stub

* update sample for msf4j

* add null assignment to new list/map in java
2017-04-11 19:07:48 +08:00
wing328
7662924ce1 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-04-10 23:32:06 +08:00
Jean-François Côté
2e46bb9b9f Add File support + some fixes to Play generator (#5263)
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework.

* Fix suggestions in the PR discussion + add .bat and .sh file as requested.

* Updated Readme.md file

* Remove unused mustache file + fix baseName vs paramName in all the mustache files.

* Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself.

* Fix the problem with the Http.MultipartFormData.FilePart

* Return a FileInputStream when the returnType is "file" + Fix a couple of other bugs with boolean + updated sample

* Return an InputStream instead of FileInputStream (except in the instantiation)

* A little cleanup for the form param of type file.
2017-04-10 23:23:28 +08:00
wing328
956e7b4cb5 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-04-04 23:04:25 +08:00
Paŭlo Ebermann
f0b0226e46 [Java][JaxRS][Spring-MVC] Update samples for jaxrs with Jersey 1/2 and for spring-mvc (#5212)
* Update samples for Spring-MVC.

* Update samples for Spring-MVC-Jav8-async.

* Update samples jaxrs/jersey1.

* Update samples jaxrs/jersey2.

* Update samples spring-mvc

* Update samples spring-mvc-j8-async
2017-04-04 21:41:22 +08:00
wing328
ad2552ace6 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-04-04 15:27:17 +08:00
Paŭlo Ebermann
ffb4d52469 Update security samples: server (#5285) 2017-04-04 14:44:59 +08:00
Ian O'Neill
f303183b44 [JaxrsResteasy] Fix JacksonConfig package and RestApplication imports (#5302) (#5303)
This is for the EAP version specifically.

* The JacksonConfig class always used the io.swagger.api package
* The RestApplication class did not import the service implementations
  from the correct package
* Added shell script for generating test applications
2017-04-04 00:43:40 +08:00
wing328
cf8a9a0de0 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-04-03 14:54:50 +08:00
Paŭlo Ebermann
ce41a343d8 Updating all samples (except feign) (#5281) 2017-04-02 17:01:15 +08:00
wing328
4916142450 Merge remote-tracking branch 'origin' into 2.3.0 2017-04-02 16:06:33 +08:00
jfiala
ca6b5d09d0 [Jaxrs-cxf] Add check for useGenericResponse for jaxrs-cxf server + client (#4779)
* add check for useGenericResponse for jaxrs-cxf

* move check for genericresponse to cxf codegen #4713
2017-04-02 16:05:16 +08:00
Sebastian Mandrean
7cc20cbeba [C#][aspnetcore] Improve generated code (#5257)
* Migrate from Swashbuckle to Swashbuckle.AspNetCore

* Fix typo

* Add SwaggerResponse for all responses

* Remove model constructor

* Add required attribute if available

* Improve whitespace and remove some redundant code

* Remove redundant code from Dockerfile

* Add disable warning 1591 pragma for model utility methods for bringing down compiler warnings to zero

* Add proper model state validation before controller is called

* Regenerate AspNetCore PetStore sample
2017-03-30 22:58:25 +08:00
wing328
c9182ba00f Merge remote-tracking branch 'origin/master' into 2.3.0 2017-03-30 22:49:11 +08:00
wing328
a15af0828c update nodejs petstore samples 2017-03-30 22:39:53 +08:00
wing328
ad4de91d92 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-03-30 09:57:07 +08:00
Paŭlo Ebermann
db71d97370 Updating samples after #5232. (#5243)
* Updating samples after #5232.

* Fix tests after #5232.

* Fix Javascript client tests.

* JaxRS server: set serverPort only when not given from outside.

* Update JaxRS sample creator scripts to fix serverPort.

* Preliminary test fix for JaxRS server generators.

* Updating samples for JaxRS with Jersey1/2.

* Updating JaxRS samples again.
2017-03-30 01:28:53 +08:00
Paŭlo Ebermann
2830fb1794 [JaxRS Server][Jersey1/2] Pass server port by cli (#5246)
* JaxRS server: set serverPort only when not given from outside.

* Update JaxRS sample creator scripts to fix serverPort.

* Preliminary test fix for JaxRS server generators.

* Updating samples for JaxRS with Jersey1/2.
2017-03-30 01:26:37 +08:00
wing328
8f37e68049 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-03-29 17:25:10 +08:00
Paŭlo Ebermann
dd883e4125 Issue #3084: remove timestamps from undertow samples (#5231)
* Issue #3084: Support hideGenerationTimestamp for Undertow.

* Issue #3084: disable timestamp generation for undertow samples.

* Update samples for Undertow.
2017-03-28 16:55:08 +08:00
wing328
e41dd761b5 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-03-28 10:37:19 +08:00
wing328
05c671aa5a fix msf4j bin script 2017-03-28 10:07:38 +08:00
wing328
f4d1261522 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-03-27 16:05:44 +08:00
Paŭlo Ebermann
b275b8f9da Updating samples for spring-stubs, springboot-delegate, springboot-delegate-j8. (#5211) 2017-03-27 15:24:18 +08:00
Paŭlo Ebermann
ec6248cbcf [Erlang] pretty print swagger json (#5215)
* Pretty-print swagger.json.

(This was done via `jq`. In a later commit we'll generate it pretty-printed.)

* Erlang Server: pretty-print generated swagger.json.

* Update samples for Erlang-server.
2017-03-27 14:50:17 +08:00
wing328
1a1f5afddc add ci test for msf4j server (#5220) 2017-03-27 14:37:42 +08:00
Paŭlo Ebermann
c0e42d2ae0 Updating samples for JaxRS servers: Spec + CXF-CDI. (#5213) 2017-03-27 14:31:46 +08:00
Paŭlo Ebermann
a505822b86 Update samples for JaxRS/RestEasy/Joda. (#5205) 2017-03-27 14:28:06 +08:00
Paŭlo Ebermann
c73c7ff3b9 Update samples for Undertow. (#5207) 2017-03-27 14:27:38 +08:00
Paŭlo Ebermann
b3fac54df6 Update samples for Java Inflector. (#5204) 2017-03-27 14:10:15 +08:00
Paŭlo Ebermann
6fef9c5ce6 [java][msf4j] Update msf4j samples (and fix artifact name) (#5210)
* Fix MSF4J pom indentation.

* Set MSF4J sample artifactId in the generator script.

* Update MSF4J samples.
2017-03-27 14:09:36 +08:00
Paŭlo Ebermann
4ec23e6694 Update samples for Ruby-Client + Rails server. (#5214) 2017-03-27 13:27:13 +08:00
wing328
05a3c8d5df Merge remote-tracking branch 'origin/master' into 2.3.0 2017-03-27 12:01:56 +08:00
Paŭlo Ebermann
f0b9c2b761 [Go] #3084: remove timestamps from go server (#5218)
* Issue #3084: add hideGenerationTimestamp option to Go server generator.

* Issue #3084: use hideGenerationTimestamp in go server sample script.

* Update Go server samples.
2017-03-27 11:47:15 +08:00
wing328
7e5f65340e Merge remote-tracking branch 'origin/master' into 2.3.0 2017-03-26 23:19:25 +08:00
wing328
f719a743a0 update jaxrs-cxf sample 2017-03-26 23:16:39 +08:00
wing328
20cc80d170 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-03-26 23:05:46 +08:00
Paŭlo Ebermann
9b113d5a19 Update samples flask connexion (#5203)
* Update samples for flaskConnexion-python2.

* Update samples for flaskConnexion.
2017-03-26 23:02:51 +08:00
Paŭlo Ebermann
9b25c0f529 Update samples for JaxRS/CXF. (#5201) 2017-03-26 22:55:55 +08:00
wing328
41a505a1f8 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-03-25 14:37:59 +08:00
Jean-François Côté
282b22744c [Java][PlayFramework] Added some CLI Options + many fixes (#5180)
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework.

* Fix suggestions in the PR discussion + add .bat and .sh file as requested.

* Updated Readme.md file

* Remove unused mustache file + fix baseName vs paramName in all the mustache files.

* Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself.

* Fix the problem with the Http.MultipartFormData.FilePart

* - Add "wrapCalls" and "useSwaggerUI" CLI Options and updated what handleException does to follow Play Framework lifecycle more closely
- Updated all mustache files accordingly
- Updated the sample
- Updates Play Framework version to the latest 2.5.13
2017-03-25 14:36:01 +08:00
Tony Tam
0e64149f63 rebuilt sample 2017-03-23 11:05:08 -07:00
wing328
8aceed7557 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-03-23 18:26:07 +08:00
wing328
8fbe82a66b replace tab with 4 spaces (#5174) 2017-03-23 17:18:01 +08:00
wing328
aa3a5c6347 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-03-23 16:54:49 +08:00
jfiala
43aa4a8569 [Jaxrs-cxf] Add method-level cascaded beanvalidation (@Valid) (#4921)
* add ApiResponse/s to operation #4718

* add method-level cascaded beanvalidation #4847
2017-03-23 15:56:23 +08:00
wing328
c206086abe Merge remote-tracking branch 'origin/master' into 2.3.0 2017-03-22 23:03:02 +08:00
wing328
2b0efda3bd [Java][Play] Remove swagger play dependency, cleanup (#5159)
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework.

* Fix suggestions in the PR discussion + add .bat and .sh file as requested.

* Updated Readme.md file

* Remove unused mustache file + fix baseName vs paramName in all the mustache files.

* Add an CLI option to generate interface. These interfaces are implemented by the controllerImp and help to generate the code with an IDE like IntelliJ because on updates of the code the controllerImp must follow the contract of the interface. If it don't, IDE will provide support to generate missing functions or parameters. I also did some cleanup of options we don't use in Play Framework.

* Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself.

* Fix the problem with the Http.MultipartFormData.FilePart

* Small fixes

* Remove everything related to swagger-play. No need for annotation anymore because we export the swagger.json directly and show the documentation using swagger-ui with the direct path. Also added the sample.

* Remove/Rename paramsX mustache because there is no more documentation. Remove unused file. updated sample

* Fix the problem with default values that was not set correctly.

* Small fix related to bad merging

* Add handleException CLI options

* Fix default values once and for all!

* Update sample files + fix bug

* Fix bug with body that is required and have a list as a parameter + add bean import for interface to prevent compilation error
2017-03-22 23:00:30 +08:00
wing328
bea9e265e9 Merge remote-tracking branch 'origin/master' into 2.3.0 2017-03-22 20:52:26 +08:00
wing328
a4d4b0f0bd fix pattern in python flask (#5155) 2017-03-22 20:41:12 +08:00
wing328
4f6b3bd48b Merge remote-tracking branch 'origin/master' into 2.3.0 2017-03-22 15:55:56 +08:00
wing328
3c308ca40e update sample for spring boot 2017-03-21 23:30:54 +08:00
Fábio Franco Uechi
0afa084158 Add docker support to python flask (#5133)
* added supporting files for Dockerfile and dockerignore generation for python-flask lang

* documenting how to build the docker image and how to spin up a container

* updating pet store sample
2017-03-21 23:21:53 +08:00
wing328
6708cc50eb [Java][Play] update CI (travis) to cover Play framework petstore server (#5130)
* add test to cover play framework

* add sample for java play framework

* add script to test only if running sdk8 for play petstore
2017-03-21 22:49:05 +08:00
Sebastian Mandrean
58198939c7 [C#][aspnetcore] Fix broken Docker build option & documentation (#5128)
* Use lower-case packageName for README.md docker build example

* Use dotnet:1.0.3-sdk instead of just "latest"

* Regenerate Petstore server sample
2017-03-21 14:39:24 +08:00
wing328
08d4545947 Merge remote-tracking branch 'origin' into 2.3.0 2017-03-20 15:07:43 +08:00
foxx1337
090d80b42c [JAVA][jaxrs-spec] Add @DefaultValue for query parameters in API (#5023) (#5024)
This was previously missing and I don't think it was intentional.
It appears that swagger-codegen is already correctly processing
the yaml and the placeholder in the template was the only thing
missing.
2017-03-20 15:04:27 +08:00
wing328
1010ecc8d5 Merge remote-tracking branch 'origin' into 2.3.0 2017-03-18 15:39:10 +08:00
Sebastian Mandrean
5ed94a002c [Haskell] Fix broken client/server compilation errors (#5097)
* Remove dead legacy code

* Update cosmetics according to Haskell standard practices

* Fix failing pattern matching for lookupEither

* Bump to latest dependencies without any breaking changes

* Remove duplicate instance declarations already existing in Servant.API.Verbs

* Fix double Java/Haskell escapement bug

* Re-generate Petstore sample client/server
2017-03-17 16:55:11 +08:00
Paŭlo Ebermann
1c160df338 Fix Issue #5063 (deleting wrong sample files) (#5064)
* Update samples for springboot, spring-delegate, spring-delegate-j8.

* Issue #5063: delete samples in the correct directory.
2017-03-16 01:36:25 +08:00
Paul Ebermann
5bb0f7a933 Update all samples. 2017-03-15 18:25:40 +01:00
Paul Ebermann
784169bc3f Merge branch 'master' into new-sync-master-to-2.3.0 2017-03-15 16:41:33 +01:00
Paul Ebermann
08ea36b13d Merge remote-tracking branch 'upstream/2.3.0' into new-sync-master-to-2.3.0 2017-03-15 16:34:27 +01:00
wing328
c1f422b965 Merge pull request #5072 from swagger-api/sync_master_230
Sync master to 2.3.0 branch
2017-03-15 23:09:31 +08:00
Sebastian Mandrean
55508d9c24 [Haskell] Bump dependencies (#5061)
* Bump haskell-servant dependencies

* Update haskell-servant petstore sample
2017-03-15 17:42:08 +08:00
Paŭlo Ebermann
31f29be2a0 Use deterministic randomness in ExampleGenerator. (#5068)
* Update samples for nodejs + nodejs-google-cloud-functions.

* Fix example generator to use deterministic randomness.

This avoids changing results after each generation, and makes diff reviews easier.

* Update NodeJS samples.

This is the last "randomness" update. From now on the samples should only change if either the generator, the input or parameters change.
2017-03-15 17:15:13 +08:00
Paŭlo Ebermann
e1b1edf958 Merge branch 'merge-2.3.0' into new-sync-master-to-2.3.0 2017-03-14 21:04:47 +01:00
Paul Ebermann
26b618241a Merge branch 'update-samples-for-sync_master_230' into merge-2.3.0 2017-03-14 13:11:24 +01:00
Paul Ebermann
aba5abd15e Update samples again after swagger-parser bump. 2017-03-14 12:54:11 +01:00
Paŭlo Ebermann
9be178b26a Merge branch 'master' into new-sync-master-to-2.3.0 2017-03-13 21:42:41 +01:00
Paŭlo Ebermann
22de105895 Merge remote-tracking branch 'upstream/2.3.0' into merge-2.3.0 2017-03-13 21:26:39 +01:00
Paŭlo Ebermann
3a48ba8bfd Update all the samples.
(except clojure + scalatra, because those are broken, will fixed with later master merge.)
2017-03-13 19:50:10 +01:00
jfiala
39eba39625 [Jaxrs-cxf] add ApiResponse/s to operation #4718 (#4920)
* add ApiResponse/s to operation #4718

* use spaces instead of tabs #4718

* fix alignment issues #4920

* fix alignment issues #4920

* replace tabs with spaces #4920

* updated samples #4920
2017-03-12 16:58:19 +08:00
wing328
d9ee34e250 Update travis.yml to cover Java-related server stubs (#4992)
* update travis to cover more test cases

* update artifactid

* update artifactid for msf4j

* update pom for better test naming
2017-03-10 22:22:40 +08:00
pablograna
fb75996527 Make java spring controller constructor public. (#4972)
* Make java spring controller constructor public.

This lets users manually create the controller and inject the delegate in the
spring configuration file, instead of letting spring scan for controllers and
autowire the delegate.

* Ran spring-all-pestore.sh.
2017-03-09 23:11:44 +08:00
jfiala
871b3ceef7 update templates and samples for spring-boot #4719 (#4736) 2017-03-07 23:35:21 +08:00
jfiala
2f43f98cfa update beanvalidation templates and samples jersey2 #4719 (#4732) 2017-03-07 23:35:06 +08:00
jfiala
6a7340378a update beanvalidation templates + samples #4719 (#4733) 2017-03-07 23:34:40 +08:00
jfiala
1e8312782b [Jaxrs-spec] Merge beanValidation/beanValidationParams.mustache (#4731)
* update beanvalidation templates #4719

* update jaxrs-sample #4719
2017-03-07 23:26:30 +08:00
dhuning
6ea3315b3e Implicit headers for SpringCodegen (#4858)
* Add a new option implicitHeaders with default false

* Change JavaSpring templates and codegen to handle implicit headers

* Add script to generate sample for implicitHeader option

* Add generated implicitHeader sample

* Fix alignment
2017-03-07 14:54:15 +08:00
Paŭlo Ebermann
a710149cdd Fix #4898 for jaxrs (#4918)
* fix #4898 for JavaJaxRS (including all libraries).

* Updated samples for jaxrs (after fix for #4898).
2017-03-06 20:04:31 +08:00
Paŭlo Ebermann
6c9b0ce257 Update samples for Scalatra after 2.2.2. (#4910)
* Update samples for Scalatra after 2.2.2.

* [scalatra] Revert changes to build.sbt

Changes were made in conjunction with the new finch generator. This
reverts those changes to Scalatra's previous build.sbt.

* Update scalatra samples again after revert of part of #3905.
2017-03-06 14:23:02 +08:00
Tony Tam
b9d9629a65 Merge pull request #4925 from jfiala/cxf_swagger-core_4924
[Jaxrs-cxf] Fix compile errors after update of swagger-core / add jackson dependencies to pom #4924
2017-03-05 10:31:02 -08:00
Johannes Fiala
f72340fb17 change jackson jaxrs version to 2.8.4 #4924 2017-03-05 19:17:27 +01:00
Paŭlo Ebermann
7b559b4422 Update samples for MSF4J after 2.2.2. (#4915) 2017-03-06 01:12:29 +08:00
Tony Tam
15a0bf5df5 Refactor nodejs generated code structure (#4909)
* read directly from templates

* refactor nodejs structure

* dont inject into global scope

* move to 2 spaces consistently
2017-03-06 01:10:01 +08:00
Paŭlo Ebermann
a91cbbe387 Update samples after 2.2.2 (#4901)
* Update petstore samples for Groovy.

* Update samples for JaxRS.

* Update samples for cpprest.

* Update samples for dart.

* Update samples for flash.

* Update samples for go.

* Update samples for html2.

* Update samples for lumen.

* Update samples for nancxfx.

* Update samples for objc.

* Update samples for sinatra.

* Update samples for tizen.

* Update samples for java-inflector.
2017-03-06 00:33:57 +08:00
Johannes Fiala
165076a427 add jackson dependencies to pom #4924 2017-03-05 17:30:17 +01:00
wing328
061f4d07d8 fix issue with pom dep in jaxrs jersey1 (#4904) 2017-03-03 22:25:59 +08:00
Bart Kummel
30c2b6f262 Improved ExampleGenerator (#4797)
* Improved ExampleGenerator:

- Now takes into account enum and uri/url formats for strings.
- Uses example for referenced objects if available.
- Proper examples get generated for specific numeric formats, because more specific formats now get checked before generic format.
- Honors min and max values for numerical properties, if set.

* Ran script `bin/nodejs-petstore-server.sh`.

* Renamed log to logger to conform to coding standard.
2017-03-03 18:38:19 +08:00
wing328
835c7c0e0c [PHP][Silex] use original path name for path variable naming (#4817)
* use original path name in php silex

* fix path variable naming by camelizing the name
2017-03-03 16:49:00 +08:00
wing328
6c63558acc better python flask readme (#4844) 2017-03-03 16:45:43 +08:00
Paŭlo Ebermann
88c9b6062d Fix for #1219 (#4875)
* Update spring samples with current code.

This is done so I can see my own changes better.

* Regenerate samples after 2.2.2.

* use baseName instead of paramName for spring annotations.

* update spring petstore samples to show the effects.
2017-03-03 16:35:12 +08:00
Paŭlo Ebermann
0dab200f28 Update spring samples with current code. (#4874)
* Update spring samples with current code.

This is done so I can see my own changes better.

* Regenerate samples after 2.2.2.
2017-03-03 16:34:07 +08:00
Tony Tam
b43b3771b1 rebuilt 2017-03-01 14:14:52 -05:00
wing328
9e40700478 update jackson dependency and fix closing xml tag in jaxrs pom 2017-03-02 02:16:13 +08:00
wing328
f15267c717 add missing dependency to jaxrs pom 2017-03-02 01:56:27 +08:00
Tony Tam
655ba95b94 rebuilt 2017-03-01 10:04:39 -05:00
Tony Tam
4499a3c74c rebuilt 2017-03-01 10:02:42 -05:00
Tony Tam
40da4769b0 rebuilt 2017-03-01 10:01:50 -05:00
Tony Tam
89168d5e89 rebuilt 2017-03-01 09:59:27 -05:00
Tony Tam
9aeedca4c3 rebuilt 2017-03-01 09:58:53 -05:00
Tony Tam
c9c9d9a258 rebuilt 2017-03-01 09:58:17 -05:00
Tony Tam
2cec6192a4 rebuilt 2017-03-01 09:57:38 -05:00
Tony Tam
af2749325d rebuilt 2017-03-01 09:56:42 -05:00
jfiala
de727d7d60 [JaxrsResteasy] Improvements for Resteasy for Jboss EAP 4512 (#4712)
* add language for resteasy eap #4512

* first implementation of jaxrs-resteasy-eap #4512

* add support for joda and java8 datetime types #4512

* add new file JacksonConfig and new sample eap-joda #4512

* add dynamic swagger support to jaxrs-resteasy-eap #4512

* adapt readme for eap #4512

* add tests for jaxrs-resteasy-eap #4512

* cleanup tabs #4512

* cleanup tabs #4512

* cleanup tabs #4512

* cleanup tabs / regenerate without joda #4512

* regenerate with updated templates #4512

* fix test (wrong setter invoked) #4512

* fix test #4512

* fix no invocation #4512

* replace tabs with spaces #4512
2017-03-01 00:20:35 +08:00
gcernier
09e2bbe1ee Fix of #3371, to have a correct @ApiResponse's response type.
@ApiResponse's 'response' property now refers to its relative 'baseType', if defined.
2017-02-15 17:18:32 +01:00
clasnake
ee23f8e50c Fix finch package name. (#4755) 2017-02-13 22:33:55 +08:00
wing328
acd10318f7 Merge remote-tracking branch 'origin' into sync_master_230 2017-02-10 23:31:36 +08:00
wing328
beadd6d740 update java server stub samples with new uuid mapping 2017-02-08 16:39:02 +08:00
wing328
bdf6957c08 update jaxrs spec petstore sample (mac) 2017-02-08 01:07:18 +08:00
jfiala
e9823a81a5 [Jaxrs-spec] fix usage of Jersey templates in shellscript (#4722)
* remove jersey templates #4720

* regenerate sample with jaxrs-spec templates #4720
2017-02-08 00:41:36 +08:00
wing328
c0fc66ebec Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-02-06 15:33:11 +08:00
wing328
509a156879 Merge branch 'jaxrs_beanval_final_4091' of https://github.com/jfiala/swagger-codegen into jfiala-jaxrs_beanval_final_4091 2017-02-06 15:13:03 +08:00
Markus
4900427bf5 [JAXRS-CXF] Issue 4569 - Re-added usage of contextPath in api.mustache (basePath) (#4580)
* jaxrs-cxf: Re-added usage of contextPath in api.mustache (basePath)

* jaxrs-cxf: Added useAnnotatedBasePath and generateNonSpringApplication flags

 * useAnnotatedBasePath=true uses the @Path annotation in the generated interface to set the basePath, default is false

 * generateNonSpringApplication=true generates a web.xml with CXFNonSpringJaxrsServlets. If useAnnotatedBasePath=true only one servlet will be created, otherwise one for each API

* jaxrs-cxf generateNonSpringApplication: removed creation of multiple servlets

Multiple servlets were generated if useAnnotatedBasePath was false.
This is not necessary as there is only ONE basePath per contract

* jaxrs-cxf: added sample generation for useAnnotatedBasePath and generateNonSpringApplication
2017-02-06 14:11:41 +08:00
jfiala
38c879683a [Jaxrs-cxf-cdi] Add beanvalidation annotations updated (#4615)
* add check for hideGenerationTimestamp #4091

* update generated sample with no generated timestamps #4091

* add beanvalidation to jaxrs-cxf-cdi #4091

* add beanvalidation to jaxrs-cxf-cdi #4091

* update crlf

* replace tabs

* add check for hideGenerationTimestamp #4091

* update generated sample with no generated timestamps #4091

* add beanvalidation to jaxrs-cxf-cdi #4091

* add beanvalidation to jaxrs-cxf-cdi #4091

* update crlf

* replace tabs

* re-generate samples after rebasing #4091

* fix handling of inner enum templates #4091

* fix InputStream/Multipart imports and fileInputStream variable #4091

* fix paramName for files #4091

* consolidate beanValidationParams #4091

* add paramNameDetail #4615

* fix indentation and regenerate samples #4615

* reset samples jaxrs-spec to master

* update generated samples

* adapt Min/Max/DecimalMin/DecimalMax handling for int/long/else

* add ModelApiResponse
2017-02-06 00:55:30 +08:00
Markus
a83f8d0449 [JAXRS-Spec|Resteasy|CXF] Issue 4315 - Fixed bug generating arrays of enums (#4582)
* jaxrs-cxf: Fixed returning of enum arrays generating non-compiling code

* jaxrs-spec/resteasy: Fixed returning of enum arrays generating non-compiling code

* jaxrs-cxf: Switched to petstore-with-fake-endpoints-models-for-testing.yaml contract for sample generation

 * Fixed escape char issue in ApiOperation summary
 * Fixed code generation for non String-type enums
 * Fixed @PATCH annotation import

* jaxrs-spec: Switched to petstore-with-fake-endpoints-models-for-testing.yaml contract for sample generation
2017-02-05 23:01:18 +08:00
eamon316
23aee52bcd Feature/4606 (#4607)
* Issue #4606 (Spring) SubClass annotations are missing from the base class

* Issue #4606 (Spring) SubClass annotations are missing from the base class
   * Commit updated samples from ./bin/spring-all-pestore.sh
2017-02-03 22:30:32 +08:00
Matan Rubin
8042f5ca3e [JAXRS-CXF] [issue #4386] add builder-style methods to model classes (#4468)
* [JAXRS-CXF] [issue #4386] add builder-style methods to model classes

before this change, model classes had only a default constructor and
setter methods, resulting in code like this:

    myModel = MyModel();
    myModel.setFirstField(firstField);
    myModel.setSecondField(secondField);
    return myModel;

this change adds builder style methods, such that the above code can be
written more compactly:

    return MyModel().firstField(firstField).secondField(secondField);

this is consistent with other JAVA generators in swagger-codegen.

* update jaxrs-cxf sample code
2017-01-31 23:07:12 +08:00
wing328
ae8a123484 [WIP][Scala] Finch generator (#3905)
* Feature/objc tasks 2.3.0 (#3522)

* change api and ApiClient to return cancellable NSURLSessionTasks instead of NSNumber

* define a configuration protocol for custom configurations, which can be passed to api clients instead of a global configuration, provide a default implementation with a singleton option

* integrate a workaround for a current JSONModel concurrency bug

* update to new ISO8601 pod

* add missing call to super

* integrate new templates into codegen

* updates documentation templates

* updates petstore objc generated code

* fixes objc client tests

* [ObjC] Add version define and share default headers of each client

* add finch generator and resource

* update license, add errros

* Fix problem with multitheard api client

* fix some errors for finch

* [finch] Remove license header

* [finch] Remove finatra stuff, fix a few issues

* WIP: Finch server generator

* [finch] WIP: server generator impl

This puts parameters (input/output) in the right format. Currently, this
is done in the generator class using vendorExtensions, but should be
refactored to imported templates to clean up.

Previous commits of the server generator output to appropriate
models/api directories. I've made no changes to this logic, but code
currently generates to the root scala package directory. This will need
to be fixed.

There's also an issue with circe's and Option[Date] in the Order type.
This issue will need to be resolved. As well, there's some unused
imports to clean up.

Initial implementation lacks support for custom imports, type mappings,
etc.

* [finch] Update api/model package and imports

* [finch] Explicit import/type mappings

* [finch] Regenerate example
2017-01-29 12:15:39 +08:00
wing328
a45579d35e fix issue with pom.xml (spring cloud, boot) 2017-01-27 00:39:25 +08:00
jfiala
8952815b5f [Spring] Add beanvalidation annotations (#4600)
* update generated sample for spring boot #4091

* add beanvalidation annotations to spring #4091

* add tests for spring #4091

* cleanup spring-cloud (client lib) #4091

* update client sample spring-cloud #4091

* replace tabs

* add beanvalidation annotations to spring #4091

* add tests for spring #4091

* cleanup spring-cloud (client lib) #4091

* update client sample spring-cloud #4091

* replace tabs

* update spring-cloud sample
2017-01-26 23:45:36 +08:00
wing328
658b650285 Merge branch 'master' of https://github.com/karnik/swagger-codegen into karnik-master 2017-01-26 16:30:51 +08:00
Tony Tam
ecaa8b1ede tests, fix for #4647. Proper escaping project name per npmjs (#4648) 2017-01-25 17:08:54 +08:00
Jonathan Leitschuh
78f38f1a1f Add support for read-only values in spring model (#4629) 2017-01-25 16:34:55 +08:00
Johannes Fiala
c0bea5ead9 move beanvalidation code to AbstractJavaJAXRSServerCodegen.java #4091 2017-01-23 21:18:01 +01:00
Jonathan Leitschuh
36c3fa05e0 Allows for generation of spring controller code using the delegate pattern (#4439)
* Allows for generation of spring conroller code using the decorator pattern

* Change Decorator to Delegate in spring codegen
2017-01-19 17:58:39 +08:00
jfiala
6f4e82dc03 [Jaxrs-Resteasy] Add beanvalidation annotations (#4506)
* add beanvalidation to jaxrs-resteasy #4091

* replace tabs
2017-01-19 17:45:17 +08:00
wing328
157fcbc4aa fix invalid spec, update petstore samples (jaxrs, ruby) 2017-01-19 16:54:16 +08:00
wing328
5f1b11827a Merge branch 'master' into master 2017-01-19 16:03:15 +08:00
wing328
a8afaa8f77 remove /r from templates 2017-01-19 15:53:51 +08:00
wing328
ccecc2aac0 new file for jaxrs jersey1 2017-01-19 15:31:24 +08:00
wing328
1ae60b1f61 Merge branch 'jaxrs_jersey_beanval2' of https://github.com/jfiala/swagger-codegen into jfiala-jaxrs_jersey_beanval2 2017-01-19 15:30:54 +08:00
jfiala
ee7f9fc56c [Jaxrs] Add beanvalidation annotations and fix outer Enums (#4492)
* add beanvalidation to jaxrs and add support for outer Enums #4091

* cleanup Codegen #4091

* cleanup samples #4091

* cleanup tabs

* updated samples to petstore.yaml (before petstore.json)

* add support for DecimalMin/DecimalMax/Min/Max #4091

* add check for hideGenerationTimestamp #4091

* replace tabs

* correct line endings to lf
2017-01-19 15:13:11 +08:00
Jim Schubert
da6b57f3fc [aspnetcore] use default in model constructors, supports enums (#4573)
* [aspnetcore] Use default rather than null in ctor

See original issue #3608

This adds same model constructor logic to aspnetcore as what was added
to csharp generator by PR #4145.

This doesn't include NancyFX because model construction relies more on
object initialization in that generator.

* [aspnetcore] ctor defaults + enum support

This follows up to #4145, and modifies model constructors to use
default(x) instead of initializing to nulls. default(x) works in all
cases using intuitive default values it is intended to support.

Example:

  csharp> public enum Color { RED = -1, BLUE = 0, GREEN }
  csharp> var color = default(Color)
  csharp> color
  BLUE

In the above example, The default of BLUE=0 is expected. For nullable
enums, this would be null as a default.

The aspnetcore generated code is also updated to support enums and
nested enums to account for changed to the petstore.yaml used to
generate the sample.

* [aspnetcore] Regenerate sample
2017-01-18 16:43:12 +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
Articus
4001503e63 PHP server generator ze-ph (Zend Expressive + Path Handler) (#4559)
* Server generator ze-ph (Zend Expressive + Path Handler)

* Command line scripts for new ze-ph generator
2017-01-16 01:05:04 +08:00
Yuta HIGUCHI
de5ea8a9d6 [JAX-RS/jersey2] Fix for incorrect JSON field name capitalization (#4458)
* Fix for all capital field name

* Cosmetic: remove trailing spaces

* Adding ./bin/jaxrs-petstore-server.sh output.
2017-01-10 23:37:25 +08:00
J. Fiala
6b17b92bb6 add check for isInteger (integer/decimal) 2017-01-06 16:46:59 +01:00
J. Fiala
5b532fd10e update language jaxrs (Jersey2) and samples 2017-01-06 15:16:39 +01:00
J. Fiala
dde24eb9c2 update jaxrs jersey1 templates and sample output #4091 2017-01-06 15:10:40 +01:00
Kevin Locke
df0c54d043 Support the empty string as an enumeration value (#4450)
When a string enumeration has the empty string as one of its available
values, the generated code for many languages is invalid because the
empty string can not be used as an identifier.  As with numbers and
symbols, provide a mapping to an English name which can be used as a
replacement.  In this case, "empty" for the empty string/empty value.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-01-06 19:30:47 +08:00
Simon Morris
aa1dc0fdd2 Updated Nancy from 1.4.1 to 1.4.3 (#4482) 2017-01-06 01:09:32 +08:00
William Cheng
ce899e3776 Merge remote-tracking branch 'origin/master' into 2.3.0
Conflicts:
	appveyor.yml
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaCodegen.java
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractTypeScriptClientCodegen.java
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SpringCodegen.java
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TypeScriptAngular2ClientCodegen.java
	modules/swagger-codegen/src/main/resources/Java/libraries/feign/pom.mustache
	modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/pom.mustache
	modules/swagger-codegen/src/main/resources/TypeScript-Fetch/api.mustache
	modules/swagger-codegen/src/main/resources/go/api.mustache
	modules/swagger-codegen/src/main/resources/objc/api-body.mustache
	modules/swagger-codegen/src/main/resources/objc/api-header.mustache
	modules/swagger-codegen/src/main/resources/typescript-angular2/configuration.mustache
	modules/swagger-codegen/src/main/resources/typescript-angular2/tsconfig.mustache
	modules/swagger-codegen/src/test/java/io/swagger/codegen/swift/SwiftModelTest.java
	modules/swagger-codegen/src/test/java/io/swagger/codegen/swift3/Swift3ModelTest.java
	modules/swagger-codegen/src/test/java/io/swagger/codegen/typescript/typescriptangular2/TypeScriptAngular2ModelTest.java
	samples/client/petstore-security-test/typescript-angular2/configuration.ts
	samples/client/petstore/go/go-petstore/docs/FakeApi.md
	samples/client/petstore/go/go-petstore/fake_api.go
	samples/client/petstore/go/go-petstore/pet_api.go
	samples/client/petstore/java/feign/pom.xml
	samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/FakeApi.java
	samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java
	samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java
	samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/RFC3339DateFormat.java
	samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Animal.java
	samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/EnumTest.java
	samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/FormatTest.java
	samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
	samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java
	samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/JSON.java
	samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java
	samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java
	samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/FakeApi.java
	samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/api/PetApi.java
	samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/api/FakeApi.java
	samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/FakeApi.java
	samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/api/PetApi.java
	samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.h
	samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGPetApi.m
	samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h
	samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m
	samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.h
	samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGUserApi.m
	samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGApiClient.h
	samples/client/petstore/objc/core-data/SwaggerClient/Core/SWGConfiguration.h
	samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.h
	samples/client/petstore/objc/default/SwaggerClient/Api/SWGPetApi.m
	samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h
	samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m
	samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.h
	samples/client/petstore/objc/default/SwaggerClient/Api/SWGUserApi.m
	samples/client/petstore/objc/default/SwaggerClient/Core/SWGApiClient.h
	samples/client/petstore/objc/default/SwaggerClient/Core/SWGConfiguration.h
	samples/client/petstore/objc/default/SwaggerClient/Core/SWGJSONResponseSerializer.h
	samples/client/petstore/qt5cpp/client/SWGPetApi.h
	samples/client/petstore/qt5cpp/client/SWGStoreApi.h
	samples/client/petstore/qt5cpp/client/SWGUserApi.h
	samples/client/petstore/typescript-angular2/default/configuration.ts
	samples/client/petstore/typescript-angular2/npm/README.md
	samples/client/petstore/typescript-angular2/npm/configuration.ts
	samples/client/petstore/typescript-angular2/npm/package.json
	samples/client/petstore/typescript-angular2/npm/tsconfig.json
	samples/client/petstore/typescript-fetch/builds/default/api.ts
	samples/client/petstore/typescript-fetch/builds/es6-target/api.ts
	samples/client/petstore/typescript-fetch/builds/with-npm-version/api.ts
	samples/client/petstore/typescript-fetch/tests/default/test/PetApiFactory.ts
	samples/client/petstore/typescript-fetch/tests/default/test/StoreApiFactory.ts
	samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java
	samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java
	samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java
	samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApi.java
	samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApiController.java
	samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeApi.java
	samples/server/petstore/springboot/src/main/java/io/swagger/api/FakeApiController.java
2017-01-05 17:44:39 +08:00
Johannes Fiala
1a1d0aebc8 add beanvalidation to jersey1 and jersey2 #4091 2017-01-04 17:36:28 +01:00
mkarnik
45002ec1fd [JAX-RS RESTEasy][issue #4447] Updated RESTEasy petstore samples 2016-12-23 10:37:17 +01:00
wing328
aed21bba73 better code format for nodejs server (#4411) 2016-12-23 02:05:10 +08:00
Jun Mukai
27f1b6ee98 Introduce NodeJS codegen for Google Cloud Functions. (#4406)
* Another approach: extending NodeJS server to support GCF.

This does not add a new language, but adding some client options
to support Google Cloud Functions (GCF).

* Add URLs for how to deploy the generated code.

Adds the client options help message and the README.md file.
2016-12-22 23:11:52 +08:00
Johan Nystrom
ff70105484 Fix CSV collection parameter issues for scalatra server (#4426)
* Fix scalatra handling of CSV query parameters

* Ran petstore for scalatra server
2016-12-20 16:02:45 +08:00
Matan Rubin
5867728724 [JaxRS-CXF][bug #4330] support containers in return types (#4339)
* [JaxRS-CXF][bug #4330] support containers in return types

before this commit if a method returned a container (List or Map) of
THING (i.e. List<THING> or Map<String, THING>) the generated return type would
drop the container and only leave THING.
this commit fixes this issue such that the container type is properly
generated.

* regenerate jaxrs-cxf petstore sample
2016-12-14 13:58:56 +08:00
cbornet
bcc7e69fcc [Flask] Add packaging support 2016-11-23 18:40:37 +01:00
wing328
44ca30df63 Merge pull request #4215 from cbornet/flask_param_name
[Flask] fix parameter naming
2016-11-23 15:42:42 +08:00
wing328
474dae08cf update NodeJS readme to remove oudated doc (#4232) 2016-11-22 10:42:15 +08:00
cbornet
9322c8fb0e [Flask] fix parameter naming 2016-11-20 11:21:09 +01:00
Christophe Bornet
df15799839 [Flask] Add generated tests (#4209) 2016-11-19 16:31:31 +08:00
jfiala
b02d505ad9 Refine CXF Add Spring Annotation-Config + Jboss flag for CXF/Resteasy + fix OuterEnum (#4164)
* add json annotations

* add cli flag to check for jaxb annotations

* add CLI-flag for switching Spring-XML or annotation config #4088

* add cli flag for generating jboss depl. descriptor #4088

* add JbossFeature CLI flag to Resteasy #4088

* update/add tests #4088

* cleanup tabs #4088

* improve api formatting #4088

* refine formatting #4088

* refine formatting again #4088

* add separate CLI-flags for controlling junit test features #4088

* add json annotations

* add cli flag to check for jaxb annotations

* add CLI-flag for switching Spring-XML or annotation config #4088

* add cli flag for generating jboss depl. descriptor #4088

* add JbossFeature CLI flag to Resteasy #4088

* update/add tests #4088

* cleanup tabs #4088

* improve api formatting #4088

* refine formatting #4088

* refine formatting again #4088

* add separate CLI-flags for controlling junit test features #4088

* add check for void methods + assertNotNull(response) #4088

* add spaces for @Produces #4088

* allow build with no web.xml config #4088

* comment invocations of tests #4088

* update petstore sample jaxrs-cxf server with gen/java first #4088

* re-generate jaxrs-cxf with src/gen/java #4088

* add client jaxrs-cxf #4088

* add switch to load SwaggerUI automatically #4088

* update to CXF 3.1.8 including supportSwaggerUi flag #4088

* update to cxf 3.1.8 and swagger-core 1.5.10 #4088

* update generated petstore for jaxrs-cxf #4088

* change Spring Boot urls to root #4088

* fix spring xml config #4088

* fix external enum usage for jaxrs-cxf #4160

* cleanup jaxrs-annotations in impl class

* fix handling of multiparts #4088

* fix @Min/@Max comments in beanValidationQueryParams #4088

* add swagger-codegen-ignore file+add src/test/resources #4088

* add cli-flag for produces/consumes json in api #4088

* add test case for outerEnum #4160
2016-11-19 16:09:13 +08:00
wing328
cde24f1113 Merge pull request #4189 from cbornet/spring_cloud_operations
[Spring] Use tag operation grouping for spring-cloud
2016-11-18 16:51:36 +08:00
wing328
359e52b173 Merge pull request #4188 from cbornet/flask_operations
[Flask] Use x-swagger-router-controller in for operation routing
2016-11-18 14:23:45 +08:00
Nick Maynard
b7e9603e63 jaxrs-cxf-cdi :: Add a basic JAX-RS Application and CDI fixes (#4196)
* Add a basic JAX-RS Application and CDI fixes

* jaxrs-cxf-cdi :: Fix samples generation template dir

* jaxrs-cxf-cdi :: Regenerate samples

* jaxrs-cxf-cdi :: Clean up some checkstyle warnings
2016-11-18 14:00:53 +08:00
wing328
3d476debaf Merge pull request #4178 from cbornet/flask
[Flask] Add models support to Flask Connexion codegen
2016-11-18 13:56:59 +08:00
cbornet
1e6cab8a03 [Flask] Use x-swagger-router-controller in swagger.yaml for operation routing
Fix #4106
2016-11-17 19:21:05 +01:00
cbornet
e5daa6855c add models support to flask 2016-11-17 18:30:59 +01:00
wing328
88227e08e3 Remove Apache license from server stub generators (#4200)
* remove php apache license

* remove license in sample code, update nodejs to use unlicnese

* remove license from jaxrs generator

* remove license from server generator

* update pom.xml for jaxrs resteasy joda server
2016-11-17 00:37:21 +08:00
cbornet
4a196a9187 [Spring] Use tag operation grouping for spring-cloud
Instead of basepath based grouping that is used by Spring boot/MVC
2016-11-15 18:46:48 +01:00
wing328
255bc02b83 Merge remote-tracking branch 'origin/master' into 2.3.0 2016-11-09 16:37:11 +08:00
wing328
cce410c463 add vendor extension to handle void response in jaxrs-cxf 2016-11-08 21:06:38 +08:00
wing328
46c4eb3869 update mxf4j sample 2016-11-07 23:54:47 +08:00
wing328
e78ce6fb1e Merge pull request #4059 from markus-wa/issue-4045
[JAXRS-CXF] Issue 4045 - Fixed enum marshalling & fromValue()
2016-11-07 23:42:29 +08:00
wing328
636623d0e9 Merge remote-tracking branch 'origin/master' into 2.3.0 2016-11-04 19:17:35 +08:00
Christophe Bornet
70d93883cf [Java] Threetenbp dates support (#4029)
* [feign] add threetenbp support for feign clients

* [okhttp] add threetenbp support for okhttp clients

* [jersey] add threetenbp support for jersey clients

* [retrofit2] add threetenbp support for retrofit2 clients

* [spring] add threetenbp support for spring generators

* add a workaround in tests for a bug in the petstore

The petstore doesn't manage fractional digits of dates correctly when there are less than 3
2016-11-04 17:55:16 +08:00
Simon Morris
8fb33980dc Nancy fx work (#4107)
* Added switch to config to toggle use of yaml base path as module paths

* NancyFX template updated to return collections as array to allow framework to find views by type name for text/html mime type

* Added some more parser fixes for NancyFX

* Refactored collection parsers in Parameters.cs and changed some to return nullable collections to match the parameter mappings in AbstractCSharpCodegen

* re-ran petstore build
2016-11-02 21:35:01 +08:00
wing328
4eb75f8088 add back setter to spring model (readonly attr) 2016-11-02 15:40:00 +08:00
wing328
07c6fe9d0d Merge remote-tracking branch 'origin/master' into 2.3.0 2016-10-26 15:42:59 +08:00
wing328
983aec6250 add sample for java-msf4 2016-10-26 11:31:43 +08:00
Simon Morris
5855b479aa nancyfx basePath => modulePath toggle (#4053)
* fix NancyFX string parser

parser needs to access the Value parameter to enable the direct cast at line 102 when handling string parameters

* Updated nancyfx sample

* Added switch to config to toggle use of yaml base path as module paths
2016-10-24 23:07:16 +08:00
walthema
1e975637c9 Fixed enum marshalling & fromValue()
Added toString() to enums
2016-10-24 15:07:46 +02:00
wing328
af16601654 Merge remote-tracking branch 'origin/master' into 2.3.0 2016-10-22 23:08:36 +08:00
Simon Morris
27be0ed197 fix NancyFX string parser (#4048)
* fix NancyFX string parser

parser needs to access the Value parameter to enable the direct cast at line 102 when handling string parameters

* Updated nancyfx sample
2016-10-22 22:53:56 +08:00
wing328
91923311e0 update undertow readme 2016-10-19 16:23:18 +08:00
wing328
c7efb7000c Merge remote-tracking branch 'origin/master' into 2.3.0 2016-10-19 15:45:15 +08:00
wing328
702344ed75 better handling of reserved words for sintatra, dart 2016-10-18 17:58:19 +08:00
Jim Schubert
c70a2a7481 [aspnetcore] Deprecating aspnet5 for aspnetcore
This moves previous aspnet5 functionality to aspnetcore, aspnet5 now
derives from the aspnetcore generator and logs a warning that it's
deprecated.

This will help resolve any confusion because ASP.NET 5 is terminology
referring to the project of around a year ago. ASP.NET Core 1.0 is the
new name for the technology, and further enhancements should target .NET
Core 1.0 rather than any old vNext or preview stuff.
2016-10-16 21:22:34 -04:00
wing328
6ac9f0f351 Merge remote-tracking branch 'origin/master' into 2.3.0 2016-10-16 16:04:17 +08:00
cbornet
12a0fd6471 fix issues in spring templates
Wrong indentation and extra lines in api templates
Java8 default methods are used if dateLibrary is java8

Fix #3408
2016-10-14 17:57:20 +02:00
wing328
b3caf1d0c0 Merge remote-tracking branch 'origin/master' into 2.3.0 2016-10-12 17:54:16 +08:00
Nick Maynard
823ce72e2e jaxrs-cxf-cdi POM template (#3958)
* Don't refer to missing class in Impl classes

* Add POM for jaxrs-cxf-cdi

* Correct jaxrs-cxf-cdi artifactId

* Update samples for jaxrs-cxf-cdi

* Regenerate jaxrs-cxf-cdi samples
2016-10-12 15:43:44 +08:00
wing328
a73ad79b9b Merge remote-tracking branch 'origin/master' into 2.3.0 2016-10-11 11:52:26 +08:00
wing328
d921a2b0c5 Merge branch 'resteasy_dates' of https://github.com/cbornet/swagger-codegen into cbornet-resteasy_dates 2016-10-11 00:51:34 +08:00
wing328
ba3f2eafd5 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-10-11 00:48:08 +08:00
wing328
671f73b97f Merge branch 'jersey_dates' of https://github.com/cbornet/swagger-codegen into cbornet-jersey_dates 2016-10-11 00:47:02 +08:00
Christophe Bornet
6f2c139ff8 [Spring] Format datetime in rfc3339 (#3777)
* [spring-boot] format datetime in rfc3339

See #3727

* [spring-mvc] format datetime in rfc3339
2016-10-11 00:43:28 +08:00
Nick Maynard
dc2b8c29e2 Add a new JAX-RS server generator - jaxrs-cxf-cdi (#3940)
* Generate a JAX-RS server that assumes an Apache CXF framework on a Java EE server supporting CDI

* Samples for jaxrs-cxf-cdi

* Don't refer to missing class NotFoundException

* Update samples without missing NotFoundException reference
2016-10-10 17:18:27 +08:00
wing328
0712ebc33d Merge pull request #3954 from jimschubert/aspnet/3680
[aspnet] Fix .sln/.xproj guids
2016-10-10 09:17:49 +08:00
Jim Schubert
a94a27307d [aspnet] Fix .sln/.xproj guids
The AspNet5 generator was originally written to support project.json.
The Project.xproj was implemented without a valid project guid or root
namespace. During the transition period from project.json to
Project.xproj, VS2015 would fallback to project.json. Newer versions of
VS2015 don't seem to do this any longer.

This commit defines the project's guid correctly, and sets the project's
root namespace.

See: #3680
2016-10-09 08:31:35 -04:00
wing328
c1a6bbb86a [Python][Flask] fix python2 support in Flask (#3952)
* flask python2 petstore sample

* fix python2 support in flask
2016-10-09 14:06:55 +08:00
Jonathan Leitschuh
40610373f6 Update JavaJaxRS/resteasy/api.mustache to have swagger annotations (#3924)
* Update JavaJaxRS/resteasy/api.mustache to have swagger annotations

The annotations should now appear on generated resteasy API classes.

* Re-generate resteasy petstore sample

* Add swagger-annotations to rest-easy samples as a dependency

* Regenerat pom.xml and build.gradle files for resteasy
2016-10-06 13:18:50 +08:00
wing328
677f5f913f Merge pull request #3909 from apanzerj/apanzerj/fixupRails5Server
WIP: Fixup rails5 server
2016-10-05 01:16:47 +08:00
Adam Panzer
2aadbee8ed
validate(s)_presence_of
Migration should create pluralized table names
Change controller filenames
2016-10-03 14:47:01 -07:00
wing328
1840956320 Merge pull request #3913 from wing328/python_flask_no_tags
[Python][Flask] fix python flask controller issue without tag
2016-10-03 09:56:49 +08:00
wing328
4a74e788ec fix python flask controller without tag (default_controller) 2016-10-03 09:32:20 +08:00
Jim Schubert
b7708a44bf [aspnet5] Fix basePath application to operations (#3911)
* [aspnet5] Fix basePath application to operations

* [aspnet5] Regenerate sample
2016-10-02 21:56:19 +08:00
wing328
ec25bd793f [Java] Remove duplicated model description in Spring, JAX-RS models (#3887)
* fix duplicated description in spring model

* fix duplicated description in jaxrs models

* fix resteasy dependency
2016-09-28 19:34:38 +08:00
wing328
fa12cd3787 Replace ^M with new line (\r) in mustache template (#3865)
* 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
2016-09-26 16:49:44 +08:00
Yuta HIGUCHI
2155b7b09e [JaxRS]Show correct default value on CLI option description (#3862)
* Show correct default value on CLI option description

Fixes #3861

* Changes after ./bin/jaxrs-petstore-server.sh
2016-09-24 15:11:15 +08:00
wing328
f69d1500c3 [Python][Flask] use tags to organize Python Flask controllers (#3767)
* use tag to organize flask controller

* fix typo in python flask code gen

* fix operationId for flask generator
2016-09-20 21:11:06 +08:00
Steve Hu
d74a1fbed4 Add a new language generator for undertow-server framework (#3820)
* add undertow generator

* add apiException

* add undertow server code gen

* reovery sprintboot sample

* update handler

* output swagger.json and handler template change

* remove api template

* remove api.mustache

* update pom.xml

* update readme

* add config files

* add basePath to the handler and upgrade to 0.1.1 framework

* add additional files for release

* fixed the mvn verify issue

* update one template to fix compile error for fake petstore
2016-09-19 22:45:10 +08:00
cbornet
b7f2b28534 [resteasy] configure jackson to use rfc3339 dates 2016-09-14 17:37:04 +02:00
cbornet
1b1fe95855 [jersey] configure jackson to use rfc3339 dates 2016-09-14 12:17:33 +02:00
wing328
ac69f45ddc better format of model properties 2016-09-11 18:44:36 +08:00
Paŭlo Ebermann
bd3a15e273 Feature/#3738 extract abstract scala codegen (#3755)
* Issue #3738: extract AbstractScalaCodegen.

This seems to not change anything in the output, at least for the Petstore samples.

* Issue #3738: move languageSpecificPrimitives initialization to the super class

* Issue #3738 move CliOptions to AbstractScalaCodegen.

* Issue #3738 update samples.

Only one change, remove of unnecessary imports.
2016-09-11 18:00:38 +08:00
wing328
dcdea19cb8 erlang update readme, add petstore samples 2016-09-09 16:42:26 +08:00
Paul Ebermann
65ca059221 Issue #3738: regenerate Scala samples (no code changes). 2016-09-08 13:00:40 +02:00
wing328
4f0f128ddb fix enum value issue for jaxrs cxf 2016-09-08 17:30:20 +08:00
wing328
11ae12b09d [Scalatra] replace {} with : in scalatra path (#3694)
* replace {} with : in scalatra path

* remove unused var in scalatra code gen
2016-09-02 00:25:07 +08:00
Ville Skyttä
77a2973da4 lumen: Update petstore 2016-08-30 08:05:04 +03:00
Ville Skyttä
b4c139f19b Spelling fixes 2016-08-27 02:34:33 +03:00
wing328
4e20bd9bab [Java][Spring][Inflector][Jax-RS] To fix various enum issues (#3615)
* fix spring enum deserialization issue

* fix enum class for spring

* update java inflector to fix enum tostring

* fix jaxrs jersey1 enum toString

* fix jaxrs jersey patch issue
2016-08-20 17:54:45 +08:00
Kevin Chabreck
64e03422c0 [Spring Boot] use port defined in spec file for server.port value (#3605)
* uncommented server.port property in application.mustache template and set it to serverPort value parsed from spec file

* update Petstore sample for Spring MVC and Boot
2016-08-19 17:29:36 +08:00
wing328
24c0038cce [Java][Inflector] Fix enum issue with java inflector (#3606)
* fix enum issue with java inflector

* update pom to test java-inflector
2016-08-18 09:48:50 +08:00
Nekrasov Aleksander
91675c97e2 Fix resteasy offsetdatetime provier (#3332)
* Fix offsetDateTime and remove unnecessary override annotations

* Update petstore samples to CI for resteasy testing

* fix resteasy templates path

* add ability to hide generated annotations

* Update petstore resteasy samples

* Deduplicate artifact names in resteasy projects
2016-08-15 23:46:52 +08:00
wing328
d626200479 fix form enum parameters for spring generator, add more test cases 2016-08-09 19:49:38 +08:00
wing328
87c31188b7 Merge pull request #3550 from jimschubert/aspnet/models-casing
[aspnet] Honor casing of properties from definition
2016-08-09 14:55:03 +08:00
rynger
3faee1f6ce Amending Path annotation (#3553)
* 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.
2016-08-09 12:09:07 +08:00
Jim Schubert
adc445a5ff [aspnet] Honor casing of properties from definition 2016-08-07 09:14:07 -04:00
wing328
47738f6cd6 [Sinatra][Nancyfx] fix enum in Sinatra and nancyfx (#3532)
* fix enum in sintra and nancyfx

* add isContainer check for sinatra allowable value

* fix EOL in nancyfx enum template
2016-08-05 16:30:59 +08:00
wing328
670f103859 better enum naming for symbol (java) 2016-08-04 16:37:48 +08:00
wing328
0547f0d6d8 fix spring enum model 2016-08-03 16:38:02 +08:00
wing328
811b5940eb update jaxrs with better test, fix enum issue, patch operation 2016-08-03 01:36:34 +08:00
abcsun
d7c959fe42 [PHP] add AbstractPhpCodegen to be as the base class of PHP-related generators (#3310)
* add abstractPhpCodegen

* This base class should provide common functions to PHP-related generators so that the same enhancements or bug fixes can be applied to all clients.

Most source be moved from the PhpClientCodegen.

* change Lumen codegen to use the AbstractPhpCodegen

* remove the composerVendorName/composerProjectName. modify the LumenServerOptionsTest for unit test

* add context path

* reserve the apiDocPath and modelDocPath

* add the templateDir for lumen
2016-08-01 15:23:35 +08:00
wing328
3cd37bf5e9 fix casting issue with ModelImpl in Haskell 2016-07-27 18:07:35 +08:00
wing328
81f5108bac [Scala][Scalatra] Include scalatra pestore in the CI tests (#3456)
* add CI coverage for scalatra server

* move scalatra test to the end
2016-07-26 16:04:54 +08:00
Yi
b3403015fd fix scalatra path with basepath (#1425) (#3448) 2016-07-26 14:49:33 +08:00
wing328
30c2503f9f [C#][NancyFX] Better "Add" for Dictionary and using {{packageName}} for NancyFX (#3449)
* use square bucket for C# dictionary

* use packageName for nancyfx generator, update info to debug for log

* use packageName for nancyfx generator, update info to debug for log
2016-07-26 14:10:48 +08:00
guohuang
f6c523bcd6 fixed all routing to v2 (#3428) 2016-07-21 11:44:43 +08:00
abcsun
bee6803bcb add context path (#3425) 2016-07-20 19:06:14 +08:00
wing328
889549a352 fix contextpath for php silex 2016-07-20 16:13:06 +08:00
wing328
9fcb8a310d fix #3418 - slim missing contextpath 2016-07-20 15:49:41 +08:00
wing328
dc8eb8e8ad Merge pull request #3394 from clasnake/3171/scalatra_petstore_error
Fix the scalatra petstore sample compile error.
2016-07-19 13:10:26 +08:00
cbornet
34d3a5e8d0 make jersey tests wait that jetty is closed before terminating 2016-07-18 23:21:12 +02:00
clasnake
5e4e84ffe7 Fix the scalatra petstore sample compile error. 2016-07-18 23:58:03 +08:00
wing328
d621021fb1 Merge branch 'vovan--issue-3193' 2016-07-07 13:51:17 +08:00
wing328
612afe1809 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2016-07-07 11:38:57 +08:00
wing328
2d24e9971c update jaxrs sample 2016-07-07 11:38:07 +08:00
wing328
e1fead8ee5 update spring petstore sample 2016-07-07 11:32:05 +08:00
wing328
9830e82add Merge pull request #3294 from cbornet/spring_cloud
[Spring] Add a generator for spring cloud feign clients
2016-07-07 10:59:56 +08:00
wing328
b997dd15ad Merge pull request #3306 from jimschubert/aspnet5_.NET_Core_1.0
[aspnet5] update to asp.net core 1.0
2016-07-07 10:59:01 +08:00
wing328
1f0f08f886 update jaxrs jersey1 sample 2016-07-07 10:51:42 +08:00
cbornet
57f518fe93 change spring-mvc petstore artifact-id 2016-07-06 11:47:48 +02:00
Jim Schubert
4d5905c736 [aspnet5] Regenerate sample server 2016-07-05 22:22:20 -04:00
wing328
e2e0af1e6c Merge branch 'master' of https://github.com/arturdzm/swagger-codegen into arturdzm-master
Conflicts:
	README.md
2016-07-02 17:00:21 +08:00
wing328
3c9b172996 Merge pull request #3274 from wing328/fix_lumne
Remove security test from petstore-with-fake-endpoints-models-for-testing
2016-07-02 11:48:45 +08:00
wing328
393b44dcd2 remove security test from petstore-with-fake-endpoints-models-for-testing 2016-07-02 11:32:25 +08:00
wing328
691957875e Merge pull request #3185 from cbornet/common_jersey
[Jax-rs][jersey] Mutualize jersey 1 and jersey 2 templates
2016-07-02 11:19:40 +08:00
wing328
386d41db7f fix duplciated artifact id 2016-07-01 21:56:11 +08:00
wing328
c9d2bb8a96 add test for jaxrs resteasy joda 2016-07-01 21:40:34 +08:00
wing328
4a3d9358ee Merge pull request #3165 from abcsun/lumen
[PHP Lumen] sort the endpoints in ascending to avoid the route priority issure
2016-06-30 15:51:32 +08:00
wing328
de6b3cea70 fix slim windows path 2016-06-29 23:24:27 +08:00
wing328
a71c072609 Merge pull request #3224 from wing328/security_fix
[PHP] Better code injection handling for PHP API client
2016-06-28 15:19:41 +08:00
wing328
174222390a Merge pull request #3190 from thebignet/asyncCompletableFuture
using CompletableFuture instead of Callable for asynchronous controller in Spring Boot
2016-06-28 12:34:23 +08:00
wing328
ec2abe78e3 apply security fix to php lumne, silex, slim 2016-06-28 12:21:41 +08:00
Pedro J. Molina
4eb1565fad Update petstore sample for changes on PR #3212 2016-06-27 08:10:01 +02:00
Jean Detoeuf
4183bfc90c updated Java8 spring sample with CompletableFuture feature #3190 2016-06-26 11:25:54 +02:00
wing328
e0d030d33a Merge pull request #3139 from stunney/master
Issue #3138
2016-06-22 10:06:37 +08:00
wing328
c2f5d83d06 Merge branch 'nancyfx-codegen' of https://github.com/FinderSystems/swagger-codegen into FinderSystems-nancyfx-codegen
Conflicts:
	modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenModel.java
2016-06-21 23:47:49 +08:00
cbornet
426cc6b6b4 better enums and dependency update 2016-06-21 16:19:37 +02:00
cbornet
d4150d9a02 remove jersey2 sample as its now the jax-rs default 2016-06-20 23:48:42 +02:00
cbornet
5a489f334e mutualize jersey 1 and 2 server templates 2016-06-20 22:59:32 +02:00
cbornet
1062fa467e fix issues 2016-06-20 15:13:17 +02:00
cbornet
ec6a9257e2 put spring-mvc and spring-boot under the same language gen 2016-06-20 15:12:03 +02:00
cbornet
6c5def6936 fix missing java client library files 2016-06-20 10:32:02 +02:00
Marcin Stefaniuk
0d9a490c17 Petstore sample for NancyFX. 2016-06-20 10:13:25 +02:00
abcsun
3cb178cd14 sort the endpoints in ascending to avoid the route priority issure 2016-06-18 10:16:46 +08:00
wing328
1bdaba5cdc Merge pull request #3127 from abcsun/lumen
[PHP Lumen] 	add parameters validation and the Apache license
2016-06-17 18:58:57 +08:00
abcsun
0effbae24b add lumen api.mustache to generate controller & license update & resource dir restructure 2016-06-17 11:37:10 +08:00
Remi Salembier
2d275b41e0 Java CXF petstore sample update 2016-06-16 17:13:02 +02:00
stunney
cb47bec293 Issue #3138
Continuation from original PR to update the pet store server auto gen
sample code based on previous commit.
2016-06-15 10:04:28 -04:00
wing328
89435850a6 Merge pull request #2979 from guohuang/go_server
issue#2970, [Go] add go server codegen template
2016-06-15 15:18:28 +08:00
wing328
871d5ddc5d Merge pull request #3112 from cbornet/springboot_j8async
Add java8 and async options to Spring-Boot codegen
2016-06-14 01:02:52 +08:00
clasnake
ce456fafdc Add Apache v2 license to auto-generated scalatra files. 2016-06-13 22:55:18 +08:00
abcsun
ee024c40fb add apache license to lumen 2016-06-13 17:37:19 +08:00
abcsun
bffb0fb4d8 sync from origin master 2016-06-13 10:25:03 +08:00
Guo Huang
e39aa3ed3c fix merge conflict 2016-06-12 14:15:55 -07:00
cbornet
c2dbe44d08 add java8 and async options to springboot codegen 2016-06-10 18:21:19 +02:00
wing328
e7160ca78a Merge branch 'rails5-models' of https://github.com/zlx/swagger-codegen into zlx-rails5-models 2016-06-10 21:56:22 +08:00