2199 Commits

Author SHA1 Message Date
Richard Whitehouse
28ea718004
[Rust Server] Run rustfmt over rust-server output (#5558)
* Run rustfmt over rust-server output

Automatically run rustfmt over rust-server output if --enable-post-process-file is set

* Update samples

* Add note about configuring post processing
2020-03-24 00:09:40 +00:00
Richard Whitehouse
15a2390fe5
[Rust Server] Flag responses as must use (#5559)
* [Rust Server] Flag responses as must use if there is more than a single option
* Update samples
2020-03-23 18:47:12 +00:00
Richard Whitehouse
806562bb05
[Rust Server] Retire mimetypes modules (#5560)
* Retire mimetypes module to prevent collision in mimetype identifiers
* Update samples
2020-03-23 13:04:29 +00:00
Richard Whitehouse
be983b5212
[Rust Server] Build APIs which have no available examples (#5561)
* [Rust Server] Build APIs which have no examples

* [Rust Server] Add test for APIs with no examples

* Update samples
2020-03-22 19:54:48 +00:00
Richard Whitehouse
b0520a346d
[Rust Server] Support multiple identical MIME types (#5562)
* Support multiple identical MIME types in a multipart request
* Add test for multiple identical MIME types
* Update samples
2020-03-22 15:30:37 +00:00
Richard Whitehouse
058d1d2aa0
[Rust Server] Return 405 Method Not Allowed (#5563)
* Return 405 Method Not Allowed if the path matches, but the method doesn't.
* Update samples
2020-03-22 11:57:36 +00:00
Richard Whitehouse
4aefc9ba33
[Rust Sever] Upgrade to openssl 0.10 (#5564)
* [Rust Server] Upgrade to openssl 0.10

Use hyper-openssl/openssl instead of hyper-tls/native-tls/openssl on Linux

* Update samples
2020-03-19 21:05:16 +00:00
sunn
8af3d6d9bf
Port client updates to server (#5634) 2020-03-19 16:34:59 +01:00
Aleksandr Nekrasov
5beccd12b6
[scala][templates] java 8 dates support (#5291)
* [scala][akka-http-client] java8 dates support

* scala-akka readme doc updated

* DateSerializers renamed

* rename serializers

* move date-library option to abstractScala

* generators docs updated

* enum defined for date libraries

* Backport to scala-http-client

* fix scala-akka-client date serializers

* fix typo in docs

* switch scala templates to java8 (jsr-310) date library by default

* update scala samples with java8 date library

* update scala generators docs with java8 default date library

* fix scala-play-server generator cli options as only java8 dateLibrary supported

* fix scalaz DateTimeCodecs template to support java8

* scalaz ci test againt java7 removed as it generate scala 2.11.8 client which is java8 based
2020-03-17 15:54:24 +08:00
Aleksandr Nekrasov
b40257f53a
fix default value for abstract scala and scalatra server impl (#5578) 2020-03-17 15:04:13 +08:00
Antoine Reilles
27175c71df
[jaxrs-cxf-cdi] Support PATCH httpMethod (#5574)
Update the required CXF version to 3.1.2 since PATCH support appeared
with this version.

Add the cxf PATCH annotation to the imports so that the generated code
when defining a PATCH api compiles.
2020-03-17 14:59:35 +08:00
Richard Whitehouse
16646b39c1
[Rust Server] Make parse error Display-able (#5490)
* [Rust Server] Make parse error displayable

  Change error type to be displayable to prevent compile errors

* [Rust Server] Add test for enum in path

* Update samples
2020-03-08 11:12:17 +00:00
Richard Whitehouse
e4be8a107f
[Rust Server] Test allOf objects including base properties (#5457)
* [Rust Server] Add operationIds for rust-server-test

* [Rust Server] Add test for allOf

* Update samples
2020-03-07 20:53:13 +00:00
Richard Whitehouse
b60fc900b2
[Rust Server] Support OpenAPI v3 callbacks (#5405)
* [Rust Server] Support Callbacks

* [Rust Server] Support callbacks in the examples

* [Rust Server] Update features documentation

* [Rust Server] Mark as supporting callbacks

* Update samples

* [Rust Server] Add tests for callbacks

* [Rust Server] Fix README

Don't suggest examples which don't exist
2020-03-07 19:24:42 +00:00
Yuriy Belenko
39aeb4a8ae
[Slim4] Add Data Mocker middleware (#4978)
* [Slim4] Store response schemas

* [Slim4] Add Data Mocker middleware

* [Slim4] Enhance Slim router

* [Slim4] Enhance config

* [Slim4] Fix data format key in object mocking

* [Slim4] Add tests for Data Mocker middleware

* [Slim4] Add Mock feature documentation

* [Slim4] Refresh samples
2020-03-03 23:53:57 +08:00
William Cheng
4ac054f723
Hide timestamp in Scala Play server samples (#5495)
* hide timestamp in scala play server output

* add chameleon82 to scala tech committee
2020-03-02 14:56:07 +08:00
Aleksandr Nekrasov
6dd76d65e7
[scala] [template] scala model property style (#5486)
* Model property naming style generic for scala

* scala templates based on abstractScala regererated

* docs generators updated

* property format tests
2020-03-02 11:48:09 +08:00
Jorge Rodriguez
21e285cea9
[BUG] [JAVA | Spring] Cookie in parameter is not correctly generated (#5393)
* Cookie in parameter is not correctly generated

* gh-5386: Fix cookie parameter in

* gh-5386: Fix cookie parameter in

* gh-5386: Update test file

* gh-5386: Fix cookie parameter in

* gh-5386: Fix cookie parameter in

* gh-5386: Regenerate samples

* gh-5386: Fix test

* Added Spring CookieValue tests

Co-authored-by: Gonzalo <gonzalo.nom.es@gmail.com>
2020-03-01 23:12:20 +08:00
Mateusz Szychowski (Muttley)
4c6648f1a9
[C++] Add an option to allow having lowercase variables in models, Pistache: allow using reservedWords in models (#5434)
* [C++][Pistache] Use reserved words to replace incorrect names

discard old decision to truncate reservedWords

* [C++][Pistache] Update struct model to use name instead of baseName

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

* [C++] Add option to have lowercase variables

* [C++] Update generated docs
2020-03-01 12:39:45 +01:00
Yutaka Miyamae
015b404729
[kotlin]Fix ktor doesn't generate nullable types (#5258)
* If not required, need `? = null`

* run  ./bin/kotlin-server-petstore.sh

* Added `?` when value is `required` and `isNullable`

* Rerun ./bin/kotlin-server-petstore.sh. But No differences
2020-03-01 17:58:58 +08:00
Richard Whitehouse
dc0da57f96
[Rust Server] Suffix reserved words with _ (#5455)
* [Rust Server] Suffix reserved words with _

Suffix reserved words with an underscore instead of prefixing them.

This follows convention in the Rust community, as prefixing with an underscore
indicates an unused variable in Rust.

* Update samples
2020-03-01 00:23:00 +00:00
Richard Whitehouse
a196296e57
[Rust Server] Support RFC 7386 (#5454)
* [Rust Server] Support RFC 7386

Support application/merge-patch+json as defined by RFC 7386 -
https://tools.ietf.org/html/rfc7386

Handle exactly the same as application/json.

* [Rust Server] Add test for RFC 7386

* Update samples
2020-02-29 21:54:11 +00:00
Richard Whitehouse
f32b1463bc
[Rust Server] Support numeric operation IDs (#5453)
* [Rust Server] Support operation IDs which begin with a number
* [Rust Server] Add test for a numeric operation ID
* Update samples
2020-02-29 19:23:54 +00:00
Richard Whitehouse
a6e96b4971
[Rust Server] Handle numeric response description (#5452)
* [Rust Server] Handle response descriptions which start with a number.
* [Rust Server] Add test for numeric response descriptions
* Update samples
2020-02-29 14:54:47 +00:00
Richard Whitehouse
f5c5b91f83
[Rust Server] Nullable fixes (#5408)
* [Rust Server] Nullable fixes
* [Rust Server] Add tests for nullable cases
* Update samples
2020-02-29 13:37:12 +00:00
Justin
857a4bf5d9
Use the dataType if the baseType is not set (#5372)
* Use the dataType if the baseType is not set

* add tests for passing enum as parameter

* updated requirements file in samples

* Update spec to explicitly name objects and prevent `inline_object`

* use the correct scripts to generate samples (`bin/openapi3/python-flask*`)
2020-02-28 09:46:57 -08:00
Aleksandr Nekrasov
84250973be
[scala] strip model class name for all scala generators (#5439)
* stripped parameter enabled for all scala based generators

* scala samples updated

* docs generators updated

* fix scalatra. regenerated by openapi3 script.
manually removed enum default value from scalatra example due bug in schema extraction
2020-02-28 20:44:02 +08:00
Richard Whitehouse
ca9376fdbb
[Rust Server] Support RFC 7807 (#5407)
* Support RFC 7807 - Problem Details for HTTP APIs
* Add test for RFC 7807
* Update samples
2020-02-26 18:18:01 +00:00
William Cheng
54c2956461
[Erlang][Server] fix import for multiple API key auth (#5424)
* fix multi api key import in erlang server

* update samples

* better code format for cpp server generator
2020-02-25 16:43:01 +08:00
Sem Schilder
c0fcffdfe4
Add return types to getter and fluent setter (#5348)
* Add return types to getter and fluent setter

* Add build example output
2020-02-25 11:46:43 +08:00
Richard Whitehouse
1b3094be87
[Rust Server] Add support for untyped properties and models (#5339)
* [Rust Server] Add support for untyped properties
* [Rust Server] Improve support for untyped data
* Update samples
2020-02-22 20:29:51 +00:00
Richard Whitehouse
71aef72bbd
[Rust Server] Support objects as query parameters (#5338)
- Support objects as query parameters
- Update samples
2020-02-22 18:25:57 +00:00
Richard Whitehouse
71f532072b
[Rust Server] Support header objects (#5337)
[Rust Server] Support header objects

Support operations with objects in the header
2020-02-22 15:55:26 +00:00
William Cheng
118b5e7747
[C++] minor improvements (#5319)
* minor code format, make sure cpp samples updated

* add new files
2020-02-14 10:58:15 +01:00
Keenan Pepper
9126a5636f
Use EXISTING_PROPERTY for JavaSpring as well (#5243)
This fixes issue #3796 for JavaSpring. It's a very straightfoward extension
of #5120 for the JavaSpring generator (that PR was just for the Java generator).
2020-02-08 09:09:46 -05:00
fritzlitester
a0eb149df5
Fix query parameter (#5131)
* fix map as query parameter, use RequestPart instead of RequestParam in
FormParams, add filename for parameters of type file

* fix brace

* fix tests

* run bin/windows bat files

* test if this solves linending problem part 1

* test if this solves linending problem part 2

* test if this solves linending problem part 3

* test if this solves linending problem part 4

* test if this solves linending problem part 5

* test if this solves linending problem part 6

* manually set back version in pom

* update spring samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-02-04 22:08:36 +08:00
William Cheng
100b01844a Merge remote-tracking branch 'origin/master' into 5.0.x 2020-02-04 15:31:10 +08:00
William Cheng
b36b65964f update kotlin samples 2020-02-03 16:32:31 +08:00
William Cheng
03a59046f4 Merge remote-tracking branch 'origin/4.3.x' 2020-01-31 19:00:28 +08:00
Yutaka.Miyamae
8214460ec5
Add deprecated annotation in kotlin-spring (#5090)
* add Deprecated in kotlin dataClass

* add deprecated in CodegenProperty

* format (Column limit: 100)

* set property.deprecated

* add test

* run ./bin/kotlin-springboot-petstore-all.sh

* trim space
2020-01-29 16:30:33 +08:00
Richard Whitehouse
84b6804d8f [Core, Rust Server] Support multipart/related requests (#5015)
* [Core, Rust] Support multipart/related requests

* Treat multipart/related as a type of form data
2020-01-26 20:39:43 -05:00
Richard Whitehouse
52e09e2ffa
[Rust Server] Handle array of objects inside an object correctly (#5044)
Use correct data type for arrays inside objects.

Add test for arrays of objects

Update samples
2020-01-25 18:23:20 +00:00
Richard Whitehouse
2714af4922
[Rust Server] Sanitise enum values (#5042)
[Rust Server] Sanitize enum values
2020-01-25 16:26:05 +00:00
Richard Whitehouse
32222da435
[Rust Server] Add support for primitive arrays (#5041)
[Rust Server] Add support for primitive arrays
2020-01-25 16:25:20 +00:00
Yuriy Belenko
0366e946ba [Slim4] Add string formats support to Data Mocker (#4975)
* [Slim4] Support byte data format

* [Slim4] Support date and date-time data formats

* [Slim4] Support password data format

* [Slim4] Support uuid data format

* [Slim4] Fix test of password format mocking

'00000' is numeric type, because PHPUnit doesn't make strict type
comparison.

* [Slim4] Fix data format key in object mocking

* [Slim4] Support binary data format

* [Slim4] Support email data format

* [Slim4] Base64 encode binary format output

Raw bytes string breaks PHP stdout output, so I've decided to use base64
encoding format for binary format too.

* [Slim4] Refresh samples
2020-01-23 16:18:18 +08:00
Mateusz Szychowski (Muttley)
6af27d52ca [C++][Pistache] Rename value holder to lower chance of collision with parameter name (#4948)
* [C++][Pistache] Rename value holder to lower chance of collision with parameter name

* [C++][Pistache] Update Petstore sample
2020-01-21 00:47:26 +01:00
Jim Schubert
2bc3c196e8
[aspnetcore] Fix duplicate enums (#5059)
* [aspnetcore] Fix duplicate generation of enums

Fixes template issue where enums defined within a class were generated
regardless of whether they were a complexType (externally defined
"model") or an inlined enum.
2020-01-20 16:37:15 -05:00
William Cheng
82e2448bf2 Merge remote-tracking branch 'origin/4.3.x' into 5.0.x 2020-01-20 15:46:13 +08:00
William Cheng
04af5e0445 Merge remote-tracking branch 'origin/master' into 4.3.x 2020-01-20 15:04:34 +08:00
Sebastien Rosset
d61dcc17e0 [gradle] consistent use of maven url in gradle files (#5045)
* wrap maven url with uri function

* consistent use of maven url in gradle files
2020-01-19 14:57:38 -05:00