1219 Commits

Author SHA1 Message Date
Richard Whitehouse
1ce09788a9
[Rust Server] Support Bearer based Authentication (#3606)
Add handling case for Bearer Authentication on the client and update the samples
2019-08-17 12:30:47 +01:00
Richard Whitehouse
44fda895d2
[Rust Server] Frunk - LabelledGeneric - support (#3552)
Derive the LabelledGeneric trait on Swagger models.  This allows
conversion between structurally similar types by using
https://docs.rs/frunk/0.2.2/frunk/#transmogrifying.

Exit if example fails to run
2019-08-17 11:03:38 +01:00
Slavek Kabrda
5182955cca [Java][client] make it possible to send explicit nulls for nullable fields (#3474)
* [Java][client] make it possible to send explicit nulls for nullable fields

* Regenerate samples
2019-08-16 16:26:06 +08:00
William Cheng
c3535cf9ca
Add test cases to cover different collection formats (#3640)
* add test cases to cover different collection format

* add space params to retrofit 1.x

* add space params to retrofit 2.x

* rename url to localVarUrl

* fix exception in haskell servant
2019-08-15 11:09:12 +08:00
Olivier THIERRY
99d85a39a3 [Slim] Distinction between basicBasic and basicBearer authentication (#3621)
* [Slim] Distinction between basicBasic and basicBearer authentication

* [Slim] Update Petstore samples
2019-08-13 20:39:55 +08:00
Juang, Yi-Lin
f5327b601e [aspnetcore] Fix nullable enum and duplicate model (#3622)
* Fix enum nullable

* Update samples
2019-08-13 13:49:16 +08:00
Juang, Yi-Lin
22d022b2d5 [aspnetcore] Add TypeConverter for enum string conversion (#3557)
* Add TypeConverter for enum
2019-08-10 22:57:36 -04:00
William Cheng
5956569e7a
Prepare 4.1.1-SNAPSHOT (#3603)
* update pom

* update samples

* update pom
2019-08-10 09:41:08 +08:00
Jérémie Bresson
1ab7b9ceb6 [java][client][jax-rs] Add a constant for Jackson @JsonProperty (#3560) 2019-08-09 11:01:23 +08: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
Richard Whitehouse
4478f42927
[Rust Server] Generate valid Rustdocs for lazy_static items (#3556)
Generate valid Rustdocs for lazy_static items and update samples
2019-08-06 18:44:51 +01:00
William Cheng
4df1e1928c update rust server samples 2019-08-04 23:06:14 +08:00
Richard Whitehouse
83f17941b9
[Rust Server] Allow more than 32 configured paths (#3494) 2019-08-04 12:55:33 +01:00
Richard Whitehouse
6963e5eeb0
[Rust Server] Support multipart/form_data request bodies (#2846)
[Rust Server] Support multipart/form_data

- Support multipart/form_data in the Rust Server
- Add a new test API to test the change.
- Update the examples to match
2019-08-04 12:54:24 +01:00
Ivan Aksamentov
581131e0fe Fix PHP Symfony non-primitive return type being forced to be an array (#3515)
* Fix PHP Symfony non-primitive return type being forced to be an array

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

* Update PHP Symfony samples
2019-08-02 06:54:13 +08:00
Mateusz Szychowski (Muttley)
4d285939a6 [C++][Pistache] Do not use JSON for primitive types in request body (#3509)
* [C++][Pistache] Do not use JSON for primitive types in request body

Request body can contain any input, simple strings, CSV text or something else

* [C++][Pistache] Update Petstore sample version
2019-08-01 13:49:17 +02:00
Guillaume SMAHA
049f69c55b Use range for dependencies in python-flask (#3470) 2019-07-28 10:40:10 +08:00
William Cheng
8253c28d6e
[Java] Replace "useNullForUnknownEnumValue" option with the nullable attribute (#3455)
* add nullable support to enum

* update test spec with nullable enum

* update samples

* update samples
2019-07-26 09:49:44 +08:00
William Cheng
d0b728794d update kotlin server samples 2019-07-25 18:56:59 +08:00
kassim
ee538be964 [Java] add nullable annotation to pojo template for non-required fields (#3409)
* add nullable annotation to pojo template

* add jsr305 dependency

* jsr305 dependency on all java build.gradle files

* jsr305 dependency on all java pom.xml files

* update samples

* more pom updates

* more sample/template updates
2019-07-25 10:35:18 +08:00
Jim Schubert
944e1c3468
[fix] Assign template directory to additional properties (#3385)
* [fix] Assign template directory to additional properties
2019-07-18 09:50:54 -04:00
Mateusz Szychowski (Muttley)
c1df082d65 [C++][Pistache] Add compatibility for nlohmann-json 3.5.0 (#3306)
* [C++][Pistache] Replace contains with find on json object

This makes generator compatible with nlohmann-json 3.5.0

* [C++][Pistache] Update Petstore sample
2019-07-13 13:31:14 +02:00
William Cheng
753be28782 Merge remote-tracking branch 'origin/4.1.x' 2019-07-09 23:56:30 +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
Jérémie Bresson
3943d1cc9d [java] fix javadoc configuration (#3302)
* [java] fix javadoc configuration

* [java-pkmst-microservice] fix generated javadoc
2019-07-08 21:25:47 +08:00
Nathan Broadbent
78551d0180 Set error_reporting(E_ALL) in phpunit.xml settings, to crash on undefined variables (#3266)
* Set error_reporting(E_ALL) in phpunit.xml settings, so that undefined variables will always cause a test failure

* Update petstore sample for php-laravel
2019-07-06 22:21:41 +08:00
Marc Etter
95ba9525f9 [elm][haskell-servant] Fix issue 3256 (#3262)
* [elm] fix empty operation exception (#3256)

* [haskell-servant] fix empty operation type (#3256)

* [elm][haskell-servant] update samples
2019-07-03 18:07:21 +08:00
William Cheng
35262aa7d1
move openapi 3 samples to the correct folder (#3267) 2019-07-03 13:18:52 +08:00
wing328
9df5bdabc8 Merge remote-tracking branch 'origin/master' into 4.1.x 2019-07-02 22:48:09 +08:00
Jérémie Bresson
40a293dcda Update to swagger-parser to 2.0.13-OpenAPITools.org-2 (#3239)
* Update to swagger-parser to 2.0.13-SNAPSHOT

* Update samples

* Update swagger-parser to 2.0.13-OpenAPITools.org-2
2019-07-02 16:37:41 +08:00
Mateusz Szychowski (Muttley)
731b162942 [C++][Pistache] Fix warnings (#3238)
* [C++][Pistache] Fix warnings

Remove unecessary semicolon (Wpedantic)
Remove unused parameter name (Wunused-parameter)

* [C++][Pistache] Update Petstore sample
2019-06-28 19:21:01 +02: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
Mateusz Szychowski (Muttley)
68a5fa4c8b [C++][Pistache] Catch exception instead of runtime_error (#3225)
* [C++][Pistache] Replace runtime_error with std::exception

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

* [C++][Pistache] Fix catch-value warning
2019-06-26 19:13:54 +02:00
wing328
7534df4520 Merge remote-tracking branch 'origin/master' into 4.1.x 2019-06-26 16:01:23 +08:00
Mathieu Debove
06cfdbbdc6 Add missing javax dependencies for Java > 8 (#3188)
* Add missing javax dependencies for Java > 8

* update spring petstore samples
2019-06-24 21:42:49 +08:00
wing328
55ae485fd0 update kotlin samples 2019-06-24 21:01:36 +08:00
Thibault Duperron
a882e4b3a5 Add Flow import to kotlin spring reactive (#3107)
* Add Flow import to kotlin spring reactive

* Add runBlockingTest to api tests

* Add kotlin-springboot-petstore-server-reactive.sh to ensure-up-to-date

* add reactive check for  runBlockingTest

* Samples
2019-06-24 14:26:30 +08:00
Thibault Duperron
1d8c9dcc0b Ktor Fix KtorExperimentalAPI import (#3108)
* Ktor Fix KtorExperimentalAPI import

Fix #2967

* Samples
2019-06-24 14:23:22 +08:00
MBcom
1540ae7951 added api key authentication to aspnetcore 2.1 (#3089)
updated samples
2019-06-21 21:54:08 +08:00
William Cheng
8e11fd9fe4
Prepare 4.0.3-SNAPSHOT (#3185)
* update version to 4.0.3-SNAPSHOT

* update readme

* update gradle, maven plugin

* update release schedule

* update samples
2019-06-20 18:50:49 +08:00
Jim Schubert
a96ab1cf9d
[core] GeneratorSettings, WorkflowSettings, and cleanup in CodegenConfigurator (#2946)
* Introduce GeneratorSettings + cleanup

GeneratorSettings is an immutable settings object, intended to limit the
manipulation of generator settings.

To move to GeneratorSettings, lots of modification was done to
CodegenConfigurator. The goal  here is that CodegenConfigurator
would create the contextual information required to initiate a
generator run:

* GeneratorSettings
* Workflow related settings
* Configuring "system" GeneratorProperties (ThreadLocal properties)
* Deserializing from file to config object
* Input spec document (OpenAPI, intending to target others)

ClientOpts was generally unused, and the few places it was being used
have been updated to pass the properties to
codegen.additionalProperties.

* Add sanity to system properties

The -D argument for the generate command is an application argument
which is easily confused for Java System Properties. This isn't the
case, as setting values here doesn't update the configuration in
System.getProperties().

This adds a warning and deprecation to that option, as defining these
values as system properties will also continue to work as expected. This
makes the -D application argument redundant and confusing.

* Contextualize generator/workflow settings

This splits settings relevant to generator configuration (the what) and
workflow configuration (the how) in an attempt to make configuration
easier to conceptualize.

* Update Gradle task w/ CodegenConfigurator setters

* Remove -D usage in scripts

* Add -p option for additional properties

* Regnerate samples
2019-06-07 13:07:52 -04:00
sunn
6660b74247
Add Q_DECLARE_METATYPE to the generated models and remove ref in signals (#3091) 2019-06-06 16:13:11 +02:00
Adi Gerber
6379022c42 scala-play-server: fix API doc url (#3096) 2019-06-06 01:50:39 +08:00
MBcom
dcf3f420f9 general support to add scopes for bearer auth too (#1984)
* general support to add scopes for bearer auth too
implemented authorize workflow in aspnet core too

* petstore update

* fix missing )

* multi roles fix

* null pointer error prevention

* null point exception fixes

* null pointer fixes

* npe fix

* solved line break issue
2019-06-04 23:03:15 +08:00
Vincent Devos
57560d365f [KOTLIN Spring] fix generation with modelNamePrefix/Suffix (#3038)
* [KOTLIN Spring] fix generation with modelNamePrefix/modelNameSuffix

* fix indent

* fix indent

* fix indent

* fix indent

* fix indent

* fix indent
2019-06-04 21:57:43 +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
Andrej Završnik
caac76c265 Kotlin-Spring template fixes/improvements (#3007)
* Fixed case where invalid comma is added to consumes/produces list in case last element is empty.

* Changed default HttpStatus.OK response to match first response code in definition.
Allowing also other responses 201, 202 ...

* Changed default HttpStatus.OK response to match first response code in definition.
Allowing also other responses 201, 202 ...

* run ./bin/kotlin-springboot-petstore-server.sh
Updated APIs
2019-06-03 20:48:40 +08:00
Matthias Preu
1eca97f738 Fix wrong include path in api-header template (#3062)
Change local json.hpp include path to correct value.

Update samples.
2019-06-03 15:41:45 +08:00
sylvainmoindron
7916f2f880 [kotlin-spring] add reactive behavior via Kotlin coroutines (#2934)
* kotlin spring : add reactivity via kotlin's coroutines

* add kotlin spring boot reactive samples

* bug : fix spring version and import for coroutines

* remove exception handler for reactive (webflux doesn't support it)

* add spring milestone repository to maven pom

* add reactive type for list in Api and ApiImpl methodes for mathching body responsive parameter

* fix baseType for ArraySchema

* regenerate samples

* updating documentation
2019-06-02 15:50:45 -04:00
William Cheng
7e457f7e41 sync master 2019-06-03 00:32:13 +08:00