34 Commits

Author SHA1 Message Date
William Cheng
9fcbdb95d9
[C#] avoid duplicated header in csharp client (restsharp) (#20421)
* avoid duplicated header in csharp client

* set env

* install openssl

* switch to windows
2025-01-09 15:36:49 +08:00
William Cheng
25283d46a7
Fix typo in various generators, templates (#20389)
* fix typo in various generators, templates

* update samples
2024-12-30 18:52:18 +08:00
Lewis Hazell
ff0fe26890
Fixes body of FormParameters in multipart/form-data requests without files sent by generated C# (RestSharp) (#20351)
* fix: set RestRequest flag to force multipart/form-data when given as Content-Type

* fix: removed serialization of FormParameters for multipart/form-data

* updated csharp-restsharp samples
2024-12-22 23:28:37 +08:00
martin-mfg
d87a70dd93
update sample tests, fix Java tests (#20300)
* replace removed forkMode

* remove junit runner where it's not needed

* update samples without skipping test files, but skip files named "FILES"

* revert overwriting custom tests, add custom java tests to list

* add one sample to CircleCI, fix various Java tests
2024-12-15 17:09:58 +08:00
BryanAldrich
f62aa5bd95
Add auth token refresh to csharp (#20234)
* quick edit to allow tokens to refresh if they specify an expires_in and created fields. Also supports refresh_token if that is passed.

* update samples

* fix compile error for projects without default using statement.
make the created date nullable.

* fix nullable de-reference on Created.

* fix to remove nullable reference types (the ! to remove the warning) and add documentation comments to the public members.
2024-12-07 13:52:35 +08:00
William Cheng
654f62ce3c
Prepare 7.11.0 (#20130)
* Revert "prepare 7.10.0 release (#20128)"

This reverts commit 12dfe8fe74a1515d1e69e00df9abe4128aa44160.

* update to 7.11.0-SNAPSHOT, update samples

* update docs
2024-11-18 20:15:29 +08:00
Alec Petersen
bbccd2827f
Replace MaxTimeout usage with Timeout, update Timeout to be a TimeSpan type (#19875) 2024-11-09 14:07:13 +08:00
DaveK-Rocketmakers
d9229c7b9f
fix(csharp): Fixed JsonConverter for discriminators only appearing on base classes (#19972)
* fix(csharp): Fixed JsonConverter for discriminators only appearing on base classes

* chore: Updated .NET samples
2024-11-09 13:55:02 +08:00
alfredo-accuris
9452873b99
[csharp] Mustache fully qualify namespace for Path (#19349)
* fix: csharp mustash fully qualify namespace Path

The generated code of Csharp get a fully quallify namespace for PATH

using Path = global::System.IO.Path;

* mend

* Remove alias for fully qualify Path class
2024-10-30 14:41:35 +08:00
Alec Petersen
b5b760a8a2
[csharp] Address obsolete build warnings in ApiClient (#19847)
* Stop using obsolete MaxTimeout

* Convert timeout to a timespan, rather than update the configuration object

* Use async overload of RestClientExtensions.Deserialize

* Update samples

* Fix typo

* Undo timeout change
2024-10-14 15:44:12 +08:00
William Cheng
e2c458b9ea
Prepare 7.10.0 (#19809)
* Revert "prepare 7.9.0 release (#19808)"

This reverts commit 4145000dfebe7a9edea4555c8515383da7602458.

* prepare 7.10.0 snapshot

* update doc

* update samples
2024-10-08 11:21:54 +08:00
devhl-labs
fb5e69f83a
[csharp][generichost] Fix invalid key name (#19633)
* fix invalid key name

* fix comment
2024-09-29 23:09:37 +08:00
Liri S
b4edca5ad4
Use multiline comments for examples in csharp generator (#19079)
* multi

* gen
2024-09-22 23:27:47 +08:00
William Cheng
1776c000ed
update C# restsharp to 112.0.0 (#19507) 2024-09-02 16:52:54 +08:00
William Cheng
91da2fd240
Prepare 7.9.0 snapshot (#19386)
* Revert "v7.8.0 release (#19385)"

This reverts commit 6bdc452f92d49dcac7ac21dfe8751c8cc4267b98.

* update samples for v7.9.0-snapshot
2024-08-19 16:14:51 +08:00
Filipe Silva
af94bde2ce
#19176 fix Task.Result directly blocks thread (#19231)
- async should never be blocked on the ApiClient
 To fix we invert the logic and use Task as base and keep consistency, we expect and wait result only on synchronous calls.
2024-08-04 18:33:33 +08:00
devhl-labs
aaeed0f5bd
use global keyword (#19257) 2024-08-04 17:55:57 +08:00
devhl-labs
2bc4a16af3
[csharp] Convert numbers to long when min/max is too big (#19290)
* convert numbers to long when min/max is too big

* handle exclusives
2024-08-04 17:50:54 +08:00
devhl-labs
755b2efee4
[csharp][generichost] Support response ranges (#19256)
* support response ranges

* revert unintended change

* update try deserialize methods
2024-07-29 16:33:27 +08:00
William Cheng
362d3b5aa1
[csharp] Add scope for oauth2 (#19234)
* feat: add scope for oauth2

* fix: add parameter AlwaysMultipartFormData

* fix: string to boolean

* fix: optional bool

* fix: null checks

* Optional string

* Remove all references to OAuthMultipartFormData

* Remove _multipartFormData = multipartFormData;

* Remove typo

* Run generate-samples and export_docs_generators

* Revert "Run generate-samples and export_docs_generators"

This reverts commit f051f268a564e6487626b0e0a9a5cebc6d198dc0.

* Switch to string.IsNullOrEmpty, add langVersion 8

* Add langVersion 8 in ConditionalSerialization

* Use regular strings for netstandard2.0

* Remove references to langVersion 8

* Fix variable

* Use template engine to toggle nullable string

* Trigger tests

* Generate samples

* Trigger build

* Use {{nrt?}}

* update samples

---------

Co-authored-by: Morten Jansrud <morten.jansrud@snokam.no>
2024-07-24 21:15:12 +08:00
William Cheng
20cfce0b4a
Prepare v7.8.0 (#19048)
* Revert "v7.7.0 release"

This reverts commit f3dd32385e02065ad298801ca11b8871bcb3a92a.

* prepare v7.8.0

* update readme

* update doc

* update samples
2024-07-02 16:45:53 +08:00
Ghufran Zahidi
3d93862c6d
OneOf should handle Inheritance based type (#18892) 2024-06-16 00:06:56 +08:00
Filipe Silva
8bac93e23b
[csharp] Improved apiclient.mustache (#18915)
* improved apiclient.mustache to keep it dry, sharing a single exec with Action<> delegate.

* updated samples and test

* Removed async from ApiClient.mustache

Updated samples

* Revert change to CSharpClientDeepObjectTest.java

* Fix async await (it was not waiting creating a null exception)

Updated samples

* Fix File IO namespace with using directive

* Improved comments on new methods

Added new DRY method DeserializeRestResponseFromPolicy

* Fix comments and parameters for new method DeserializeRestResponseFromPolicy

Updated samples
2024-06-15 17:54:14 +08:00
Filipe Silva
e8bbfe23b4
[csharp] fix system.web warning and removed unneeded fqn (#18902)
* Refactor validatable.mustache moved fqn types to using directive for cleaner code

Fix netcore_project.mustache conditional "System.Web", more details:
https://learn.microsoft.com/en-us/aspnet/core/migration/inc/adapters?view=aspnetcore-7.0

* updated csharp samples
2024-06-11 19:53:39 +08:00
Filipe Silva
7f34e11a7f
[csharp] Refactor anyOf model template (#18901)
* Refactor AnyOf model removed "this."

* Updated csharp samples
2024-06-11 18:43:27 +08:00
devhl-labs
91a1931bd9
[csharp][generichost] Add support for primitive composed (#18825)
* add support for primitive composed

* build samples again

* rebuild tests

* addressed comment
2024-06-04 12:38:53 +08:00
devhl-labs
ee3ff39225
fixed sorting (#18706) 2024-05-26 18:07:31 +08:00
William Cheng
63d1564637 update C# samples 2024-05-23 14:41:44 +08:00
William Cheng
741bf0c035
Prepare 7.7.0-SNAPSHOT (#18709)
* Revert "7.6.0 release"

This reverts commit d76f9d32d11a03be2b40ebff728ef0ff86332fcb.

* prepare 7.7.0 snapshot in master

* update samples
2024-05-20 17:27:17 +08:00
Phellippe Lima
e36172090e
fix: ExampleGenerator for composed child schemas and array schemas (#18479)
* fix: ExampleGenerator for composed child schemas and array schemas correctly

* fix: refactor to remove code duplication

* fix: fixes test assertion encoding

* fix: adds doc to new method
2024-04-30 14:36:49 +08:00
William Cheng
a5d463d90f
made the HttpSigning method public to get the signed header. (#18496)
Co-authored-by: Ghufran Zahidi <18732053+Ghufz@users.noreply.github.com>
2024-04-25 16:08:57 +08:00
William Cheng
807250a430
Prepare 7.6.0 (#18412)
* Revert "v7.5.0 release"

This reverts commit 1eafe2aebf33b13bee0ead66d62a6436e7db059d.

* update master to v7.6.0 snapshot

* update readme

* update samples
2024-04-17 19:05:37 +08:00
devhl-labs
370eca2889
[csharp] Update dependencies (#18263)
* version bump

* updated a workflow
2024-03-31 11:27:57 +08:00
devhl-labs
d0f8468651
[csharp] Rename samples (#18260)
* renamed OpenAPIClient-httpclient to Petstore

* updated bin artifacts

* renamed OpenAPIClientCoreAndNet47 to MultipleFrameworks

* updated bin artifacts

* renamed OpenAPIClient-net47 to Petstore

* renamed OpenAPIClient-net48 to Petstore

* updated bin artifacts

* renamed OpenAPIClient-restsharp-name-parameter-mappings to ParameterMappings

* updated bin artifacts

* renamed OpenAPIClientCore to Petstore

* updated bin artifacts

* renamed OpenAPIClient-net7.0-useDateTimeForDate to UseDateTimeForDate

* updated bin artifacts

* renamed OpenAPIClient-net5.0 to EnumMappings

* updated bin artifacts

* renamed OpenAPIClient-ConditionalSerialization to ConditionalSerialization

* updated bin artifacts

* renamed OpenAPIClient to Petstore

* updated bin artifacts

* renamed OpenAPIClient-unityWebRequest to Petstore

* updated bin artifacts

* updated appveyor

* updated bin artifacts

* updated bin artifacts

* comenting out a sample project with no csproj file

* updated bin artifacts
2024-03-31 10:36:42 +08:00