Commit Graph

11656 Commits

Author SHA1 Message Date
William Cheng
1a2deb016b
Fix security issue with dependencies (#1820)
* fix security issue with dependency

* update samples

* update pom and sample
2019-01-05 23:30:59 +08:00
William Cheng
b25eeebf03
Update Elixir technical committee 2019-01-05 19:18:49 +08:00
William Cheng
8f561f1ef3
[C#][Refactor] Fix nullable required property in the constructor (#1819)
* add serialization test, fix nulllable reuqired

* remove vs folder
2019-01-05 18:54:29 +08:00
Marco
b931da2909 [java][webclient] Register Jackson modules on ObjectMapper (#911)
* [java][webclient] register jackson modules on object mapper

* Regenerate client

* Removed findAndRegisterModules() call

* ObjectMapper is initialized only if NOT provided by client

* Remove (now) useless DateFormat inside buildWebClient signature and regenerate client
2019-01-05 18:29:49 +08:00
Yuriy Belenko
fa9bd1f567 [Slim] Add ApiKey and OAuth authentication middleware (#1207)
* [Slim] Add fork of token middleware

This commit will be dropped, when official repo approves submitted PRs.
Right now it's for test purposes only.

* [Slim] Adds token middleware to template

* [Slim] Move auth implementation to external classes

* [Slim] Update readme

* [Slim] Add config example

* [Slim] Remove deprecated package

Considered to use dyorg/slim-token-authentication for all authentication
schemes. User needs to decode and parse Basic token himself, but it's
pretty simple task and there are many code examples in
the web. Most of time solution is two lines of code.

* [Slim] Format phpdoc comments

I've changed PHP version to 7 and updated comments to follow  main
recommendations. Used PHPCodesniffer rules are Generic.Commenting,
Squiz.Commenting, PEAR.Commenting. Of course I applied only reasonable
sniffs from this standards.

@category tag has been deleted as deprecated accordingly to
phpDocumentor offical docs.

Ref: http://docs.phpdoc.org/references/phpdoc/tags/category.html

* [Slim] Refresh samples
2019-01-05 11:32:23 +09:00
William Cheng
d35f4b08d9
Fix various typos in the templates (Ruby, C#) (#1803)
* Fix typos

* update petstore samples
2019-01-05 09:39:10 +08:00
Erik Timmers
be262384cd Change renamed user @trenneman to @eriktim (#1809) 2019-01-04 11:49:50 +08:00
William Cheng
5729ce176c
Add GenFlow to the company/project list (#1806) 2019-01-04 00:39:41 +08:00
William Cheng
3d59d8b58f
Add GenFlow to the company/project list 2019-01-03 22:31:10 +08:00
Tomer Cohen
59db7cc568 remove unnecessary words from migration-from-swagger-codegen.md (#1791)
Removed 'an existing '.
2019-01-03 18:53:58 +08:00
William Cheng
ad5184efc1
Add process utils class to add index to properties (#1796)
* add process utils to add index to properties

* fix javadoc warning
2019-01-03 16:06:22 +08:00
William Cheng
92db181d97
Fix Shippable CI (#1799)
* comment out apt-get update

* test php slim in travis

* comment out php verison check
2019-01-03 16:04:35 +08:00
Jim Schubert
8fd474d4a7 [gradle-plugin] Fix test, ensure tests run in CI (#1789)
* Update GenerateTaskDslTest to remove "Pets" array model which is no longer generated
* Ensure check on uploadArchives task
2019-01-02 17:15:01 +08:00
Akihito Nakano
af6757ccde Refactor InlineModelResolver (#1788)
* Extract a method "flattenPaths" to reduce the scope of method

* Tweak

* Rename parameter name

* Extract a method "flattenModels" to reduce the scope of method

* Rename parameter name

* Rename: models -> components

* Delete comment

* Extract a method "flattenRequestBody" to reduce the scope of method

* Extract a method "flattenParameters" to reduce the scope of method

* Extract a method "flattenResponses" to reduce the scope of method

* Tweak types

* Reduce indentation
2019-01-02 17:14:34 +08:00
Akihito Nakano
9334dd391a
Improve test codes of InlineModelResolver (#1787)
* Delete unnecessary "throws"

* Delete unnecessary cast expressions

* Tweak redundant assertions

* Delete unnecessary comment
2019-01-01 13:14:23 +09:00
Akihito Nakano
d6fa9e60c6
Add test case for InlineModelResolver: arbitrary models (#1786)
* Add test case : arbitraryObjectModelInline

* Delete legacy test case : testArbitraryObjectModelInline

* Add test case : arbitraryObjectModelWithArrayInlineWithoutTitle

* Delete legacy test case : testArbitraryObjectModelWithArrayInlineWithoutTitle

* Add test case : arbitraryObjectModelWithArrayInlineWithTitle

* Delete legacy test case :
testArbitraryObjectModelWithArrayInlineWithTitle

* Add test case : emptyExampleOnStringTypeModels

* Delete legacy test case : testEmptyExampleOnStrinngTypeModels
2019-01-01 11:51:20 +09:00
Akihito Nakano
6abb9ddf30
Add test case for InlineModelResolver: arbitrary response (#1785)
* Add test case : arbitraryObjectResponse

* Delete legacy test case : testArbitraryObjectResponse

* Add test case : arbitraryObjectResponseArray

* Delete legacy test case : testArbitraryObjectResponseArray

* Add test case : arbitraryObjectResponseArrayInline

* Delete legacy test case : testArbitraryObjectResponseArrayInline

* Add test case : arbitraryObjectResponseWithAdditionalProperty

* Delete legacy test case : testArbitraryObjectResponseMapInline
2019-01-01 10:27:52 +09:00
Akihito Nakano
e559474880
Add test case for InlineModelResolver: arbitrary request body (#1784)
* Uncomment a valid test case

* Add test case : inline request body with title

* Delete legacy test case

* Delete unused import

* Delete legacy test case which is already implemented by other test

see InlineModelResolverTest#resolveInlineArrayResponseWithTitle()

* Delete legacy test case which is covered by other test

* Add test case : arbitraryObjectBodyParam

* Delete legacy test case : testArbitraryObjectBodyParam

* Add test case : arbitraryObjectRequestBodyProperty

* Delete legacy test case : testArbitraryObjectBodyParamInline

* Add test case : arbitraryRequestBodyArray

* Delete legacy test case : testArbitraryObjectBodyParamWithArray

* Add test case : arbitraryRequestBodyArrayProperty

* Delete legacy test case
2019-01-01 07:28:29 +09:00
Akihito Nakano
354db2f3e6 Fix: Inline models can't be generated (#1768)
* Add a test case

* Fix that the inline models couldn't be flatten when "components" doesn't exist

* Rename yaml file

* Rename method name
2018-12-31 17:00:28 +08:00
Akihito Nakano
f96e64bd9e Add test case for InlineModelResolver: inline object response with additionalProperties (#1781)
* Add test case : inline object response with additionalProperties

* Delete legacy test case
2018-12-31 14:36:30 +08:00
William Cheng
3ec90a86cb
Add an option to generate the alias (map, array) as model (#1729)
* add option to generate alias as model

* fix issue due to incorrect merge
2018-12-31 11:59:58 +08:00
William Cheng
2f6381cb19
Add nullable support to C# client (refactor) (#1775)
* add nullable support to c# client (refactor)

* clean up methods

* move typemapping to constructor
2018-12-31 10:44:02 +08:00
Akihito Nakano
5730f6224a Delete unused method (#1744)
* Delete unused method

* Delete unused property "typeMapping"

* Delete unused "import" declaration
2018-12-31 10:10:07 +08:00
Christophe Bornet
0fca90133c Use JsonNullable wrapper on nullable/x-nullable fields (#1762)
* Use JsonNullable wrapper on nullable/x-nullable fields

Fix #1250

* update samples
2018-12-31 10:04:26 +08:00
William Cheng
2c051f265c
Add an option to use reflection in equals, hashCode (Java client) (#1767)
* add option to use reflection in equals, hashcode (java)

* add model test template to java client only

* update pestore samples

* update java samples

* update doc

* update usage, remove unused file
2018-12-31 10:03:05 +08:00
Yuriy Belenko
e8ac630ca5 [Slim] Encode path to support non-latin characters (#1687)
* [Slim] Add encodePath method

* [Slim] Add tests for encodePath method

* [Slim] Use unescaped path in router

Both variables basePathWithoutHost and path are already urlEncoded in
codegen itself. Builtin html encoding in mustache is redundant. We can
use these raw codegen values with no fear.

* [Slim] Refresh samples
2018-12-31 10:02:45 +08:00
Erik Timmers
a0e5b74b2b [elm] Add support for sending headers (#1704) 2018-12-31 09:58:45 +08:00
Akihito Nakano
321416e960
Add test case for InlineModelResolver: inline array response (#1778)
* Add test case : inline array response

* Add test case : inline array response with title

* Delete legacy test cases
2018-12-30 17:53:36 +09:00
William Cheng
2e727f6dc7
fix group parameter logic (#1779) 2018-12-30 16:50:21 +08:00
Akihito Nakano
7cee999543
Add test case for InlineModelResolver: inline array request body (#1777)
* Add test case : inline array request body

* Delete legacy test case

* Tweak code format

* Delete unused import
2018-12-30 12:12:50 +09:00
Akihito Nakano
77b5cea518
Add test case for InlineModelResolver: inline array schema (#1772)
* Add test case

* Delete legacy test case

* Add a test case: inline array schema

* Delete legacy test case

* Fix test yaml
2018-12-30 10:32:02 +09:00
Akihito Nakano
6a4f3385d8 Fix type inference error (#1773)
* Fix type inference error

* Update samples

bin/openapi3/kotlin-client-petstore.sh
bin/kotlin-client-petstore.sh

* Update samples
2018-12-29 12:14:34 -05:00
William Cheng
e821a58fd1
skip default value for contaier in spring (#1725) 2018-12-29 18:50:10 +08:00
Yuriy Belenko
5400a7e445 [Slim] Add PHP CodeSniffer config template (#1764)
* [Slim] Add PHP_CodeSniffer config template

* [Slim] Update doc

* [Slim] Add local configs to gitignore

PHPUnit and PHP_CodeSniffer provides the same developing pattern when
user overrides global config with local one. In local config he can
set environment variables. Official doc recommends to not commit local
config files.

* [Slim] Remove phpcsStandard CLI option

Now user have full freedom to override config file. This option is not
used and not necessary anymore.

* [Slim] Refresh samples
2018-12-29 15:58:15 +09:00
William Cheng
1db105b6f9
Use CompareNetObject for object comparison in C# client (refactor) (#1765)
* add pet, array of array test, use CompareNetObject for comparision

* add an option, should trigger ci failure

* update doc

* use useCompareNetObjects in csharp-refactor petstore

* fix project template
2018-12-29 14:45:49 +08:00
Akihito Nakano
06a67ce6e4
Add test case for InlineModelResolver (#1771)
* Add a test case of resolving inline request body

* Delete legacy test case

* Add a test case of resolve inline request body with required

* Delete legacy test case
2018-12-29 14:38:46 +09:00
Christophe Bornet
5952bec6bf Add online gen tests (#1759) 2018-12-28 14:18:43 +08:00
Akihito Nakano
5f2d79b669 Resolve inline models before preprocess (#1761) 2018-12-28 11:13:30 +08:00
William Cheng
177deb918a
better handling of allOf (composition) (#1757) 2018-12-27 16:01:18 +08:00
Akihito Nakano
5d98fc6beb
Fix UUID support (#1746)
* Add custom type adapter to deserialize UUID

* Update samples

./bin/kotlin-client-threetenbp.sh
./bin/kotlin-client-string.sh
./bin/kotlin-client-petstore.sh
2018-12-27 08:59:57 +09:00
Daiki Matsudate
292d987f15 Use appInfo.version for podspec (#1760) 2018-12-27 00:19:29 +08:00
Daiki Matsudate
c2273a651a [Swift 4] Add createURLRequest method (#1727)
* add create URL Request method

* add comment
2018-12-27 00:19:11 +08:00
William Cheng
902a4b4099
remove self-reference import (#1758) 2018-12-26 18:11:26 +08:00
Daiki Matsudate
c13e089c85 [swift4] Use RequestBuilder directly for RxSwift and PromiseKit (#1718)
* remove default implementation

* avoid insert blank lines
2018-12-26 18:01:26 +08:00
William Cheng
c62a1f11ee
maven dep version update (#1754) 2018-12-26 10:53:53 +08:00
Akihito Nakano
aa1cfd81fe Minor fixes for InlineModelResolver (#1756)
* Delete unused methods

* Improve access modifiers declaration

* InlineModelResolver#flatten can be package-private

* Delete unused import declaration

* Sort properties
2018-12-26 10:53:39 +08:00
William Cheng
e4f80dcc0e
various fix for free-form object (#1751) 2018-12-26 10:38:07 +08:00
William Cheng
120c0a05f0
Restore Ruby tests after parser update (#1753)
* uncomment ruby test after parser update

* remove comment
2018-12-26 10:36:58 +08:00
zigen
7595baef00 Fix composed oneof type 1749 (#1750)
* add test to check that DefaultCodegen generates composed oneof schema properly

* fix composed-oneof type generation bug (#1749)
2018-12-24 17:46:42 +08:00
William Cheng
0dee995ebb
Fix discriminator name not following variable naming convention (#1742)
* fix discrimintator name not following variable naming convention

* fix test

* update samples

* use discriminator name directly in php

* single quote array index
2018-12-24 10:17:43 +08:00