Commit Graph

7901 Commits

Author SHA1 Message Date
wing328
5282987851 [Python] update python requirement.txt and use single quote for safe characters (#4702)
* update python requirement

* update petstore sample
2017-02-03 21:35:40 +08:00
Jon Hartlaub
c366f139e2 ISSUE#4391 - https://github.com/swagger-api/swagger-codegen/issues/4391 (#4392)
This change removes '/' from the set of "safe" characters for the python urllib quote function.

When using PathParams containing a '/' character, the Python client does not encode the '/'. As a result, the / is interpreted as a path separator rather than a parameter value. PathSegments must encode the / character for proper transfer of information. e.g. 'my/string' should be encoded to 'my%2Fstring' for correct transmission of a PathParam argument. Path separators must only be used between path segments.
2017-02-03 19:24:15 +08:00
wing328
695417699c Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-02-03 18:59:25 +08:00
wing328
4c6aa929fe Merge branch 'toomuchpete-php-client-invokerpkg-fix' 2017-02-03 18:59:03 +08:00
wing328
db2d9df5ea Merge branch 'php-client-invokerpkg-fix' of https://github.com/toomuchpete/swagger-codegen into toomuchpete-php-client-invokerpkg-fix 2017-02-03 18:44:05 +08:00
David Biesack
d1766e3fdf Fix Issue #4611 by using {{unescapedDescription}} (#4641)
* Use {{unescapedDescription}} in html, html2

This addresses https://github.com/swagger-api/swagger-codegen/issues/4611
Replace {{description}} with {{unescapedDescription}}

This is an improvement but because of issue #1203 and/or #3436 (fix not
yet impleented), Markdown is not being processed and converted to HTML.

* Add generated petstore samples index.html

