Commit Graph

10944 Commits

Author SHA1 Message Date
Akihito Nakano
6d6ef0f120 [PHP] Refactor php client generator (#504)
* Extends AbstractPhpCodegen instead of DefaultCodegen

* Remove fully duplicated methods with AbstractPhpCodegen

* Remove duplicated properties with AbstractPhpCodegen

* Remove duplicated codes in constructor with AbstractPhpCodegen

* Add typeMapping "date". Moved from PhpClientCodegen

refs: 3c34c0b377 (diff-f1801ef05a7926bf394c90f44ae4ab3dL132)

* Remove duplicated codes in processOpts()

* Remove unnecessary 'implements'

* Remove unnecessary method override

* Use setter

* Merge getTypeDeclaration() into AbstractPhpCodegen

* Merge processOpts() into AbstractPhpCodegen

refs:
* 296e6d3db4 (diff-f1801ef05a7926bf394c90f44ae4ab3dL139)
* 296e6d3db4 (diff-f1801ef05a7926bf394c90f44ae4ab3dL147)
* 296e6d3db4 (diff-f1801ef05a7926bf394c90f44ae4ab3dL153)

* tweak

* Optimize IF statement

* Remove duplicated methods

* Merge setParameterExampleValue() into AbstractPhpCodegen

* Merge toEnumVarName() into AbstractPhpCodegen

* Merge toEnumName() into AbstractPhpCodegen

* Merge escapeUnsafeCharacters() into AbstractPhpCodegen

* Merge postProcessOperationsWithModels() into AbstractPhpCodegen

* tweak

* Recover missing method

refs: 2ad0f6f7d4 (diff-f1801ef05a7926bf394c90f44ae4ab3dL91)

* Tweak test case

refs: 4e7b7afc1a

* Remove unnecessary 'import'

* Update lumen and ze-ph samples

- ./bin/php-lumen-petstore-server.sh > /dev/null 2>&1
- ./bin/php-ze-ph-petstore-server.sh > /dev/null 2>&1

* Update slim samples

* Fix script name

* Update silex samples

* Update kotlin-server
2018-07-17 09:27:02 +08:00
Akihito Nakano
afb238814d [Ruby] Abstract Ruby Codegen (#562)
* Add AbstractRubyCodegen

* Refactor constructor

* Move escapeReservedWord() to AbstractRubyCodegen

* Move getTypeDeclaration() to AbstractRubyCodegen

* Move toDefaultValue() to AbstractRubyCodegen

* Move toVarName() to AbstractRubyCodegen

* Move toParamName() to AbstractRubyCodegen

* Move toOperationId() to AbstractRubyCodegen

* Move escapeQuotationMark() to AbstractRubyCodegen

* Move escapeUnsafeCharacters() to AbstractRubyCodegen

* Use super.escapeReservedWord()

* RubyClientCodegen extends AbstractRubyCodegen

* Add the differences with AbstractRubyCodegen to "reservedWords"

* cliOptions.clear() is not a language specific matter

- Rails, Sinatra requires cliOptions.clear()
- Ruby client doesn't requires that

* Remove duplicated statements with AbstractRubyCodegen

* Remove duplicated methods with AbstractRubyCodegen

* Merge toVarName() into AbstractRubyCodegen

* Merge getTypeDeclaration() into AbstractRubyCodegen

* Merge toDefaultValue() into AbstractRubyCodegen

* Update Ruby related samples

- bin/ruby-client-petstore.sh
- bin/ruby-on-rails-server-petstore.sh
- bin/ruby-sinatra-server-petstore.sh

* Remove unnecessary 'import'

* Avoid unnecessary HTML escaping
2018-07-17 09:08:42 +08:00
Akihito Nakano
a055dc0351 Add ybelenko to PHP technical committee (#575) 2018-07-16 22:13:08 +08:00
Matthieu Berthomé
84ef98f067 [Python][Client] pure library client package (#470)
* Python client pure library package

* check onlyPackage CLI option

* run /bin/python-petstore.sh, update the python samples for CI

* onlyPackage local variable instead of classp property

* fix CI: __future__ absolute_import must be first in file

* update samples

* generateSourceCodeOnly

* updated samples
2018-07-16 15:49:08 +08:00
Yuriy Belenko
925ae68167 [Slim] Generation of UnitTest stubs (#566)
* [Slim] Add PHPUnit4 to Composer

* [Slim] Configure PHPUnit

* [Slim] Add Model and Api test templates

* [Slim] Refresh Slim samples
2018-07-16 14:25:48 +09:00
William Cheng
d863c3e5f4
Add travis.yml to test java6 option (#568)
Add travis.yml to test java6 option, update Java (Jersey2) dependencies
2018-07-15 16:00:07 +08:00
Jérémie Bresson
5a0a8f6a87 Java6 support: fix pom and gradle files, avoid diamond notation (#560) 2018-07-14 21:13:23 +08:00
William Cheng
df815344d1
fix NPE in body parameter due to incorrect parameter/consume (#563) 2018-07-14 20:19:10 +08:00
Daniel Miller
a6e15d7569 Fix handling of UUID types (#554) 2018-07-14 16:42:24 +08:00
Jean-François Côté
791f836e3d This fix the problem of having UNKNOWN_BASE_TYPE and "Object" type (#383) 2018-07-14 01:30:07 +08:00
jason-cohen
cd854b2130 Add check for list size before attempting to set last element field value. (#557) 2018-07-13 23:42:14 +08:00
Akihito Nakano
26e70fe642 [Ruby] Rename files/folders (#534)
* Rename templateDir: rails5 -> ruby-on-rails-server

* Rename script: rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh

* Rename sample folder: rails5 -> ruby-on-rails

* Rename script(openapi3): rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh

* Update ruby-on-rails-server-petstore.sh

* Rename templateDir: sinatra -> ruby-sinatra-server

* Rename script: sinatra-petstore-server.sh -> ruby-sinatra-server-petstore.sh

* Rename sample folder: sinatra -> ruby-sinatra

* Update script

* Rename templateDir: ruby -> ruby-client

* Rename script: ruby-petstore.sh -> ruby-client-petstore.sh

* Update scripts

* Update samples

- bin/ruby-sinatra-server-petstore.sh
- bin/ruby-on-rails-server-petstore.sh
- bin/ruby-client-petstore.sh
- bin/security/ruby-client-petstore.sh
2018-07-13 22:28:17 +08:00
Benjamin Gill
6c14b4271f Handle headers correctly (#549)
We were previously relying on some incorrect behaviour of the old
swagger-codegen mustache engine.
2018-07-13 01:55:56 +08:00
John Wang
19fd48e33b [Golang][client] fix formData file parameter name use (#506)
* support form-data file MIME `name` parameter

* update test spec and Go client for form-data file name

* update samples for ensure-up-to-date

* update mustache template

* update samples for Go client

* improve assignment location

* update samples
2018-07-13 00:53:38 +08:00
John Wang
93832340a5 add RFC-3339 formatting to parameterToString (#502) 2018-07-13 00:50:21 +08:00
Tomasz Prus
a0936bec02 feat: use local_var_params to avoid collision with api parameters (#521) 2018-07-12 21:30:57 +08:00
William Cheng
a18a50b7a4 Add an entry to clarify the Q&A page (#544) 2018-07-12 15:30:45 +02:00
William Cheng
d17bdd2658
Improve CircleCI caching (#539)
* show ivy2 cache

* fix typo

* list dir before saving cache

* list dir before saving cache

* cache .git

* replace tab with space

* remove ls

* restore tests
2018-07-12 13:16:33 +08:00
Jérémie Bresson
84129a7da1
Remove secondary dependencies (#529) 2018-07-11 12:14:46 +02:00
William Cheng
0d952b79db
Improve logging in Python client (#480)
* improve logging in python client

* update samples
2018-07-10 22:12:09 +08:00
Dennis Kieselhorst
0a2131d2d3 update CXF and Jackson to latest version (#496) 2018-07-10 18:23:18 +08:00
John Wang
86a0445984 Add default http scheme for server URL, Fix #181 (#498) 2018-07-09 10:45:28 +08:00
Akihito Nakano
837b10aab5 Fix script names (#508) 2018-07-08 23:05:27 +08:00
John Wang
9103ddb7fa add graceful error for io.airlift.airline.ParseArgumentsUnexpectedException (#494) 2018-07-08 23:00:22 +08:00
Tomasz Prus
96e86ac03e update and fix python samples (#489)
* fix: update petstore samples for python, fix broken tests

* chore: entries for python-asyncio/tornado in gitignore
2018-07-08 15:29:55 +08:00
William Cheng
950c584485
[WIP] Add release checkout script (#485)
* add release checkout script

* add check for docker images
2018-07-08 13:07:26 +08:00
sunn
6d05ea5716 Allow generated code to do cleanup of object by preventing premature loop exit (#270) 2018-07-08 12:55:27 +08:00
Jon Schoning
79fafda012 [haskell-http-client] regen samples (#492) 2018-07-08 12:46:35 +08:00
John Wang
a14e757059 fix cache-expires-ineffassign (#466) 2018-07-08 12:38:04 +08:00
John Wang
b380e8f2a9 [CLI] Add --generator-name / -g to config-help (#491) 2018-07-07 07:48:47 +02:00
Jérémie Bresson
0d959a254c
Update README.md (#493)
Mention branch 3.2.x and version 3.2.0
2018-07-07 07:47:35 +02:00
Johannes Hoppe
4797c7b42c Update README.md (#488) 2018-07-07 06:06:30 +02:00
Jérémie Bresson
4b6fb504a2
Prepare version 3.1.1-SNAPSHOT (#487) 2018-07-07 06:05:19 +02:00
William Cheng
100ec449fe
3.1.0 release (#486)
* 3.1.0 release

* Comment ./bin/utils/ensure-up-to-date
2018-07-06 23:37:48 +08:00
William Cheng
790f3d46aa
Fix broken link to openapi generator plugin README (#484) 2018-07-06 19:11:34 +08:00
William Cheng
7404ecb11e
show warning message for nodejs server only (#481) 2018-07-06 17:29:49 +08:00
William Cheng
a714bf4720
Add grokify to Go technical committee (#479) 2018-07-06 14:38:02 +08:00
Yuriy Belenko
9eeedede49 [Slim] Improve codebase decouple (#438)
* [Slim] Decouple Api files into separated PHP Classes

This enhancement required for modular testing and code coverage generating.

* [Slim] Define all app routes in SlimRouter PHP Class. Generate new samples
2018-07-06 14:37:14 +08:00
Esteban Marin
3408866b79 Ensure typescript samples are up to date (#444)
See #80
2018-07-06 07:56:51 +02:00
William Cheng
804094bf51
Update README.md 2018-07-06 13:45:34 +08:00
John Wang
869b17fe29 [Golang][client] delete sample output dir before rebuild (#477)
* delete Go client sample output dir before rebuild

* purge go-petstore-withXml samples output dir before build

* update samples

* fix go-petstore-withxml.sh echo path
2018-07-06 12:20:13 +08:00
William Cheng
867aaa4c27
update petstore samples (#478) 2018-07-06 12:08:20 +08:00
Jeremie Bresson
d43801a9b7 Revert "Improve Docker Tags (#390)"
This reverts commits:

* 036570d93d.
* edf24d859c.
2018-07-06 05:28:10 +02:00
John Wang
7eb2acaf71 update go client test dependencies (#468) 2018-07-05 20:34:32 +08:00
John Wang
0bffdf2463 [Golang][client] fix for schema definition name file (#433)
* fix schema/definition name as 'file'

* update samples

* Trigger CI due to previous Shippable race condition

* add fix with toModelName(openAPIType)

* update tests for file schema/definition name

* Update 3.0 test spec

* update samples

* update samples for jaxrs-cxf

* Trigger CI due to previous Shippable race condition

* add back explode
2018-07-05 20:32:24 +08:00
Jeremie Bresson
036570d93d Fix '.travis' file (syntax) 2018-07-05 12:03:47 +02:00
John Wang
60da6fb2e1 make LICENSE GitHub display compatible (#467) 2018-07-05 10:08:52 +02:00
Jérémie Bresson
edf24d859c Improve Docker Tags (#390) 2018-07-05 14:40:06 +08:00
John Wang
33fcd28dba [Golang][client] fix file suffix for _test.go (#449)
* add file suffix fix for _test.go

* Trigger CI due to previous Shippable race condition

* Trigger CI due to previous Shippable race condition

* Trigger CI due to previous Travis CI stall

* Trigger CI due to previous Travis CI stall

* Trigger CI due to previous Shippable race condition

* add Go client test testFilenames
2018-07-05 14:02:10 +08:00
Jérémie Bresson
8fb413107c Remove copy section (#463) 2018-07-05 13:33:08 +08:00