Commit Graph

258 Commits

Author SHA1 Message Date
Bruno Coelho
9d53ee4b69 [kotlin][client] make Request date converter toJson as default (#4884)
* Fix for Issue #2205

Because when we have tags on OpenAPI Specification, there can be more than 1 Feign Beans being generated and the title field is share by all the clients. This makes the code to stop working in runtime.
Here is a PR which uses the classVarName instead, which follows the standards and should be enough to solve this issue.

For more info please refer to: https://github.com/OpenAPITools/openapi-generator/issues/2205

* fix java feign parameter request name (#4883)

* update sprign cloud feign sample

* [JAVA][SPRING][2195] added missing getter for enum value (#2346)

* [2195] added missing getter for enum value

* updated samples

* re-generate spring samples

* Removed @JsonValue from toString and regenerated samples

* re-generate spring samples

Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>

* update samples

* [kotlin][client] make Request date converter toJson as default

* [kotlin][client] update windows scripts

* [kotlin][client] update docs

* [kotlin][client] update scripts

* [kotlin][client] update scripts

Co-authored-by: Filipe Manuel Couto Pinheiro <filipemcpinheiro@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Lukáš Vasek <bilaak@gmail.com>
Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
2020-01-02 13:46:49 +08:00
William Cheng
54cfab84b6 run ensure-up-to-date 2019-12-28 01:12:26 +08:00
Yuriy Belenko
ad4b9c711b [MySQL] snake_case table and column names (#4860)
* [MySQL] Add identifierNamingConvention option

Possible values are "original" to not transform original names and
"snake_case".

* [MySQL] Add option tests

* [MySQL] Update doc

* [MySQL] Add original name to comment
2019-12-26 15:05:36 +08:00
Man
c0994c479d #4848 [asciidoc] add option to not generate metadata (#4852)
* #4848 [asciidoc] add option to not generate metadata (asciidoc attributes)

cli / additionalParameters: generateHeaders=true|false

* #4848 [asciidoc] new options ascidoc generator

* #4848 [asciidoc] add option to not generate metadata (asciidoc attributes)

cli / additionalParameters: generateHeaders=true|false
2019-12-22 15:34:29 +08:00
Justin Black
3959530465 [Python] Updates python test framework to pytest (#4765)
* Switches python generators to use pytest, useNose CLI option added if to allow nose to be used instead

* Adds ensure-up-to-date changes

* Adds setup.cfg to python clients so we can configure nose when useNose=true

* Adds fix for python-aiohttp testing, adds files missing from ensure-up-to-date
2019-12-22 14:14:04 +08:00
William Cheng
1084cd38a1 update doc 2019-12-22 13:14:44 +08:00
Bruno Coelho
3eaafce569 [kotlin][client] Use OffsetDateTime to represente date-time received by the server (#4835)
* [kotlin] add OffsetDateTime support

* [kotlin] serializer add missing import

* [kotlin] update pet projects and fix tests

* [kotlin] update docs

* [kotlin] update pet projects

* [kotlin] update date-time

* [kotlin] update pet project

* [kotlin] update windows script
2019-12-20 23:20:02 +08:00
William Cheng
3146e80c61 update doc 2019-12-20 19:00:32 +08:00
Bruno Coelho
56f298a0b4 [kotlin][client] unify jvm libraries (#4827)
* [kotlin] unify jvm envirement

* [kotlin] rename retrofit2 to jvm-retrofit2

* [kotlin] update retrofit2 bat script

* [kotlin] update docs

* [kotlin] update docs

* [kotlin] update pet projects
2019-12-20 18:25:07 +08:00
Bruno Coelho
dc91112031 [swift4] add option to sortParamsByRequiredFlag (#4706)
* [swift4] add option to sortParamsByRequiredFlag

* [swift4] add option to sortParamsByRequiredFlag

* [swift] update docs

* [swift4] add option sortParamsByRequiredFlag to sample
2019-12-20 17:43:56 +08:00
Bruno Coelho
265ad2297b [kotlin] add options sortParamsByRequiredFlag and sortModelPropertiesByRequiredFlag (#4707)
* [kotlin] add option to sortParamsByRequiredFlag

* [kotlin] add option to sortParamsByRequiredFlag

* [kotlin][client] sort parameters in the models

* [kotlin] update docs

* [kotlin][client] simplify sortParamsByRequiredFlag implementation

* [kotlin] experiment with sortnmodel properties by name

* [kotlin] introduce sortModelPropertiesByRequiredFlag

* [kotlin] update docs

* [kotlin] update kotlin

* [kotlin] fix tests

* [kotlin] update docs

* Revert "[kotlin] update docs"

This reverts commit 88ad825de5b4c090fe04398bdfde2e9d3252742f.

* [kotlin] update docs and petstores

* [kotlin] update docs

* [kotlin] update pet projects
2019-12-20 17:42:48 +08:00
William Cheng
87ee6c8bfb update documentation 2019-12-19 21:29:31 +08:00
Jim Schubert
b62d68ac5a [markdown] New Markdown Generator (#4811)
* [markdown] New Generator

* [docs] Update to avoid conflict with new markdown generator
2019-12-19 11:16:20 +08:00
William Cheng
4ee610c857 update doc 2019-12-19 00:19:21 +08:00
amond
c98644a672 [dart][dio] add dateLibrary options ( core, timemachine ) (#4716)
* feat(dart-dio): add datelibrary options

Signed-off-by: Minsu Lee <amond@amond.net>

* fix: missing semicolon

Signed-off-by: Minsu Lee <amond@amond.net>

* enum name

* fix test

* fix test
2019-12-16 17:55:49 +08:00
Javier Luque Sanabria
bb4af91bbd Feature/kotlin/library/retrofit (#4518)
* Some clean code.

* Add support for retrofit2 in models and apis. Need work in ApiClient, but it's not urgent.

* Add ApiClient with retrofit2 support.

* Remove unnecessary package.

* Add scripts to generate samples.

* Generate sample of retrofit2

* Change toUpperCase to toUpperCase(Locale.ROOT) to fix compile.

* Added GSON library when it's needed

* Fix typo.

* Add some missing common files.

* Execute bin script.

* Remove copy&paste error in script.

* [kotlin] update outdated files

* Fix apis with no params.

* Add missing import in ApiClient

* Add support for CSV, SSV, TSV, PIPES, SPACES in retrofit 2 library.

* Fix package name.

* Execute kotlin-client-retrofit2.sh script.

* force rebuild.

* execute script again.

* Add missing imports from okhttp3.
@Deprecated has a message param that java not. Add it with a default message.

* Execute retrofit2 script.

* Rerun script.
2019-12-15 18:26:37 +08:00
William Cheng
ca9313881a update doc 2019-12-10 11:52:11 +08:00
Yuriy Belenko
cd6ec0dcf5 Update PHP coding style link (#4727)
* [PHP] Update PHP coding style link

* [PHP] Update website doc
2019-12-09 11:13:20 +08:00
Thibault Duperron
7eeeab0825 Add space to spring doc (#4674)
* Add space to spring doc

* Remove fsharp change
2019-12-04 09:43:36 +08:00
Oleh Kurpiak
ba3af50384 [#4025] custom java annotations (#4026)
* custom java annotations
2019-12-03 08:09:39 -05:00
Thibault Duperron
2dc0220874 Add mutable model option to kotlin generators (#4115)
* Add mutable model option to kotlin generators

fix #3803

* doc

* Change template name to modelMutable

* Samples
2019-11-27 18:04:43 +08:00
Bruno Coelho
6bf5741fd1 [swift] Introduce result type (#4511)
* [swift] introduce result type as response library

* iOS - run petstore samples

* [swift4] add result sample to testing pipeline

* [swift] update docs with result type

* [swift] update result visibility

* [swift] update docs
2019-11-26 17:01:26 +08:00
Bruno Coelho
d5c7c9c9b7 [swift] add option for non public api (#4556)
* [swift] implement non public api

* [swift] add petstore for non public api

* [swift] fix error in extension that cannot be internal

* [swift] update docs
2019-11-25 17:19:50 +08:00
William Cheng
56c38904fb update doc 2019-11-23 11:14:18 +08:00
Esteban Gehring
87a9fa3808
add typescript-redux-query to ensure-up-to-date script (#4574)
* add typescript-redux-query to ensure-up-to-date script

* Update typescript-redux-query samples

* fixup! Update typescript-redux-query samples
2019-11-22 15:25:17 +01:00
William Cheng
a1fc114efa
[Swift] minor fix to scripts (#4577)
* minor fix to swift4 scripts

* fix script

* update bitrise config

* update doc

* run swift4_test_all.sh directly

* make swift4 script executable
2019-11-22 21:42:32 +08:00
Jim Schubert
c89d21a903 [cli][doc] Document batch command (#4572)
* [cli][batch] Better glob support

If invoked as `openapi-generator batch *.yaml`, the command might
previously fail in some shells where `*.yaml` expands to file name only.

This supports globs without path-part in the filename to prevent
possible NPE.

* [cli] Document batch command
2019-11-22 11:09:08 +08:00
William Cheng
52384badd2
Add an option to prefix Go struct with the classname (#4564)
* add option to prefix struct with classname

* update usage

* fix test

* update doc
2019-11-21 21:31:35 +08:00
Massimo Siani
964260101b [kotlin-spring] add support for the delegate pattern (#3925)
* #2526 support the delegate pattern for kotlin-spring

* fix the diamond

* update the doc

* fix ci

* use Resource? instead of MultipartFile when dealing with files

* bump after rebase on master
2019-11-19 15:22:29 +08:00
djairhogeuens
d9e93ce6ca feature: Typescript-angular support single request param (#4479)
* adds support for useSingleRequestParameter for typescript angular generator

* updates samples

* removes tab

* updates documentation

* removes tabs

* Revert "updates samples"

This reverts commit 8c5bfd94bdbd52187c1f38c43292dbba2cc483ef.

* updates samples

* adds configuration for sample generation

* fixes script

* sets executable flag

* fix docs
2019-11-14 10:51:37 +01:00
Jesse Michael
5b4441892f Add Go Server featureCORS option (#4400)
Add a Go server configuration option of "featureCORS" that defaults to false. When set to true the Go server routers will be generated with Cross-Origin Resource Sharing middleware through gorrilla mux.

https://www.gorillatoolkit.org/pkg/handlers#CORS
2019-11-08 15:35:27 +08:00
William Cheng
b0b0e2b102
add sbt, bazel to integration (#4416) 2019-11-08 10:11:47 +08:00
Valentin
d635ac3973 Feature optional emit default values (#4347)
* This commit addresses issue #4346 and adds the proposed optionalEmitDefaultValues flag.

* ran /bin/cshapr-netcore-petstore.sh to create sample clients

* Fixed lost newline

* Ran script again to update samples
2019-11-06 12:02:59 +08:00
Fjolnir-Dvorak
d624b28c96 [FEATURE][Haskell] Haskell-Servant serves static files (#4058)
* updated the golden files for haskell to be able to generate against those

* Haskell-servant now serves static files which are in a directory called "static"

* I missed to regenerate the docs directory
2019-10-30 20:47:53 -05:00
William Cheng
e37d8bcb2e
Minor improvement to the Java vertx web server generator (#4294)
* minor improvement to the vertx web server gen

* update doc
2019-10-28 17:14:34 +08:00
lwlee2608
0f2272d9a4 Implement Server Stub Code for Vert.x Web #115 (#4286)
* InlineResolver to flatten callback operations

Signed-off-by: lwlee2608 <lwlee2608@gmail.com>

* clone from VertxServerCodegen, to new VertxWebServerCodegen

* fix compilation error in VertxWebCodegn

* Start working on VertxWebServerCodegen, adding support files

* add server api handler

* add server api and fix yaml spec file generation

* link api to apiHandler

* convert vertx parameters into API model

* add support to multipart/form-data upload files

* ability to set http status code from ApiImpl

* replace rootPackage with invokerPackage

* add readme and sample

* fix circleCi error

* override file to FileUpload in typeMapping, no need to override from fromOperation(). Also remove unused annotation import from model

* remove smartBear software copyright

* use {{artifactVersion}} instead of hardcode version in readme

* add -t flag in generation script

* add generated vertx-web server to master pom for testing
2019-10-28 14:08:21 +08:00
Yuriy Belenko
5a7b471511 Mark Slim3 server generator as deprecated (#4256)
* Mark Slim3 server generator as deprecated

* Add deprecated suffix
2019-10-26 15:49:30 +08:00
mrmeku
e85f6c577e typescript-angular: Allow for custom naming of ApiModule (#4209)
In cases where a user wants to generate multiple module's,
it is convenient to have these modules have different names.
2019-10-24 10:13:48 +02:00
William Cheng
2bf708d938
deprecated netstandard, uwp support in csharp (#4214) 2019-10-24 01:10:57 +08:00
Yuriy Belenko
8e78b14e28 New PHP Slim4 Server Generator (#3658)
* [Slim4] Copy Slim3 generator as starting point

* [Slim4] Add psr7Implementation generator option

Slim supports PSR-7 interfaces for its Request and Response objects.
Slim provides its own PSR-7 implementation so that it works out of the
box.
However, you are free to replace Slim’s default PSR-7 objects with
a third-party implementation.
[Ref] https://www.slimframework.com/docs/v4/concepts/value-objects.html

* [Slim4] Handle psr7Implementation generator option

It somehow ended up with composerPackages and composerDevPackages
codegen variables and two additional functions. Hope, it's not too much.

* [Slim4] Extend from Slim3 generator

* [Slim4] Bump PHP Slim Framework version to 4.0.0

* [Slim4] Bump required PHP version to 7.1

[Upgrade Guide](https://www.slimframework.com/docs/v4/start/upgrade.html)

* [Slim4] Remove app settings

Slim’s App settings used to be a part of the container and  they have
now been decoupled from it.

[Upgrade Guide](https://www.slimframework.com/docs/v4/start/upgrade.html)

* [Slim4] Set container argument optional

Slim uses an optional dependency container to prepare, manage,
and inject application dependencies.
Slim supports containers that implement PSR-11
like [PHP-DI](http://php-di.org/doc/frameworks/slim.html).

[Upgrade Guide](https://www.slimframework.com/docs/v4/start/upgrade.html)

* [Slim4] Change response body write

You can't write to response instance directly anymore,
need to retrieve body object first.

[Doc](https://www.slimframework.com/docs/v4/objects/response.html#the-response-body)

* [Slim4] Change Slim\App constructor

[Upgrade Guide](https://www.slimframework.com/docs/v4/start/upgrade.html)

* [Slim4] Refactor token authentication options

User can provide array or Container as constructor argument from now.
Small refactoring required to retrieve authentication options from
that argument.

* [Slim4] Add PSR-7 implementation codegen flags

This approach seems more flexible to me.
User can customize templates in favor of chosen PSR7 implementation.
It's easier to change Composer packages and their versions.

* [Slim4] Add JsonBodyParserMiddleware

Slim4 doesn't parse JSON body, need to add suggested middleware.
Ref: https://www.slimframework.com/docs/v4/objects/request.html#the-request-body

* [Slim4] Remove request's deprecated methods usage

Since Slim 4.0.0 ServerRequest implementation doesn't have
getQueryParam and getParsedBodyParam methods anymore.

* [Slim4] Use getUploadedFiles for multipart request

isMultipart codegen property is always false so far.
Hope that bug will be fixed soon.

* [Slim4] Add samples
2019-10-21 22:20:12 +08:00
Jim Schubert
0e1ce6bb63
[docs] Custom template clarifications and other minor enhancements (#4167)
* [docs] Updating docsite outputs to be browsable on Github as well

* Fix links to other files
   Suffix `.md` was needed to make links works

* [docs] Add clarification to differences between customization and templating docs

* [docs] Collapsible side bar, scroll to top, minor enhancements
2019-10-16 18:04:44 -04:00
William Cheng
672a7e9c60 update samples 2019-10-16 02:52:04 +08:00
Josh Burton
755a6f4445 Adds Dart Dio generator (#4018)
* Adds initial implemenation of dart-dio generator

* Adds remaining boilerplate for dart-dio generator
2019-10-15 21:05:38 +08:00
William Cheng
9c6b94c292 update samples 2019-10-15 02:00:10 +08:00
William Cheng
10e42461f5 revert the fix to broken links 2019-10-12 00:28:57 +08:00
Vitor Rodrigo Vezani
958d7e47a3 Fix links to other files (#4120)
Suffix `.md` was needed to make links works
2019-10-10 21:30:18 +08:00
William Cheng
0d91be3a72 update petstore samples 2019-10-10 10:27:13 +08:00
William Cheng
e9a0a51b50
Fix file type in avro template (#4105)
* fix file type in avro template

* update doc
2019-10-09 20:22:57 +08:00
sdoeringNew
d8c3b4d342 [CSharp] add optional flag "optionalEmitDefaultValues" and update template (#4010)
This commit addresses issue #3274 and adds the proposed optionalEmitDefaultValues flag.
2019-10-09 15:27:57 +08:00
Jan
bbfcd3bf64 [kotlin-client][kotlin-server] Feature/kotlin data class serial version uid (#4021)
* feat: add companion object to data classes if the implement the interface java.io.Serializable

* style: format template file

* style: adapt to project's original code style

* fix: add missing imports

* style: reverted mustache template to original styling

* test: generate additional samples for kotlin-springboot-reactive and kotlin-springboot

* docs: name full qualified classname of interface java.io.Serializable to prevent confusion with kotlinx.serialization
2019-10-09 15:17:53 +08:00