* Copy unescapedDescription
2017-02-03 17:46:11 +08:00
Jim Schubert
9032b8c1f8 [aspnetcore] resolve source/packageName issues (#4699)
Outputs warnings about ASP.NET Core's src/ requirement, and adjusts
sourceFolder if the input doesn't start with src/.

As a consequence of this change, apiFileFolder and modelFileFolder may
possibly return different values if users are setting both sourceFolder
and packageName. This could be considered a breaking change in those
sceanrios.
2017-02-03 16:25:56 +08:00
wing328
a128c075ac Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-02-02 23:30:06 +08:00
wing328
f4fee61e83 update go petstore sample 2017-02-02 23:29:41 +08:00
Adnan Baruni
4b2c4f051b Issue 3914 (#4678)
* issue 3914, removed logic that remove header parameters. update template files to handle header parameters in the same manner as other parameters

* update swift and swift3 samples
2017-02-02 23:17:48 +08:00
Valentin Valchev
cd34885b02 Fixed issue #4664: [go] incorrect code generated, if there are more than 1 array parameters (#4683) 2017-02-02 00:20:12 +08:00
Valentin Valchev
96ed41a29c Fixed issue #4665 [go] required object parameters are marked omitempty. (#4682)
* Fixed issue #4665 [go] required object parameters are marked omitempty.

* Run ./bin/go-petstore.sh as suggested by @wing328.
Please note, that there are quite few changes, that doesn’t come from the diff I’ve applied. Seems the script wasn’t run on the previous commit.
2017-02-01 23:56:22 +08:00
Sreenidhi Sreesha
f62a7e2144 Copy dataformat if property field is an array. (#4661)
If a type's field is an array or map, dataFormat of the innerProperty was not copied
into encapsulating property. This change fixes it.
2017-02-01 23:45:21 +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
ee857d1be3 escape unsafe characters/quotes in elixir generator (#4676) 2017-01-30 21:24:21 +08:00
wing328
2cffa097f0 add elixir to api client list 2017-01-30 17:42:57 +08:00
wing328
ca1ef4914c add elixir template owner 2017-01-30 17:42:00 +08:00
niku
f77bee8b8a [WIP] Add elixir client (#4675)
* Add elixir client

* Add test for elixir client

* Add shell script for generating sample codes for elixir client

It just copied from bin/bash-petstore.sh

* Make elixir-petstore.sh to generate sample codes for elixir client

* Add sample codes for elixir client
2017-01-30 17:40:55 +08:00
megaboich
d82c2bbae7 Fix Typescript errors with 'strictNullChecks' mode enabled (#4658)
error TS2454: Variable 'contentTypeHeader' is used before being assigned.
error TS2345: Argument of type 'FetchAPI | undefined' is not assignable to parameter of type 'FetchAPI'.
2017-01-29 23:22:48 +08:00
wing328
1d7ba4cacc add core team for scala finch 2017-01-29 12:20:59 +08:00
wing328
7be4dc67f6 add finch 2017-01-29 12:18:49 +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
Vlad Frolov
6890ef9755 [JavaScript] Fixed handling of empty arrays/empty strings/booleans/single numbers as valid API responses (#4653) (#4666) 2017-01-28 16:08:04 +08:00
wing328
7e1e9743da add https://kurio.co.id 2017-01-28 15:52:32 +08:00
Frode Danielsen
3236ade09d [Python] Improve model equality implementation (#4663)
* [Python] Improve model equality implementation

The model equality implementation template blindly tried accessing the
`__dict__` attribute of the variable to compare equality against. This
attribute does not exist for a lot of Python built-in types (`None`,
`str` etc.) and the equality check would simply crash.

This adds a simple guard to only continue with equality check if the
variable to compare is an instance of the model being compared against.

* Remove wrong auto-update of Python requirements
2017-01-28 00:42:53 +08: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
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
Ainun Nazieb
05eea2436c [PHP] Validate parent's model first, if any (#4659)
* if model has parent, valid() & listInvalidProperties() will check the parents' first

* Run the ./bin/security/php-petstore.sh
2017-01-26 22:49:38 +08:00
wing328
c0fb30d491 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-01-26 17:14:23 +08:00
wing328
e0adb97850 Merge branch 'karnik-master' 2017-01-26 17:13:57 +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
Amin Shah Gilani
347d477166 Fixes #4655 (#4656) 2017-01-26 12:03:16 +08:00
wing328
f19cb9c48e add kubernetes 2017-01-26 01:59:59 +08:00
jaz-ah
f592fdb23e [Swift] two fixes to latest param mapping code (#4587)
* two fixes: 1) extra ?'s at end of some url's 2) enums not being called out w/ rawValue to get the proper string name

* update samples

* one step closer

* closer implementation
2017-01-26 01:17:58 +08:00
wing328
2b030a768d add https://mailmojo.no/ 2017-01-26 00:41:36 +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
wing328
6e2ee4be06 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-01-25 16:31:03 +08:00
wing328
9a79f13a6e new batch file to exec all JS petstore batch files 2017-01-25 16:30:33 +08:00
wing328
f584f94425 Merge branch 'davidteixeira-master' 2017-01-25 16:24:13 +08:00
wing328
3be04e8a18 update JS petstore client 2017-01-25 16:08:22 +08:00
wing328
d239a4c06e Merge branch 'master' of https://github.com/davidteixeira/swagger-codegen into davidteixeira-master 2017-01-25 13:35:48 +08:00
wing328
128872564c Merge branch 'master' of https://github.com/johnluan/swagger-codegen 2017-01-25 13:01:58 +08:00
Jonathan Leitschuh
efd0732a3e Fix the rm to remove the correct file in two spring generation bash scripts (#4630)
Related #4439
2017-01-25 12:54:07 +08:00
Tony Tam
3476e83a36 fix for allowable values, #4645 (#4646)
* fix for allowable values, #4645

* fixed string values

* rebuilt for #4645
2017-01-25 12:11:49 +08:00
Scott Williams
6e846e7463 Issue 4637 Fix for ci build (#4643) 2017-01-25 12:09:33 +08:00
David Teixeira
6d5da3f2ef Added single quotes -- fixes bug where generated client throws an 'Uncaught Reference Error'. 2017-01-24 17:24:35 +00:00
Pete Holiday
02dcd0eaf7 Update petstore samples; these appear to have been added by #4616 2017-01-23 15:14:18 -05:00
Pete Holiday
b5de3a446f Prefix apiPackage and modelPackage with invokerPackage.
Fix #4538: Ensure that generated API and Model classes are available to the
autoloader. Change generator behavior to match documentation for
invokerPackage, which reads "The main namespace to use for all classes."
2017-01-23 15:09:50 -05:00