Commit Graph

4746 Commits

Author SHA1 Message Date
wing328
52e42701bd Merge branch 'master' of https://github.com/techlogix/swagger-codegen into techlogix-master 2017-03-21 23:29:08 +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
Yao Yao
d217c5c1fd add json-formatter-js library. (#5125) 2017-03-21 21:44:28 +08:00
Ben Herila
42a7110d90 Fix Bug/4952 by explicitly implementing IValidatableObject (#4954)
* Explicitly implement IValidatableObject interface to avoid conflict with potential ValidationResult classes

* Missed one

* Rebuilt tests
2017-03-21 15:57:56 +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
Paul English
59fe50dd74 Ensure identifiers get sanitized; Ensure model names also have the same formatting (#5098) 2017-03-21 14:35:38 +08:00
Fábio Franco Uechi
7325650f2d solves issue #4752 (#5127) 2017-03-21 14:25:10 +08:00
fumito_ito
c1a9b7313e fix #2159 dataformatter error for iOS Swift (#5008)
* fix #2159 dataformatter error for iOS Swift

When trying to parse 24-hour time to 12-hour time, date formatter throws fatal error.
It's caused by lack of settings locale for date formatter.

* update sample code
2017-03-21 14:22:18 +08:00
eblis
21657f80cf Not using files from template folders with libraries inside them (#4628)
* #4627 - When looking for template files also look in the libraries subfolder of the supplied templateFolder, before checking the embedded locations.

* Reworked the order in which template files are searched for:
 - 1st the code will check if there's a <template folder>/libraries/<library> folder containing the file
 - 2nd it will check for the file in the specified <template folder> folder
 - 3rd it will check if there's an <embedded template>/libraries/<library> folder containing the file
 - 4th and last it will assume the file is in <embedded template> folder.

 Added unit test to test template dir overloading.
2017-03-20 22:12:29 +08:00
Gronsak
580745ef43 [C#] Adding support for generating .NET Standard 1.3 client library (#4955)
* [CsharpNetStandard] Added C# .NET Standard Client Generation

Added language CsharpNetStandard.
Everything copied from csharp Client Generator.
Dependancies switched from Restsharp to Restsharp.Portable.
Changes made where nececary to replicate Restsharp functionallity.
Project type changed to .NET Standard protable library.

* [CsharpNetStandard] Removed client prop validation due to incompability

* [CsharpNetStandard] Minor fixes

Changed leftover RestSharp.Method to Method
Changed to .Net Standard 1.3 for compability reasons
Changed excludeTests to default to true due to tests not being implemented yet

Removed unnecessary targetFramework property
Removed leftover UWP stuff

* [CsharpNetStandard] More fixes

Added correct dependencies to Readme
Added correct supported frameworks to Readme
Added slightly better placeholder for installation instructions in Readme

Removed leftover dependencies from project.json
Removed leftover SupportsAsync stuff
Removed references to build.bat/-.sh since they're not yet being generated

Todo implement test generation

* [CsharpNetStandard] Added forgoten git_push.sh

* [C#-netstandard] Renamed option to csharp-netstandard

Also added .bat file for test generation

* [C# Net Standard] fixed path in .bat file

* [C# NET Standard] fixes to enum generation

Fixed issues with enum generation due to tired programmer

* [C# NET Standard] Generated sample client library

Sample library generated

Fixes:
Class actually works again
.bat - minor inconsistency fixed

* [C# NET Standard] Error corrected in how timeout is set

Configuration Timeout property changed to TimeSpan type and code corrected around that

* [C#] Merged .NET Standard generator into csharp generator

Functionallity of csharp-netstarndard generator has been moved into standard csharp generator under the targetFramework option as "v5.0"
2017-03-20 17:21:44 +08:00
Paŭlo Ebermann
d3f365fd29 Fix (partially) #4898 for elixir (#5021)
* fix (partially) #4898 for Elixir

* Update petstore samples (after fix for elixir for #4898)
2017-03-20 15:24:24 +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
Oliver Teichmann
2d21bfa21c Updated feign library to use latest version of OpenFeign and Jackson. (#5114) 2017-03-19 15:15:06 +08:00
wing328
eee5cc061c fix path with {{{ .. }}} in c# api mustache file (#5112) 2017-03-18 23:02:20 +08:00
jfiala
2048defe7b add jackson dependencies to pom for cxf-client #4924 (#5032) 2017-03-18 22:13:44 +08:00
rcilia
d5cb70f03e Swift3 enum: number variable names fix (#5060)
* Swift3 enum: number variable names fix

Swift3 generator: added 'number' prefix to enum variable names that start with a number

* Fixed Swift3 enum variable names starting with number (prefixed with '_') and added test cases

* Swift3 enum var names: made sure to keep the next word after a number in lower case
2017-03-18 17:29:52 +08:00
Paŭlo Ebermann
1b973d2c43 Update petstore samples for scala client. (#5092)
* Update petstore samples for scala client.

* Fix missing dependency problem.
2017-03-18 16:44:53 +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
98e8e55281 Merge pull request #5065 from ibm-bluemix-mobile-services/issue-4764
[Swift] Fix issue #4764
2017-03-17 21:53:44 +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
Tony Tam
9ddf28ff75 Update wordnik.yaml 2017-03-16 16:04:59 -07:00
Tony Tam
20580f9b1b Update wordnik.yaml 2017-03-16 16:01:34 -07:00
wing328
917306aa10 override escape quotation mark in async scala generator (#5078) 2017-03-16 01:14:43 +08:00
wing328
878b390ab6 Merge pull request #5049 from jostick/fix-scala-listbuffer
Fixes ListBuffer import-mapping for scala clients
2017-03-15 23:33:00 +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
Matt Alleman
b2aa877ce0 Allow for UUID types in akka-scala (#5069)
* allow for UUID types

* update sample libs
2017-03-15 17:02:42 +08:00
Anthony Oliveri
88a755f368 [Swift] Detect file type in Swift codegen 2017-03-14 15:02:34 -05:00
Ben Herila
eea58c55b4 Add support for typescript-jquery (typescript-based API calls using jquery ajax in the browser) (#4953)
* Typescript jquery client wip

* typescript-jquery wip

* Fix typo

* typescript-jquery wip

* Fix formatting

* Petstore sample for typescript-jquery

* Petstore sample for typescript-jquery

* wip
2017-03-15 00:17:04 +08:00
Johannes Stickel
02f2fde65e
Fixes ListBuffer import-mapping for scala 2017-03-13 16:43:47 +01:00
Paŭlo Ebermann
a2d1edc6f5 Fix (partially) #4898 for groovy (#5030)
* Fix (partially) #4898 for groovy.

This also adds some TODOs for the missing path, form and body parameters.

* Update Groovy samples (after partial fix for #4898)
2017-03-13 21:46:28 +08:00
Jeff Haynes
ba380c9dda Issue 4759: Import complex type for body parameters (#4775) 2017-03-13 15:35:21 +08:00
wing328
7733dba002 Merge branch '2-call-visibility' of https://github.com/jdupouy/swagger-codegen into jdupouy-2-call-visibility2 2017-03-13 00:21:22 +08:00
Paŭlo Ebermann
c76f006067 fix (partially) #4898 for dart. (#5019) 2017-03-12 17:08:48 +08: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
Paŭlo Ebermann
16adc7b373 Fix (partially) #4898 for flash (#5022)
* Fix (partially) #4898 for flash.

This fixes path, query and header parameters.

* Update samples for flash (after partial fix for #4898).
2017-03-12 16:53:18 +08:00
ravinikam
c4bd4c9e91 Add missing number type mapping (#5013)
number to float or double type mapping was missing, added number to double to accommodate both.
2017-03-11 23:03:37 +08:00
wing328
3dfa423151 Merge branch 'patch-2' of https://github.com/ravinikam/swagger-codegen into ravinikam-patch-2 2017-03-11 20:36:45 +08:00
wing328
0ce6c7e3a8 do not map UUID as model in java (#5026) 2017-03-11 20:32:46 +08:00
XuXinkun
3c1a8daaf9 fix handleResponse to not leak okhttp connections (#4997) 2017-03-11 17:02:49 +08:00
Tony Tam
0dcd91adbf null out the string null in examples. Rebuilt java clients and made a whole bunch of changes 2017-03-10 11:07:30 -08:00
ravinikam
a29c8c937a Update exception message to use operationId
Update ApiException to use {{operationId}} variable to correct typo
2017-03-10 12:41:15 -06:00
Tony Tam
3ff4c988b8 Merge pull request #4999 from swagger-api/issue-4998
updated parser
2017-03-10 09:46:12 -08:00
Tony Tam
f9835a4b37 matched key to actual value 2017-03-10 09:31:02 -08:00
Tony Tam
db4945fdbf added type check 2017-03-10 09:30:49 -08:00
Julien Dupouy
3da8654336 Change build call visibility 2017-03-10 18:05:27 +01:00
Jean-François Côté
20c8f9a831 Java Play Framework Server Generator (#4943)
* 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
2017-03-10 22:10:49 +08:00
David Biesack
ec3b338988 Improve HTML output for model titles, default responses (#4991)
Render "default" instead of 0 for response code when Swagger uses "default" (#4982)
Add title for models to TOC and each model's section
Render model description only conditionally.
Remove extraneous Up link

Regenerate samples/html/index.html
2017-03-10 21:47:20 +08:00
Bernhard Döbler
bfa8d350b3 JS files were replaced in the lib folder; include new (#4985)
Fix https://github.com/swagger-api/swagger-codegen/issues/4983
2017-03-09 23:18:11 +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
Rohit Sood
11856e9712 Update Spring Fox dependency version to 2.6.1. This fixes a defect where Swagger and Feign clients do not conflict when registration occurs with Eureka. 2017-03-09 09:54:49 -05:00