5759 Commits

Author SHA1 Message Date
Nicholas Muesch
7efa65164a
Add openapi.yaml file to Java clients (#5765)
* Add openapi.yaml file to Java client

* Move supporting template file to Java root

* Update petstore clients
2020-04-07 16:07:08 +08:00
Michele Albano
5fd724fceb
C client generator improvements to support petstore. Solves #5836 (#5837)
* C client generator improvement to support:
openapi-generator/modules/openapi-generator/src/test/resources/3_0/petstore.yaml

* Improvements to the C client generator:
- moved base64* from apiClient.c to binary.h/binary.c
- changed CR/LF to LF in binary.h/binary.c

* C client generator: better support for base64encode / base64decode
2020-04-07 11:40:57 +08:00
Bouillie
6cdfb7ca9f
Scala akka http server - normalization of some vendor extensions (#5829)
* [scala-akka-http-server] Normalized vendor extension "paths" to "x-paths"

* [scala-akka-http-server] Normalized vendor extension "hasDefaultValue", "isDefault", "specificMarshallers", "fileParams", "nonFileParams"

Co-authored-by: Olivier Leonard <oleonard@ankama.com>
2020-04-07 01:00:48 +08:00
William Cheng
5dd572035c
minor fix to http basic auth (#5839) 2020-04-06 16:07:36 +08:00
Natan Laverde
6cbc442b02
[C++] [Qt5] [Client] fixed cpp-client-qt5 HttpRequestWorker contentCompression variables initialization (#5834)
When contentCompression is not enabled, the variables isRequestCompressionEnabled and isResponseCompressionEnabled in HttpRequestWorker are not being initialized.
Without initialization the compress function could be called and the request content could be an empty QByteArray instead of original request body.
2020-04-06 08:53:41 +02:00
William Cheng
f1325e23ee
support enum in parameters (#5838) 2020-04-06 14:45:45 +08:00
William Cheng
d893ee883b
use allVars to cover all properties (#5835) 2020-04-06 10:54:49 +08:00
Richard Whitehouse
cdb500c156
[Rust Server] Fix no features build (#5747)
* Remove test file erroneously checked in

* [Rust Server] Fix no features build

- Need serde_json for no-features build for undefined value structures
- Don't include `IntoHeader` type and implementations if we aren't including the client/server features
- Don't export the `IntoHeader` type at all - it's internal

* Update samples
2020-04-05 19:08:39 +01:00
Michele Albano
e9c1346386
tests for models for C-libcurl generator (#5699)
* First try to generate unit tests for the models of the C-libcurl client. Models into models are not supported yet.

* Added unit tests for the modules of the C-libcurl client to the git repository.

* Support for objects having other objects as properties, for the C-libcurl client generator

* Proper formatting of generated code
2020-04-06 01:42:50 +08:00
Alex Buchkovsky
166aae6fec
[BUG] [KOTLIN] Fix default value generation for Kotlin Strings (#5776)
* fix default value generation for kotlin

* add updated pet templates

* Revert "add updated pet templates"

This reverts commit 7e8168ad

* regen pet store projects code
2020-04-06 01:30:03 +08:00
Antoine Reilles
3b495bab12
[jaxrs-cxf-cdi] fix allOf equals and hashCode (#5756)
When generating model that use allOf, the equals and hashCode methods
must take the parent class into account.
2020-04-06 00:26:02 +08:00
William Cheng
52018c43ba
Minor improvements to scala akka server (#5823)
* minor improvements to scala akka server

* add samples

* update doc
2020-04-05 10:09:31 +08:00
Bouillie
af85fab52b
Scala akka-http server (#5758)
* Scala akka-http server base implementation

* [scala-akka-http-server] petStore samples

* Improved the formatting of generated files

* Updated scala-akka-http server samples

* [scala-akka-http-server] the groupId, artifactId and artifactVersion default value are used as intended.

* Fixed the default operation not being correctly generated on parameterless operations

* Added build.sbt.mustache supporting file

* Updated scala-akka-http server samples

* ScalaAkkaHttpServer: Fixed a String.format call to use Locale.ROOT for locale

* [scala-akka-http-server] Fixed defaultValue being escaped during generation

* Added scala-akka-http.md

* Replaced all "⇒" character with "=>" to retain compatibility with scala 2.13

* [scala-akka-http] Added a config option akkaHttpVersion
It's set in the generated build.sbt.

* Updated scala-akka-http server samples

* [scala-akka-http] More accurate akkaHttpVersion parsing

* Updated scala-akka-http.md

* [scala-akka-http] Changed the akka-http version check to fix the generation of StringDirectives

* Updated scala-akka-http samples

* updated scala-akka-http.md

Co-authored-by: Olivier Leonard <oleonard@ankama.com>
2020-04-04 23:16:14 +08:00
William Cheng
00ec8fd15b
fix array return (#5822) 2020-04-04 21:49:40 +08:00
William Cheng
42e87c8f33
rename hostsetting, validate base url (#5821) 2020-04-04 17:25:05 +08:00
Sebastien Rosset
242c2e8544
[Python-experimental] Documentation enhancement for oneOf schema and minor err msg improvement (#5791)
* Add documentation to generated code

* Improve error message

* Improve documentation

* Improve documentation

* Improve documentation

* Improve documentation

* Improve documentation

* Improve documentation

* Run sample scripts

* Address review comments

* Address review comments

* Fix problem in python error message
2020-04-03 20:49:23 -07:00
Sebastien Rosset
acae76b38f
[codegen] Cachesize config seconds (#5816)
* make name cache configurable

* Address review comments
2020-04-03 17:15:55 -04:00
Sebastien Rosset
3d99c58338
make name cache configurabl (#5775) 2020-04-03 23:11:48 +08:00
Sebastien Rosset
9c8fb9db46
[codegen] Use once(LOGGER) to reduce amount of identical warning messages (#5808)
* Warn once instead of many times when the log statement does not have contextual information

* Warn once instead of many times when the log statement does not have contextual information
2020-04-03 23:10:12 +08:00
William Cheng
281d154ff4
[PS][Experimental] add withHttpInfo support, fix "null" return (#5811)
* add with http support

* use full name in tests

* using full name in test

* skip type check
2020-04-03 15:47:04 +08:00
William Cheng
bc12ada4c0
use write verbose in auth, better api doc (#5804) 2020-04-03 10:14:06 +08:00
tanmen
7d35268414
[typescript-axios][client] Unnecessary imports occurs when using withSeparateModelsAndApi (#5797)
* add ts-ignore

* add petstore sample
2020-04-02 19:17:40 +02:00
Aleksandr Nekrasov
ea2fd0f1b6
fix scala-akka java8 serializers (#5742)
* fix scala-akka java8 serializers

* regenerate samples for akka-http
2020-04-02 12:18:21 +08:00
Bouillie
65eff3ba4c
[Csharp-client] Complex form parameters are not serialized as application/json (#5787)
* [csharp-client] Complex form parameters are now correctly serialized as json.
Reference: http://spec.openapis.org/oas/v3.0.3#special-considerations-for-multipart-content

* Updated bin/windows csharp sample generation scripts to point to the correct directories

* Updated csharp samples

Co-authored-by: Olivier Leonard <oleonard@ankama.com>
2020-04-02 11:59:27 +08:00
Slavek Kabrda
3f445772ae
[go-experimental][go][client] Remove unreachable code in go client API methods (#5611)
* [go-experimental][go][client] Remove unreachable code in go client API methods

* Properly regenerate all samples
2020-04-02 11:15:31 +08:00
Josh Burton
04160dab3d
[dart-dio] Fixes --model-name-suffix having no effect (#5669)
Fixes #5409
2020-04-02 11:13:23 +08:00
Jim Schubert
2957dd4d45
[cli] Add --global-property for -D replacement (#5687)
-D option has been deprecated as it was previously used to:

* Pass "system properties"
* Pass additional properties

This was confusing because we already have --additional-properties and
because Java System Properties are passed as -D before program
arguments.

Confusion around the -D option had existed for some time, but when we
introduced the thread-safe GlobalSettings to avoid overwriting Java
System Properties, we created a hard break from Java System Properties
in the generator. This also disconnected the previous "system
properties" from accepting additional properties.

Once these newly deprecated methods are removed, we will have a clear
separation of concerns between:

* Java System Properties
* Global generator properties (used as workflow context)
* Additional properties (used as generator options)

This commit marks multiple places for cleanup in 5.0. These will be
breaking changes, and lower effort to break in 5.0 with deprecation
warnings now rather than adding sibling properties throughout the code
and potentially introducing logic errors.
2020-04-02 11:11:02 +08:00
Jim Schubert
e14e5fccf3
[cli][docker] Better expose version/sha information of builds (#5736)
* [cli] Some CLI improvements…

* Introduce --version
* Introduce --help
* Add --sha to version command for short SHA display
* Output Version and SHA details
* In new --version output, display repo and doc site

Additional cleanup to suppress warnings and code quality.

* [docker] Adds labels for metadata

This adds image labels to store metadata on the online and cli docker
images, using standard labels:

* org.opencontainers.image.created
* org.opencontainers.image.revision
* org.opencontainers.image.title
* org.opencontainers.image.version

These can be inspected via 'docker inspect IMAGE_NAME' and may be useful
in tooling/automation or bug reports submitted by users.

For more details on these labels, see:
https://github.com/opencontainers/image-spec/blob/master/annotations.md

* Include version --full for equiv to --version
2020-04-02 11:05:25 +08:00
William Cheng
4623ec86d3
[PS][Experimental] Better common verb handling (#5783)
* better common verb handling

* better debugging

* add option to customize common verb
2020-04-02 08:19:16 +08:00
William Cheng
12440ca877
add map example (#5778) 2020-04-01 14:59:33 +08:00
William Cheng
f58ebf65d1
use Initialize instead of prepare (#5777) 2020-04-01 11:21:11 +08:00
William Cheng
24513091b0
use prepare instead of new (#5773) 2020-04-01 09:24:07 +08:00
Timur Platonov
01d07694fb
fix request.on_complete message when tempfile is nil (#5745)
* fix request.on_complete message when tempfile is nil

* update faraday client sample

* add openapi3 client samples
2020-04-01 00:10:31 +08:00
William Cheng
0fd5d46585
add support for common verbs (#5771) 2020-03-31 22:37:30 +08:00
William Cheng
3316f17ed5
[PS][PowerShell] fix passthru, use switch instead of bool (#5768)
* fix passthru, use switch

* remove line
2020-03-31 19:10:27 +08:00
ehansen31
7e22b4b8cf
[Erlang-Server] security definition context changes don't propagate to handler (#5751)
* Map Merge Context & Params

handler requires context and params to be merged before returned to user defined request_handler.

* post build & shell script

* Delete VERSION
2020-03-30 23:20:51 +08:00
Even André Fiskvik
603709e17e
[kotlin] Fix #5247 incorrect enum parameter type for arrays (#5435) 2020-03-30 16:08:17 +08:00
Hui Yu
daa737dafa
[C][Client] Support SSL client authentication for the c client (#5719)
* [C][Client] Support SSL client authentication

* [C][Client] Support SSL client authentication, update sample
2020-03-30 14:35:33 +08:00
William Cheng
861fcce578
add default headers support (#5746) 2020-03-30 12:15:27 +08:00
Richard Whitehouse
d0d0252fff
[Rust Server] Don't use structs in models (#5557)
* [Rust Server] Don't use structs in models

This avoids namespace clashes between model names and types used.

* [Rust Server] Handle models named after results

* [Rust Server] Add test for result models

* Update samples
2020-03-29 20:04:56 +01:00
William Cheng
01f02f6c57
[PS][Experimental] Add multiple server support (#5741)
* code comment

* add get host setting

* add multiple server support
2020-03-29 21:44:18 +08:00
sunn
94152c4d35
Remove warning for unused camel case vendor extension for Qt5 client and server (#5731) 2020-03-29 13:06:41 +02:00
William Cheng
77c1907f51
better readme, type mapping, new option (#5740) 2020-03-29 14:33:42 +08:00
William Cheng
53a230a9a3
better appveyor test (#5739) 2020-03-29 12:55:22 +08:00
Hemant Zope
2f9c20a175
[C] fix decode funtion (#5642)
* fix function names and add parameter to return decoded bytes length from base64decode function

* format base64decode function to avoid unnecessary malloc and fix wrong length assigning

* update the pointer assigning

for some reason var++ / *var++ cannot be done on int *var, hence making a local variable which is incremented and at the end it is assigned to the pointer.
2020-03-27 23:16:20 +08:00
val
bb2112f3de
[C++] [Qt5] fixed cpp-client-qt5 HttpRequestWorker requests crashing on timeout... (#5651)
* - fixed cpp-client-qt5 HttpRequestWorker requests crashing on timeout when they have actually NOT timed out (were calling back into a deleted struct).

* #minor fixes after review

* Regenerate changed files

Co-authored-by: valentin Bisson <valentin@inrosoftware.com>
Co-authored-by: etherealjoy <sunn.ssb@live.com>
2020-03-27 16:00:26 +08:00
Matt Traynham
7baa1870b7
5211 - Use allVars instead of vars for Kotlin client (#5396) 2020-03-27 15:56:46 +08:00
William Cheng
a0ca253218
update samples (#5722) 2020-03-27 13:55:55 +08:00
William Cheng
c224cf484b
4.3.0 release (#5721) 2020-03-27 11:34:43 +08:00
Richard Whitehouse
cfe3b86d70
[Rust Server] Handle text/xml correctly (#5660)
* [Rust Server] Handle text/xml correctly

  Treat application/xml the same as text/xml as per RFC 7303

* [Rust Server] Add test for text/xml

* Update samples
2020-03-26 17:14:13 +00:00