Commit Graph

290 Commits

Author SHA1 Message Date
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
Bruno Clermont
28e9cf5d3c fix path to input (#4094) 2019-10-09 00:12:15 +08:00
William Cheng
d4500b307f Merge remote-tracking branch 'origin/master' into 4.2.x 2019-10-04 15:02:58 +08:00
Jon Schoning
cc1bfe5fef
[haskell-http-client] add dateTimeParseFormat cli option - overrides the format string used to parse a datetime (#4037)
This allows specifying a different formatString for parsing than for rendering, which is useful because padding widths are not supported in `parseTimeMSource`
2019-10-02 23:30:34 -05:00
William Cheng
7c7fa68737
[F#] minor improvements to the generators (#3968)
* add license, minor code format

* mark fsharp generator as beta

* update doc
2019-10-03 09:24:40 +08:00
Jan
baa53cbf57 [kotlin-client][kotlin-server] feature: allow creation of kotlin data classes that implement java.io.Serializable (#3997)
* feat: allow creation of kotlin data classes that implement java.io.Serializable, by adding the config option serializableModel=(true|false)

* docs: add markdown docu for new configOption serializableModel

* fix: do not use parcelize in script

* update kotlin samples

* add the option, update the doc
2019-10-02 00:13:00 +08:00
Jérémie Bresson
d2b299860d [jaxrs-spec] add Eclipse MicroProfile file based approach (#3901)
* [jaxrs-spec] add quarkus application server

* [jaxrs-spec] add thorntail

* [jaxrs-spec] add openliberty

* [quarkus] update to 0.20.0

* Add helidon

* Update quarkus version

* Update quarkus to 0.22.0

* Update documentation

* Force "useSwaggerAnnotations" to be false when quarkus, thorntail,
openliberty or helidon are used
2019-10-01 15:15:51 +08:00
Mateusz Szychowski (Muttley)
8212e80d0e [C++][Pistache] Simplified model template (#3417)
* [C++][Pistache] Simplified model template

* [C++][Pistache] Fix for addExternalLibs option

CMake would fail with addExternalLibs set to false
since it'd try to add depenency to not-existing targets

* [C++][Pistache] Update cpp-pistache-server-petstore.sh

* [C++][Pistache] Update Petstore sample

* [C++][Pistache] Update documentation
2019-09-29 11:48:39 +02:00
William Cheng
8293902134
replace gitter with slack in the doc (#3977) 2019-09-28 19:01:51 +08:00
Nick Fisher
8408232d1a Add F# Functions server generator (#3933)
* cherry pick F# Functions generator

test fix

fix template paths

replace giraffe sample

* update doc
2019-09-24 18:53:54 +08:00
William Cheng
3019b5a5e1 Merge remote-tracking branch 'origin/master' into 4.2.x 2019-09-22 14:18:07 +08:00
Andrew Emery
21e0e0d5d5 Kotlin multiplatform client (#3900)
* Includes Kotlin multiplatform client

Kotlin multiplatform allows Kotlin code to be shared across various target platforms.
This implementation generates Swagger clients for JVM and iOS platforms.

* Includes Kotlin Multiplatform sample scripts

* Updates existing Kotlin samples

* Includes Kotlin Multiplatform samples

* Fixes incorrect Windows sample resource location

* Updates Kotlin client documentation

* Removes unnecessary workaround to remove duplicate entries

* Includes additional multiplatform type and import mappings

* Fixes Kotlin client definitions with multiple enums

https://github.com/OpenAPITools/openapi-generator/issues/3917

* Updates Kotlin samples
2019-09-21 21:48:41 +08:00
William Cheng
a8826816fb
test kotlin vertx in pom.xml (#3890) 2019-09-16 22:47:28 +08:00
William Cheng
2ac46eda9f update doc 2019-09-14 23:44:46 +08:00
Wooyme
87dce1bfe1 [Kotlin][server] Add kotlin-vertx-server (#3031)
* add kotlin-vertx

* add kotlin-vertx

* update kotlin server

* update

* move Fsharp... in Config

* replace java model to kotlin model. delete useless code

* add kotlin-vertx readme.md

* add kotlin-vertx

* add model null safety

* change to vert.x offical web api

* fix date and datetime missing

* fix fileupload
2019-09-14 20:57:53 +08:00
Man
8055231400 asciidoc markup generator (#3845)
* basic asciidoc markup generation

* asciidoc markup include processing with mustache filter

* asciidoc tests, separate include filters

* asciidoc petstore sample

* add asciidoc generator to readme

* test asciidoc generator for all include files with own json spec.

* link fillter to link generated test data into asciidoc markup

* fix and cleanup names asciidoc tests.

* fix travis build error, removed windows line endings from mustache asciiidoc templates.

* asciidoc generator: comment and reduce visibility of helper method (fix dron build)

* asciidoc: windows linefeed again (fix travis ci)

* asciidoc generator: remove \t and format again.

* fix ascidoc generator ci builds ... ongoing..

* asciidoc: add generator .md files, unix line ending.
2019-09-14 18:39:58 +08:00
William Cheng
95c4a05b70
various minor improvements to nim generator (#3883) 2019-09-13 16:48:18 +08:00
Hideki Okamoto
f15f814d9b Add Nim client code generator (#3879)
* First version of Nim Client

* Add some codes

* Add some codes

* Add some codes

* Add some codes

* Add some codes

* First version of Nim Client

* Add some codes

* Add some codes

* [Dart] Fix README template and update testing doco (#3809)

* [Dart] Fix README template and update testing doco

- deleted redundant shell script
- fixed and updated README template
- updated test package and moved to a dev_dependency
- removed old unused dev_dependency packages
- updated testing documentation in petstore sample

* Remove references to dart-flutter-petstore.sh

* Fix typos

* Fix typo

* Support custom git repository (#3757)

* add gitHost param to GeneratorSettings and related

* parameterize gitHost in READMEs

* parameterize gitHost in go.mod

* parameterize gitHost in git_push

* update petstore samples

* run ./bin/utils/export_docs_generators.sh

* run meta-codehen.sh

* Revert "run meta-codehen.sh"

This reverts commit d6d579f6159186531257cdfdd73b9caf9e9ffeba.

* Revert "run ./bin/utils/export_docs_generators.sh"

This reverts commit 1b81538198d4319fd1b4e97447303e3cc0e8dc99.

* Revert "update petstore samples"

This reverts commit f513add88396707f6991ae2e4920359583ec88f1.

* run ensure-up-to-date

* Add links to article and video (#3820)

* Better Go code format (#3819)

* better varible naming

* better comments

* better code format for go experimental client

* better comment, update samples

* Add some codes

* Add some codes

* Add some codes

* Add gRPC Protobuf schema generator (#3818)

* add grpc protobuf generator

* update doc

* add new doc

* add windows batch, comment out root proto

* 1792 fix remote spec handling and hash calculation (#3440)

* fixed bug where nullApi.java would be generated.  Instead, generated DefaultApi.java to match the default path /{pathParam} (#3821)

* Revert "1792 fix remote spec handling and hash calculation (#3440)"

This reverts commit 2a2eefe93d.

* Add  nickmeinhold to Dart technical committee (#3830)

* Bug #2845 typescript angular inheritance (#3812)

* issue #2845: enable 'supportsMultipleInheritance' on typescript angular client codegen

- note I reran ./bin/openapi3/typescript-angular-petstore-all.sh and no changes occurred.
  this suggests to me that the petstore.yaml sample should be improved to make use of the
  anyOf / allOf / oneOf keywords, in order to better show the effects of changes on generated code.

* issue #2845: run ./bin/openapi3/typescript-angular-petstore-all.sh

* run `mvn clean package && ./bin/typescript-angular-petstore-all.sh`

* revert extranous files

* fix warnings in csharp-netcore client (#3831)

* Add missing files to the form request (#3834)

* [client][go] avoid duplicated reflect imports (#3847)

* Following up for #3440 (1792 fix remote spec handling and hash calculation) (#3826)

* This patch fixes the bug that we cannot access to remote files when checking file updates.
Following up #3440, supporting auth.

* 1792 fix remote spec handling and hash calculation (#3440)

(cherry picked from commit 2a2eefe93d)

* fix detecting remote file / local file logic while finding the hash file, taking care of IllegalArgumentException for local files.

* add testcase

* Add a link (#3850)

* Add Element AI to the list (#3856)

* maven-plugin-plugin 3.6.0 (#3854)

*  [Java][okhttp-gson] fix failure to deserialize floats (#3846)

* fixed bug where nullApi.java would be generated.  Instead, generated DefaultApi.java to match the default path /{pathParam}

* fix to bug #3157

* update samples

* Adds Http Info To Dart Api (#3851)

* [C++][Pistache] Add missing setter for arrays (#3837)

* [C++][Pistache] Add missing setter for arrays

Fixes #3769

* [C++][Pistache] Update Petstore sample

* typescript-inversify: improve check for required parameters, support multiple media types (#3849)

* [typescript-inversify] Allow falsy parameters

A required parameter to an api method must not be `null` or `undefined`.
It can be any other falsy value, e.g. `""`, `0` or `false` though. This
change makes sure an error is only thrown in the former case and not in
the latter.

* [typescript-inversify] Handle multiple media types

The Accept and Content-Type HTTP headers can contain a list of media
types. Previously all but the first media type in the api definition
were ignored. Now the headers are properly generated.

* [typescript-inversify] Fix http client interface

The api service methods allow the `body` parameter to be optional. The
parameter is then passed to an `IHttpClient`. So it needs to be optional
there as well.
Also fixed the sample implementation `HttpClient`.

Fixes #3618.

* [typescript-inversify] Regenerate Petstore sample

* [typescript-inversify] Use more explicit null check

This does not change the semantic of the generated code, but makes it more explicit.

Co-Authored-By: Esteban Gehring <esteban.gehring@gmail.com>

* [typescript-angular] allow empty string basePath (#3489)

* [typescript-angular] Fixing #2731 - empty string basePath

* typescript-angular: refactor base path configuration

* typescript-angular: refactor base path configuration

* Fix/r/serialization fix and minor 3xx resp fix (#3817)

* fix(qlik): fix for minor serialization bug

* fix(r): add petsore generated classes

* fix(r): indendation fixes

* typescript-axios: Fix baseoptions (#3866)

* Fixed missing baseOptions of typescript-axios.

The typescript-axios template was missing the baseOptions setting when building an API Configuration. Set it.

* update sample.

* re-generate typescript axios samples

* Rename gRPC generator to "protobuf-schema" (#3864)

* rename grpc generator to protobuf-schema

* update doc

* Prepare v4.1.2 release (#3873)

* update samples

* update date

* fix version in readme

* BugFix #2053 Spring Boot fails to parse LocalDate query parameter (#3860)

Adds the format annotation so that Spring is able to serialize OpenApi date/date-time format into LocalDate/OffsetDateTime.

* update doc, samples (#3875)

* update stable release

* Update the batch for Windows

* Add a test snippet

* Update ensure-up-to-date

* Add Nim to README.md

* Ran ensure-up-to-date to pass CircleCI tests
2019-09-13 15:56:54 +08:00
William Cheng
e73bf9be1d
Rename gRPC generator to "protobuf-schema" (#3864)
* rename grpc generator to protobuf-schema

* update doc
2019-09-10 17:32:25 +08:00
William Cheng
cec2818e1f
Add gRPC Protobuf schema generator (#3818)
* add grpc protobuf generator

* update doc

* add new doc

* add windows batch, comment out root proto
2019-09-04 14:22:23 +08:00
Prateek Malhotra
1b12b89fd8 typescript-fetch: add option for TypeScript 3.6+ compatible generation (#3801) 2019-08-30 21:59:54 +02:00
Jérémie Bresson
b0549fe6da
[java-client][rest-assured] add jackson support in addition to gson (#3795) 2019-08-29 17:34:37 +02:00
William Cheng
8236424aff
Fix Dart2 default template (#3790)
* fix dart2 default template

* update dart samples
2019-08-29 15:10:19 +08:00
prisoneroftech
8f7e43b500 [Kotlin][client] Support gson and moshi as serialization libraries (#3734) 2019-08-29 05:37:13 +02:00
William Cheng
9182784955 Merge remote-tracking branch 'origin/master' into 4.2.x 2019-08-28 14:01:20 +08:00
Jérémie Bresson
60e4c923dd [java][client] Add a "serializationLibrary" option (#3759)
* [java][client] Add a "serializationLibrary" option

* Update docs
2019-08-28 09:54:24 +08:00
Josh Giles
158cdfeb3c [typescript-fetch] fix #1998: prefix req ifaces. (#3740)
Prefix generated request interface names with API classname rather than
using namespaces, because namespaces are not well-supported by some
tooling (in particular, Babel).
2019-08-23 16:58:51 +02:00
William Cheng
8741a8ca35
Minor enhancements to the Avro schema generator (#3728)
* minor enhancements to the avro generator

* add option to customize package name

* update doc
2019-08-22 16:06:04 +08:00
Josh Giles
b323b0a0af [typescript-fetch] Fix #1998: namespace reqs. (#3695)
* [typescript-fetch] Fix #1998: namespace reqs.

Fix #1998 by namespacing the generated request object types used in the
typescript-fetch client codegen.

* Update petstore samples.

* Add default-false namespacing config option.

* Re-run code sample generation.

* Add maven build configurations.

* Fix sample VERSION files.

* Update typescript-fetch docs.

* Emulate with-npm-version, adding package.json.

* Add Paxos to companies using.

* Prefix namespace with basename to avoid collisions.
2019-08-22 07:59:34 +02:00
William Cheng
d09e097e4e
update qna with more info on nullable (#3726) 2019-08-22 11:39:57 +08:00
Sai Giridhar P
6924b3c710 [csharp-netcore] Making HTTP response headers dictionary case-insensitive (#3707)
* fix(csharp-netcore): Making response headers case-insensitive

* fix(r): Adding response headers on docs
2019-08-21 21:20:05 +08:00
Sai Giridhar P
94eb6860aa [csharp-netcore]: Fixing the build issues (#3681)
* fix(csharp-netcore): Fixing the build issues

* fix(csharp-netcore): Fixing the build issues

* fix(csharp-netcore): Fixing the Pet project

* fix(csharp-netcore): help fixes
2019-08-21 18:18:58 +08:00
Esteban Gehring
e5912b4925
typescript-angular: set angular version 8 as default for ngVersion (#3680)
* set angular version 8 as default for ngVersion

* docs
2019-08-20 07:48:29 +02:00
William Cheng
4575b3074a
[Go] add option to use class as enum prefix (#3675)
* add option to use class as enum prefix

* update doc

* fix go test

* update go xml petstore

* fix format
2019-08-20 00:33:08 +08:00
William Cheng
fae0528cd5
update cli option in Dart (#3627) 2019-08-13 17:13:50 +08:00
Jim Schubert
a5349cfde5
[cli][gradle] filter deprecated generators by default when listing available generators (#3612)
* Filter deprecated generators from CLI list by default.
* [gradle] Exclude deprecated generators from list by default, add "include" option to allow for customization of list task.
* Update scripts to support the --include option of the list command
* Update gradle/cli docs for generators listing with "include" option.
2019-08-12 08:25:52 -04:00
Jim Schubert
06533b977c
[core][gradle] User-defined server variable substitutions (#3363)
* [core] Initial support for server variable overrides
* [gradle] Support user overrides for serverVariables
* [core] Clarify server variable overrides, and propagate them to templates in the "servers" array
2019-08-11 09:57:36 -04:00
William Cheng
2d7cc778db
Add a new NodeJS Express server generator (#3567)
* create nodejs express esrver

* 1st commit of the express.js module. Express server working, api-docs loads properly. No real paths yet

* 1st commit of the express.js module. Express server working, api-docs loads properly. No real paths yet (#2839)

* Working Express server with successful routing to controllers.

* rewrote controllers and services. Haven't tested yet

* controllers and services have passed tests successfully

* Added documentation

* Added documentation

* Support for openApi v3, using 'express-openapi-validator' for parsing and validation, and an internal router to pass arguments to controllers and services. /controllers/Pet.js and /services/PetService.js should be used for reverse engineering for future codegen script

* update generator and template

* update samples

* more update

* update service, controller

* add vendor extensions

* some updates to adapt to changes in the generator (removing references to swager); some work on handling file uploads; some work on tests

* Update NodeJS server generator and templates based on new output (#3261)

* update generator and template

* update samples

* more update

* update service, controller

* add vendor extensions

* update doc

* Changed routing code to follow the following convention:
Each path operation has a 'x-openapi-router-controller' and 'x-openapi-router-service'. Automated files will be placed under /controllers and /services respectively.
Controller file names will end with 'Controller.js'.
Removed swaggerRouter, replaced it with openapiRouter
Routing works and simple tests show a return of 200 to requests.

* [nodejs-express-server] various updates, fixes (#3319)

* various fix

* remove dot from service

* add space

* better method empty argument

* remove test service (#3379)

* add new doc

* 1. routingTests.js runs through all operations described in openapi.yaml and tries calling them, expecting 200 in return. Currently not all tests pass - not supporting xml, and problems with formData
2. Removed old testing files.
3. Added model files - contain data and structure as defined in openapi.yaml. Model.js has static methods relevant to all model files.
4. Changed openapi.yaml to allow running tests easily.

* 1. routingTests.js runs through all operations described in openapi.yaml and tries calling them, expecting 200 in return. Currently not all tests pass - not supporting xml, and problems with formData (#3442)

2. Removed old testing files.
3. Added model files - contain data and structure as defined in openapi.yaml. Model.js has static methods relevant to all model files.
4. Changed openapi.yaml to allow running tests easily.

* added model classes. Currently as a concept only. Seems like won't be in use

* Updated README.md to be a detailed description of the project.
Removed test files that are not needed.
Removed utils/writer.js which is not needed, and the references to it in the codegen files

* Removed redundant file app.js - this file has no benefit at this point. index.js now calls ExpressServer.js directly. Updated files that used to call app.js. Updated README.md accordingly
Added a path to call the openapi.yaml, and a test file for all endpoints that are not in the openapi.yaml, ensuring that they return 200. Updated README.md accordingly

* Remove test controller (#3575)

* remove test controller

* add back changes to templates

* remove app.js

* update wording
2019-08-09 00:30:47 +08:00
William Cheng
eca8ec3cf8 update doc 2019-08-01 15:58:45 +08:00
Dennis Kliban
bcc3a9ecf7 Ruby client faraday (#3405)
* WIP: add faraday support to Ruby client

* update samples

* bin/console

* https only

* ruby-faraday: Add a gemspec template for faraday

* Add a test for ruby-faraday client options

* Remove Gemfile.lock from ruby-client-faraday

* Implement faraday client

* Problem: can't use Faraday library for ruby clients

Solution: add support for Faraday library

This patch builds on the work started by @meganemura

* Problem: Faraday is set as default library

Solution: Make Typhoeus default

This patch also updates the api_client template for Faraday to include query params with requests.
2019-08-01 11:08:34 +08:00
Erik Seliger
0e621dcc29 feat(typescript-angular): add flag for using string enums (#3464)
* feat(typescript): add flag for using string enums

* fix: adjust templates

* fix: repair logic

* fix: remove sample

* fix: add to v7 sample

* fix: remove unneeded lines
2019-07-31 21:16:49 +02:00
Michal Foksa
37cdc8e493 Feature/mustache lambda documentation (#3476)
* Default outputFile value is `openapi/openapi.yaml`.

* Mustache Lambdas documentation.

* Default OpenAPIYamlGenerator outputFile value is `openapi/openapi.yaml`.
2019-07-29 15:34:50 +02:00
William Cheng
6e3176557c
[OCaml] various enhancements (#3483)
* add ocaml template creator

* various enhancement to ocaml generator

* update instruction

* update doc

* remove readme

* add back readme
2019-07-29 10:07:32 +08:00
cgensoul
1713c7610d [OCaml] new client generator (#3446)
* Début d'un générateur pour OCaml.

* Ajout du script bash de generation pour OCaml.

* Implémentation de la partie model du générateur OCaml.

* Suppression du fichier Model.mustache.

* Légère modification dans le générateur OCaml.

* Début d'implémentation de la génération des opérations.

* Avancées dans l'implémenatation des opérations.

* Avancée dans la gestion des enums : reste à traiter le fait que Yojson sérialize les variants comme des tableaux JSON.

* Prise en compte du fait que Yojson représente les variants constants sous forme d'un tableau JSON contenant une unique string.

* Utilisation des variants polymorphe pour les enums car il se peut que plusieurs énumérations partagent des valeurs communes ce que ne permettent pas les variants ordinaires au sein d'un même module.

* Avancées dans le générateur de code OCaml : le code produit compile et prendre en compte les pathParams, les queryParams, les headersParams, les bodyParams et la réponse JSON. Manque le support du multipart, du form encoded et des mécanismes d'authentification.

* More tests.

* Correction de problèmes dans la génération mis en évidence par l'utilisation d'un fichier OAS plus gros et complexe que Petstore.

* Mapping du case Error de Ppx_deriving_yojson_runtime.ok_error vers l'exception Failure pour avoir des types plus simples et non dépendants de Pppx_deriving_yoson_runtime dans les APIs générées.

* Ajout de la génération des fichiers d'interfaces .mli pour les APIs.

* Ajout du support des parametres de type x-www-form-urlencoded.

* Le paramètres d'url de type number étaient mal gérés.

* Cleanup.

* Replace block comment start and end sequences in input text.

* Make apis calls without a return type return unit rather than Yojson.Safe.t.

* Make modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml generate properly.

* Added generated code for modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml.

* Better handling of enums and map container and better sanitizing of generated identifiers to support all the corner cases present in modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml.

* Correcting a violation : using toLowerCase without relying on the default Locale.

* Changed authoring in partial_header.mustache.

* Deleted commented code.

* Collect enum schemas in items properties of operation parameters in the case of ArraySchema parameters. This allows correct processing of modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml.

* Collect enums also in additional properties schemas of operation parameters in the case of MapSchema parameters (if this type of parameter can is allowed).

* Removed copy-pasted Copyright notice from SmartBear.

* update doc

* Use Locale.ROOT instead of Locale.ENGLISH for toLowerCase calls.

* Make GET operations with body generate compilable code.

* Updated ocaml-client generated samples using the latest version of the OCaml code generator.

* Added [@default None] for record fields with option types so that if those fields are missing at deserialization time, None is assumed.

* Added support of api keys in query params.

* Updated generated ocaml samples to reflect latest changes in templates.

* Added [@default] on enum record fields for which the enum type has only one accepted value so that those fields can be deserialized even if the value is absent of the json payload.

* Delete useless space character in template.

* Added proper handling of http response codes.

* Updated generated ocaml samples to reflect latest changes in templates.
2019-07-28 21:50:53 +08:00
Benjamin Douglas
43590582c5 Java 11 native HTTP client library (#3434)
* Initial commit of Java 11 native HTTP client port

* Rebase to master and add JSR305 for @Nullable

* Update samples with @Nullable annotations
2019-07-26 09:59:21 +08:00
Martin Delille
3f3ecb6879 add modelNamePrefix option for qt5 (#3431)
* qt5: Remove duplicate cppNamespace additional property

* qt5: Add modelNamePrefix additional property
2019-07-25 09:23:51 +02:00
Akihito Nakano
1e735c69fa Add Logs section to the Debugging page. (#3357) 2019-07-18 15:04:27 +09:00
Jean-François Côté
610ca28681 Fix #3349 : [typescript-fetch] Proposition to follow spec (#3351)
* Fix 3349 : Proposition to follow spec closely

* Fix #3349 : Changes suggested by code review. Add an option for the single request parameter.

* Fix #3349 : Add sample with the use of the single request parameter

* Fix #3349 : Small fix that wasn't passing the tests

* Fix #3349 : Remove cariage return that might create an error

* Fix #3349 : Add chmod to make new sh file executable and fix the CircleCI issue

* Fix #3349 : Add windows sample generation

* Fix #3349 : Rename everything because of default value change

* Fix #3349 : Indentation fix

* Fix #3349 : Add 755 to typescript-fetch-petstore-multiple-parameters.sh

* Fix #3349 : Auto generation of the documentations

* Fix #3349 : Revert back a change that was auto-generated.
2019-07-17 22:30:27 +02:00
Jérémie Bresson
41d5750ddb [JaxRS-Spec] add openApiSpecFileLocation parameter (#3344)
* [JaxRS-Spec] add openApiSpecFileLocation parameter

* Update samples
2019-07-14 18:06:44 +08:00
William Cheng
a5f92ad150 update doc 2019-07-13 01:20:15 +08:00
William Cheng
203fc812bd
v4.0.3 release (#3315)
* update snapshot version

* update doc

* comment out haskell servant server test
2019-07-09 20:44:31 +08:00
Victor Orlovsky
0e37719162 [Java][Rest-assured] Bump rest-assured version (#3282)
* Update rest-assured version to 4.0.0

* Added rest-assured version 4.0.0 to documentation

* Remove CatAllOfTest and DogAllOfTest
2019-07-08 22:20:35 +08:00
Jim Schubert
51e7005373
[online] Remove GENERATOR_HOST defaults (#3289)
The defaults configured for GENERATOR_HOST didn't really make sense.
When running the docker container with `-P`, GENERATOR_HOST defaulted to
http://localhost. This caused download links for generated client/server
code to be incorrect. For most cases, there's no reason to provide
GENERATOR_HOST as the code already figures the appropriate
scheme/host/port from the originating request.

GENERATOR_HOST could still be used for more complex deployment
scenarios, for instance if a specific server is configured as a file
server. I haven't tested this scenario, and it may require mounting /tmp
as a volume when running within a container.
2019-07-07 10:25:43 -04:00
Erik Timmers
366ca24062 Add option to disable default interfaces (#3022) 2019-07-07 16:44:03 +08:00
Justin Black
109808e60d [Python] Adds new client generator, python-experimental (#3244)
* Adds python-experimental generator

* Adds python-experimental samples folder which uses its own v2 spec

* Adds enusre-up-to-date updates

* Removes samples/client/petstore/perl/t/AnotherFakeApiTest.t

* Removes comment line from python-experimental generator

* Reverts perl docs file

* Updates perl sample client

* Adds python-experimental to pom.xml

* Copies the python test foldeers tests and testfiles into python-experimental

* Copies python test folder into python-experimental

* Moves python testing from Travis (samples pom.xml profile) to Circlci (samples.circleci pom.xml profile)

* Adds python-experimental pom.xml

* Adds python-experimental makefile and .sh files

* Chenges python-experimental to use gitignored venv rather than .venv which is not ignored when testing

* Adds dev-requiremnts.txt and removes .travis.yml from python-experimental so CI tests will pass

* Moves python-experimental from CicleCI to Travis to get support for multiple python environments

* Updates generator java comment so CI tests will run over again
2019-07-06 22:43:29 +08:00
William Cheng
0b79c5b6be
Add new Go client (experimental) generator (#3268)
* add new go experimental generator

* extends go client codegen

* add go samples and test

* comment out haskell client test
2019-07-04 22:56:49 +08:00
William Cheng
1e380850c0 update doc 2019-07-04 22:49:15 +08:00
Matthew Cachia
cbca86b43a Add unhandledException to 'spring' generator, which declares all operation methods to throw a generic exception, allowing implementations to unhandle checked exceptions. This is useful whenever it is unnecessary to handle specific exceptions and, more importantly, allow generic constructs (eg. Spring @ControllerAdvice) to tackle unhandled exceptions from a single point (for instance, tackle all unhandled exceptions as an HTTP500 while excluding the stacktrace in the response body). (#2482) 2019-07-04 20:19:40 +08:00
Ramanth Addala
0cb921251d feat(r): Added handling exception with ApiException class and better documentation (#3217)
* feat(r): Added handling exception with ApiException class and document generation

* feat(r):enhancements to exception handling and documentation

* fix(r): fixes and reverting the man folder

* fix(r): minor fix of import statement

* fix(r): generated the docs file

* fix(r) minor doc casing fixes
2019-07-03 22:05:21 +08:00
William Cheng
4e62e92daf update doc 2019-07-02 17:17:57 +08:00
Jan Willem Harmelink
c012dcd754 Added RxJava2 to java-vertx server codegen. (#3240) 2019-07-02 16:46:02 +08:00
Roman Müller
73966a0152 [KOTLIN Spring] add interfaceOnly option (#3050)
* move template definition to processOpts()

* add interfaceOnly option for kotlin-spring

* add template for interface only option
2019-06-27 12:23:50 -04:00
wing328
6c9fefa7b5 update doc 2019-06-27 10:47:05 +08:00
Amit Joshi
94c583b6ce [aspnetcore]: Preliminary support for ASP.NET 3.0 Core preview 5 (#2824)
* First set of fixes to support ver 3.0, useswashbuckle does not work yet

* Fix swashbuckle issues iwth aspnetcore 3.0

* Use default routing for 2.2 and turn off default for 3.0

* fix up documentation

* PR Feedback and wrong name in mustache file

* Fix for 2.1 usage too

* Change isFramework to useFrameworkReference as name to make thngs explicitly clear. Also fix small messages for the review comments

* Make JSON.NET version configurable

* Activate endpoint routing and use camel case NamingStrategy

* Make Newtonsoft version configurable to match ASP.NET Core preview 5

* Fix spelling of an option, remove a duplicate call and update docs
2019-06-25 14:40:05 +08:00
Thibault Duperron
e3fe12eacf Merge java8 doc for spring (#3122)
fix #3117
2019-06-21 22:13:19 +08:00
Slavek Kabrda
66bf0dce9e [Golang][client] Allow generating go client code as a submodule. (#3012) 2019-06-05 17:47:46 +08:00
Sai Giridhar P
dc3543981e feat(java-jersey2): Making response headers case-insensitive (#3072)
* feat(java-jersey2): Making headers case-insensitive

* feat(java-jersey2): Updating documentation
2019-06-04 22:03:01 +08:00
William Cheng
c6207c0a49
Mark nodejs-server as deprecated (#3083)
* mark nodejs-server as deprecated

* update opeanpi3 script

* add new file
2019-06-04 21:38:28 +08:00
Sai Giridhar P
6b7c5edbce feat(java-okhttpgson): Making API response headers case insensitive (#3029)
* feat(java-okhttpgson): Making API response headers case insensitive

* feat(java-okhttpgson): Adding documentation

* feat(java-okhttpgson): Removing tabs

* feat(java-okhttpgson): Removing tabs
2019-06-03 15:40:22 +08:00