249 Commits

Author SHA1 Message Date
William Cheng
370d0e82f8 update samples 2021-01-31 14:27:46 +08:00
Matthew Dowdell
b4154be8d0
[Rust Server] Add support for Bearer token authentication (#7840)
* [rust-server] Add support for Bearer auth

- Added bearer auth to the security features for rust server
- Supplemented the basic auth condition in the context template to handled basic auth and bearer auth separately.
- Repurpose an exising sample to confirm the code generation works as expected.

* Update docs

* Update readme for bearer tokens
2021-01-30 12:07:46 +00:00
Richard Whitehouse
4ea4ceb0ff
[Rust Server] Serializable responses (#8516)
* [Rust Server] Make responses serializable

* Update samples
2021-01-30 11:49:42 +00:00
Richard Whitehouse
c15a4375e2
[Rust Server] Cargo Metadata Configuration (#8519)
* [Rust Server] Support Cargo Metadata Configuration

This adds support for publish, repository, documentation and homepage metadata.

* [Rust Server] Test Cargo Metadata configuration
2021-01-30 11:49:18 +00:00
William Cheng
694b10e41c Merge remote-tracking branch 'origin/5.1.x' into 6.0.x 2021-01-28 16:47:55 +08:00
William Cheng
d97717ee24 Merge remote-tracking branch 'origin/master' into 5.1.x 2021-01-28 15:52:44 +08:00
Richard Whitehouse
5f2ca61862
[Core, Rust Server] anyOf / oneOf support for Rust Server (#6690)
* [Core] Inline Model Resolution of Enums

Enums need to be named types, so handle them as part of inline model resolution

* [Rust Server] Handle models starting with a number correctly

* [Rust Server] Additional trace

* [Rust Server] Add support for oneOf/anyOf

* [Rust Server] Update supported features

* [Rust Server] General template tidy up

* [Rust Server] Implement IntoHeaderValue for wrapped data types

* [Rust Server] Convert from string correctly

* [Rust Server] Test for anyOf/oneOf

* Update samples

* Update docs
2021-01-23 21:32:51 +00:00
Richard Whitehouse
a61b7bbc65
[Rust Server] Reinstate tests (#8477)
* Revert "comment out rust server tests (#8440)"

This reverts commit 32b01cb39bea5bc0d006e9d31d41afedf4dcab29.

* Update to swagger-rs 5.0.2

* Update samples for swagger-rs 5.0.2

* Update swagger multipart usage

- swagger/multipart renamed multipart_form
- Update boundary call

* Update samples
2021-01-20 23:16:54 +00:00
William Cheng
25b0cbe2f1
Prepare 5.0.1 snapshot (#8249)
* update version to 5.0.1-SNAPSHOT

* update samples

* update meta codegen
2020-12-21 17:14:18 +08:00
William Cheng
4261252491 prepare 6.0.0 snapshot release 2020-12-21 16:39:40 +08:00
William Cheng
345b68a107 prepare 5.1.0 snapshot release 2020-12-21 16:35:12 +08:00
William Cheng
d7d5e53f2b
Prepare v5.0.0 release (#8247)
* update to 5.0.0

* update samples
2020-12-21 13:04:11 +08:00
William Cheng
0be3fe6104
Set skipFormModel to true by default (#8125)
* set skipFormModel to true by default

* update tests

* regenerate ruby faraday client

* remove inline object spec files

* more clean up on inline object files

* update samples
2020-12-18 23:57:19 +08:00
Cody Mikol
f9d6c6fb21
CHORE[DEPENDENCIES]: bump swagger-parser => 2.0.22 (#7597)
this fixes a bug where the parser would return
null when missing parameters rather than reporting
some useful error.

Fixes N/A
2020-12-08 15:18:07 +08:00
William Cheng
2578ef5e63
Prepare snapshot (v5.0.0) (#7986)
* Revert "prepare 5.0.0-beta3 release"

This reverts commit 3ebe774df37b43348bac1310a272de53a2d7040b.

* revert to snapshot

* update samples
2020-11-20 19:19:59 +08:00
William Cheng
2715f1371a
Prepare 5.0.0 beta3 (#7984)
* prepare 5.0.0-beta3 release

* update samples

* remove beta3 from readme
2020-11-20 15:18:58 +08:00
Justin Black
08fb59009a
Removes secondaryParam and hasMore (#7882)
* Removes secondaryParam and hasMore

* Fixes tests

* Only uses bodyParam in groovy template
2020-11-07 11:04:12 +08:00
Matthew Dowdell
8c11c8f582
[Rust Server] Fix server example on non-Linux (#7399)
* [Rust Server] Fix server example on non-Linux

The server example is broken because it tries to import `use openssl::ssl::SslAcceptorBuilder;` unconditionally when it won't be present on MacOS, Windows or iOS and then conditionally provides `create` causing compile errors on the aforementioned platforms.

To fix, we simply move the condition from the function to the import and all is happy again :)

* Update Samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-10-05 21:54:50 +01:00
William Cheng
2fd23f505e
Prepare 5.0.0-SNAPSHOT (#7347)
* Revert "Prepare 5.0.0-beta2 release (#7345)"

This reverts commit 212b4f784742744b7b238607dcefb23ec9db64d7.

* update readme
2020-09-04 15:31:54 +08:00
William Cheng
212b4f7847
Prepare 5.0.0-beta2 release (#7345)
* update version

* update doc

* update samples
2020-09-04 13:03:45 +08:00
Yuriy Belenko
6a08ec59c0
[core] Add type and format properties to model of inline response (#6153) 2020-08-03 18:37:37 -04:00
wing328
748190a049 update samples 2020-06-16 11:24:56 +08:00
Richard Whitehouse
c094effd90
[Core, Rust Server] Support JSON query parameters (#6577)
* [Core] Record content type for parameters

* [Rust Server] Support query parameters in JSON

* [Rust Server] Add test for JSON query parameter

* Update samples
2020-06-15 23:06:03 +01:00
Richard Whitehouse
45655c2235
[Rust Server] Support arrays within additional properties (#6576)
* [Rust Server] Support arrays within additional properties

* [Rust Server] Add test for additional properties with lists

* Update samples
2020-06-15 23:05:35 +01:00
Richard Whitehouse
3ba787c5aa
[Core, Rust Server] Support optional headers (#6575)
* [Core] Set whether a header is required

* [Rust Server] Support optional headers

* [Rust Server] Add test for required header

* Update samples
2020-06-15 23:05:11 +01:00
Richard Whitehouse
c65363eb71
[Rust Server] Pass context to client middleware (#6574)
* [Rust Server] Pass context to client middleware

When creating a client with middleware, pass the context.

This allows users to pass contextual data about the requests through to the
client middleware.

* Update samples
2020-06-15 23:03:25 +01:00
Richard Whitehouse
82410ae90b
[Rust Server] Hyper 0.13 + Async/Await support (#6244)
* [Rust Server] Hyper 0.13 + Async/Await support

Upgrade dependencies to Hyper 0.13 and use async/await.

* [Rust Server] Add missing hyper-tls dependency

* [Rust Server] Add missing models import

* Update samples
2020-05-29 15:18:30 +01:00
Jim Schubert
70ca93570e
[core][general] Add metadata file tracking to aid in "Golden Tests" regeneration (#6325) 2020-05-22 16:48:32 -04:00
William Cheng
b23ec9a7dd
map any type in rust server generator (#6209) 2020-05-08 10:11:58 +08:00
William Cheng
98e54f0cc1 Merge remote-tracking branch 'origin/5.0.x' 2020-05-07 14:27:56 +08:00
Richard Whitehouse
046b4acdff
[Rust Server] Support boolean headers, and fix panic handling headers (#6056)
* [Rust Server] Support headers containing booleans

* [Rust Server] Fix panic handling headers

* [Rust Server] Fix issue with Results

* Update samples
2020-05-06 19:27:52 +01:00
William Cheng
4beea9d90d update samples 2020-05-07 00:30:12 +08:00
Richard Whitehouse
f36a319316
[Rust Server] Rust 2018 Edition (#5942)
* [Rust Server] Rust 2018 Edition
* [Rust Server] Fix unused warning
* Update samples
2020-04-26 12:00:46 +01:00
Andy.Yang.cn
d911fd73bd
[Rust Server] Bugfix #5948 (Generated client code "Disabled because there's no example") (#5949)
* [Rust Server] Fix RustServerCodegen type: object example "Disabled because there's no example" issue.

* [Rust Server] Add test case yaml with "Disabled because there's no example" issue.

* [Rust Server] Fix example-client-main param.example character escaping issue with raw string.

* [Rust Server] Add test case yaml new generated code after fix.
2020-04-24 11:04:36 +08:00
Andy.Yang.cn
38dfed4104
[Rust Server] Fix #5947 multi tag generate multi method issue. (#5928)
* [Rust Server] Fix issue with multiple tags on an operation generating duplicate methods.

* [Rust Server] Add test case yaml with multiple tags on a single operation.
2020-04-22 18:00:21 +01:00
Richard Whitehouse
2cd5bc45da Update samples 2020-04-20 18:43:19 +01:00
William Cheng
faf6f197be Merge remote-tracking branch 'origin/master' into 5.0-sync-master 2020-04-17 15:51:00 +08:00
Bodo Graumann
896867b5e7
Use model as body param for generateAliasAsModel (#4569)
* generateAliasAsModel: Use model name as body param

* Update samples
2020-04-17 13:36:27 +08:00
Andy.Yang.cn
c3837ca331
[Rust Server] Fix #5906 (yaml with path parameter error) (#5871)
* [Rust Server] Fix Rust 1.39+ "Box<Future" and "as &Has" compile issue

* [Rust Server] Fix Rust server side pathRegEx and baseName not match issue

* [Rust Server] Add test case yaml with path parameter.
2020-04-15 17:19:00 +01:00
Richard Whitehouse
95105cef2e
[Rust Server] Support complex query parameters (#5831)
* [Rust Server] Support complex query parameters

* [Rust Server] Remove unused extern crate

* [Rust Server] tokio should be a dev-dependency

* [Rust Server] Add test for complex query params

* Update samples

Co-authored-by: Matt Williams
2020-04-12 19:57:50 +01: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
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
a0ca253218
update samples (#5722) 2020-03-27 13:55:55 +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
Richard Whitehouse
cff1f1ce80
[Rust Server] Support operation overriding server path on client (#5554)
* [Rust Server] Support operation overriding server on the client

* [Rust Server] Test operation overriding sever

* Update samples
2020-03-24 16:41:11 +00:00
Richard Whitehouse
05ace4f43f
[Rust Server] Preserve path provided in base path (#5555)
* Preserve path provided in base path
* Update samples
2020-03-24 09:25:48 +00:00
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