40 Commits

Author SHA1 Message Date
Justin Black
43375b9392
Upgrades swagger parser to 2.1.1, allows ingestion of 3.1.0 specs (#13133)
* Upgrades swagger-parser

* Removes additional property and halting of spec processing

* Updates tests

* Docs updated
2022-09-17 08:33:47 -07:00
William Cheng
fe8fbaf923
[Rust Server] Generate operations where tags require sanitization (#12996)
* [Rust Server] Render operations for sanitized tags

* [Rust Server] Add test for sanitized tags

* Update samples

Co-authored-by: Richard Whitehouse <richard.whitehouse@metaswitch.com>
2022-07-23 14:25:05 +08:00
William Cheng
12cdacabbf
[Inline model resolver] better handling of inline responses and bug fixes (#12353)
* better handling of inline response schemas, bug fixes

* update samples

* add new files

* better code format

* remove unused ruby files

* fix java test

* remove unused js spec files

* remove inline_response_default_test.dart

* fix webclient tests

* fix spring tests
2022-05-13 10:17:59 +08:00
William Cheng
df05e6f4bc
Update parser to 2.0.29 (#11388)
* update parser to 2.0.29

* better handling of null in dereferencing

* update parser to 2.0.30

* update core to newer version

* add new files

* rollback to previous stable version

* remove files

* Fixes for python-experimental NullableShape component

Co-authored-by: Justin Black <justin.a.black@gmail.com>
2022-02-21 18:37:52 +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
Yuriy Belenko
6a08ec59c0
[core] Add type and format properties to model of inline response (#6153) 2020-08-03 18:37:37 -04: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
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
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
William Cheng
faf6f197be Merge remote-tracking branch 'origin/master' into 5.0-sync-master 2020-04-17 15:51:00 +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
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
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
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
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
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
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
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
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
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
William Cheng
50f7e14a99 update samples 2020-01-14 23:07:37 +08:00
Richard Whitehouse
0c92b0c4a4
[Rust Server] Handle multiple response type (#4441)
- Ensure response IDs are unique, even if the first sentence is identical
- Handle responses where different responses produce a different type of data
- Use the correct mime type for plain text and byte streams
- Tidy up whitespace in client-mod.mustache
- Specify locale for String.format
- Add test for multiple response types
- Update samples
2019-12-24 15:09:22 +00:00
Richard Whitehouse
de162f7f34
[Core, Rust Server, ASP.NET Core] Fix Codegen Operation Scope Consistency (#3495)
Fix Codegen Operation Scope Consistency

- Filter scopes based on operation

- Partially revert #1984 to not rely on custom attributes as to whether scopes exist

- Fix filtering global authentication schemes
2019-11-08 13:30:35 +00:00
Richard Whitehouse
4538db92a2
[Rust Server] Support parameters correctly in response headers (#3669)
[Rust Server] Compile responses with headers

* Add test for response with headers

* Update samples
2019-09-15 15:54:38 +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
Richard Whitehouse
31734c2717 [Rust Server] Support octet stream body param (#2725)
Add support for having a required octet stream as a body parameter.
2019-05-07 18:45:07 +08:00
William Cheng
c4563009c7 update rust server samples 2019-04-22 22:27:55 +08:00
William Cheng
8408e0235b Revert "update rust samples"
This reverts commit f83d09fc01b2f5a37beff34c18d02d3d43a48370.
2019-04-22 22:26:33 +08:00
William Cheng
f83d09fc01 update rust samples 2019-04-22 21:57:31 +08:00
William Cheng
fab980cf79 update samples 2019-04-22 13:57:59 +08:00
Richard Whitehouse
f14bac8d7d [Rust Server] Improve XML support (#2504)
- Restore XML namespace support

- Remove non snake case rust warning for xml wrap_in methods

- Add XML rust-server tests

- Fix wrapping XML arrays when a property of another object

- Run all tests, not just those for OpenAPI 2.0

- Force wrapping for rust-server
2019-04-22 12:05:40 +08:00