68 Commits

Author SHA1 Message Date
devhl-labs
368110a631
[csharp][generichost] Added 4.8 samples (#18791)
* added 4.8 samples

* easer to understand diff

* build samples again

* build samples again
2024-06-01 16:17:58 +08:00
devhl-labs
b19fc67a53
added framework support (#18776) 2024-05-29 20:58:52 +08:00
devhl-labs
3bb17efa09
fixed issue (#18309) 2024-04-06 11:05:43 +08:00
devhl-labs
858499ffdd
[csharp][generichost] Form models (#18264)
* rename a bin artifact

* add support for form models

* revert sample changes

* revert sample changes

* build samples

* build samples
2024-04-01 13:12:03 +08:00
devhl-labs
2fac8e34db
[csharp][generichost] Updated UseSourceGeneration (#18265)
* updated UseSourceGeneration

* updated UseSourceGeneration

* updated UseSourceGeneration
2024-04-01 11:49:13 +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
devhl-labs
d1860b95cf
[csharp] Move samples (#18217)
* moved manual tests

* moved allOf

* moved anyOf

* moved oneOf

* moved OpenAPIClient-generichost-net6.0

* moved OpenAPIClient-generichost-net6.0-nrt

* moved OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration

* moved OpenAPIClient-generichost-net7.0-useDateTimeForDate

* moved OpenAPIClient-generichost-netstandard2.0

* moved OpenAPIClient

* moved OpenAPIClient-ConditionalSerialization

* moved OpenAPIClient-httpclient

* moved OpenAPIClient-net5.0

* moved OpenAPIClient-net7.0-useDateTimeForDate

* moved OpenAPIClient-net47

* moved OpenAPIClient-net48

* moved OpenAPIClient-restsharp-name-parameter-mappings

* moved OpenAPIClient-unityWebRequest

* moved OpenAPIClientCore

* moved OpenAPIClientCoreAndNet47

* renamed standard2 to standard2.0

* renamed standard2 to standard2.0

* fixed workflows

* renamed workflows

* updated bin artifacts

* updated bin artifacts

* pinned the samples to their version

* renamed bin artifacts

* update bin artifact

* update bin artifact

* update bin artifact

* updated appveyor

* reverting changes bc git does not show the rename

* commiting all but the file rename for these two files
2024-03-25 09:14:34 +08:00
William Cheng
bab67e44e4
add -SkipPublisherCheck (#16610) 2023-09-18 17:37:52 +08:00
William Cheng
7c67f731bc
Rename csharp-netcore to csharp (#15903)
* rename csharp-netcore to csharp

* rename file

* renmae modules/openapi-generator/src/main/resources/csharp-netcore

* update samples

* mv dir

* update samples

* rename csharp-netcore to csharp in appveyor.yml

* update doc
2023-06-25 11:08:59 +08:00
William Cheng
421bcd1787
Decommission csharp client generator (#15708)
* remove csharp client generator

* update samples/docs
2023-06-02 20:42:29 +08:00
William Cheng
5018d3c131
Update to JDK11 (#15553)
* update to jdk11, fix tests

* update workflow to use jdk11 instead

* update travis, circleci build

* fix test failure, update CI

* skip mvn install in appveyor

* add windows tests

* fix workflow

* remove log level

* add timeout

* sleep more

* skip tests

* sleep more

* only skip tests

* test with jdk11 only

* fix gradlew

* remove skip tests

* start server after build

* update gradle version

* more time to start server

* update to 420

* comment out build

* update

* update
2023-05-21 16:22:44 +08:00
William Cheng
e758e4a49a
Improve Appveyor tests (#15585)
* use docker

* update

* skip httpclient

* update

* sleep 120

* use cmd

* restore tests

* sleep 120

* clean up

* skip
2023-05-21 15:56:51 +08:00
Eric Haag
792d44d797
Use Gradle 7.6 to build Gradle plugin (#13860)
* Upgrade Gradle plugin Gradle build to Gradle 7.5.1

* Update Travis workflow file to support new tasks

* Update Maven POM with Gradle 7.5.1

* Capitalize many occurrences of "Gradle" in the Gradle plugin README

* Update Gradle version in appveyor.yml and shippable.yml

* Update comments

* Update Gradle wrapper to 7.5.1

* Capitalize Gradle in shippable.yml

* Leave Open API

* Upgrade Gradle plugin build to Gradle 7.6

* Upgrade wrapper to Gradle 7.6
2022-11-30 10:57:53 +08:00
William Cheng
67067b1b3c comment out csharp tests 2022-11-20 16:13:32 +08:00
William Cheng
1f7824c083 use Visual Studio 2022 in appveyor 2022-11-18 01:07:39 +08:00
William Cheng
d46189bb28
Add .net framework 4.8 support (#13504)
* add .net framework 4.8 support

* add dependency, test in appveyor

* update doc
2022-09-26 11:02:39 +08:00
William Cheng
a7e92786df
[PowerShell] add more tests to powershell client (#12057)
* add more tests to powershell client

* update spec

* update method name

* add new file
2022-04-06 10:24:32 +08:00
William Cheng
c9118d6982
[C#] test .net6 projects in Github actions (#11544)
* test .net 6 in github workflow

* trigger workflow

* fix run

* fix test

* trigger build

* update samples
2022-02-08 11:14:11 +08:00
devhl-labs
fcce44ab9b
[csharp-netcore] Add generichost samples (#11451)
* added generichost samples

* build samples

* added guid

* build samples
2022-02-05 17:53:26 +08:00
William Cheng
b3ec7faa8f
Update Maven to 3.8.3 in Appveyor CI (#10771)
* update mavne to 3.8.3 to fix appveyor build failure

* update folder name
2021-11-03 23:48:18 +08:00
Nathan Baulch
5d68bd6a03
Fix thousands of spelling typos (#10272) 2021-08-28 22:58:24 +08:00
Ghufran Zahidi
90233d6653
conditional serialization add only those property which user wants to… (#9807)
* conditional serialization add only those property which user wants to configure.

* fixed the samples

* fixed the sample String to string issue.

* fixed the sample String to string issue.

* updated the sample

* Added unit test for conditional serialization

* update samples

* remove trailing spaces, update samples

* remove files

* add back files

* build the project in the ci

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-06-29 20:28:47 +08:00
William Cheng
0e93e79cd6
Fix Appveyor CI issues (#9731)
* sleep for 15 seconds after starting the server

* fix sleep

* set clone depth to 1
2021-06-09 14:53:44 +08:00
William Cheng
14c7f39c2b
[C#][netcore] Add multiple frameworks support (#9196)
* add multiple frameworks support

* test in appveyor

* update samples
2021-04-09 21:25:56 +08:00
William Cheng
bedfe156bb
specify name (#9051) 2021-03-23 19:59:27 +08:00
William Cheng
f7b2baf38e
Add ApiClient.mustache for http client library (#8859)
* add api client mustache for http client

* clean up api client template for restsharp

* test c# httpclient in appveyor

* remove apiclient.cs

* regenerate apiclient.cs

* set library for http client

* remove Libraries

* use libraries folder
2021-03-02 10:52:05 +08:00
William Cheng
55292dd22b
Add ASP.NET Core 5.0 support (#8717)
* add aspnet core 5.0 support

* skip overwriting Org.OpenAPITools.csproj

* update doc

* update doc
2021-02-17 18:58:13 +08:00
William Cheng
62eecabfa5
[csharp-netcore] add .Net 5.0 support (#8467)
* add net5.0 support to csharp-netcore client gen

* update doc

* update samples
2021-01-19 22:38:34 +08:00
William Cheng
a2e5d274d6
Test ASP.Net core projects in AppveyorCI (#8239)
* test aspnetcore server in appveyor

* update samples

* to break the build

* Revert "to break the build"

This reverts commit ab230628155ee804c3bf00bcce98a08fd89f753f.

* ignore csproj. update samples
2020-12-19 21:02:13 +08:00
William Cheng
70323adf9f
[C#] support .NET framework 4.7 (#7833)
* add net47 support to the csharp generator

* update doc, fix appveyor
2020-10-29 22:41:08 +08:00
William Cheng
50f3706c5c
Add gitignore to C# 2.0, Nancyfx generators (#7776)
* add gitignore to c# 2.0, nancyfx generators

* comment out csharp netstandard
2020-10-22 15:43:32 +08:00
William Cheng
b7b009082a
Update csharp-netcore dependencies to the latest stable version (#7194)
* update csharp-netcore dependencies

* update test sdk version

* set tests.sdk version to 15.9.2

* rearrange test

* vs 2019 image

* rollback to v4.61.0

* update Microsoft.NET.Test.Sdk version

* Revert "update Microsoft.NET.Test.Sdk version"

This reverts commit 7a86bfc4151d5d23667129e242ad911db5d33598.

* rollback Microsoft.NET.Test.Sdk
2020-08-17 14:51:31 +08:00
HenningWaack
e4c858cd25
[gradle] Enabling up-to-date checks and gradle caching for openapigenerator tasks (#6716) 2020-08-09 21:40:19 -04:00
Jim Schubert
60ceded171
[ci][cli] Moving ensures script to config-based batch generation of samples (#6509)
* Ensure CLI-level generator settings are available in additional properties

* Initial conversion to yaml configs

Configs prefix with 1- need to be manually evaluated.

* Add "other" configs not in ensure-up-to-date

* Add other/openapi3 files

* Cleanup all generation scripts

* Clean up: add missed configs and fix some openapi 3 diffs

* Move generate-samples script, error on batch failures

* Temporarily disable elm which requires skip validation of spec

* CI updates (todo: run all generators through appveyor or move to github workflows)

* Add success count to batch generation command output

* [samples] Regenerate

* Remove bin/windows

* Generate swift5 samples in bitrise

* Expand user input glob pattern

* Regenerate samples

* Update PR template

* Support config based generateAliasAsModel

* [samples] Regenerate

* [rust] Generate as alias for all samples configs

* [csharp] Move test staged file changes to in-directory

* Include "live" test files and ignore test cache files from samples.ci

* Remove concept of samples.ci staging

Generators support .openapi-generator-ignore, allowing maintainers to
explicitly ignore the regeneration of files which have been modified.

Note that the tooling does not overwrite test files whenever those files
exist, and it's not entirely necessary to add test files to the ignore
file.

* Re-add meta generator scripts

* Modify ensure-up-to-date to log stdout, so script does not look like it hangs on slower machines

* [csharp] Regenerate sample

* Set generateAliasAsModel CodegenConfigurator#toContext

This ensures the property (which is effectively a thread-local) gets set
as expected if the caller resets GlobalSettings as is done in the
GenerateBatch command.

* [rust] Regenerate samples

* Re-enable elm

* [java] Support OffsetDateTime example, fail ensures script on any generation error

* [samples] Regenerate

* Fix jersey2-java8 ignore file

* Fix elm spec validation

* Force UTC in sample generation to avoid timezone conflicts during generation (user vs ci)

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-06-09 18:28:58 +08:00
William Cheng
859e7f7228
update pester to 5.x (#6536) 2020-06-04 15:05:08 +08:00
Jim Schubert
a47e522fae
[core] Refactor templating management (#6357)
* [core] Refactor templating management

This refactors template management to get logic out of DefaultGenerator
and to provide a cleaner API to template search and read/compile.

Deprecates MockDefaultGenerator, which is not a mock and causes
in-memory retention of file contents. Maintainers should prefer
executing a "dryRun" with new DefaultGenerator(true) or do true
mock/spies if evaluating template intermediaries is truly necessary.
Tests may read written files with lower overhead than the in-process
retention of those bytes.

This attempts to maintain some compatibility with existing templating
adapter interfaces. Any breaking change here would be unintentional but
minimal effort to retarget the new interface.

* Tests for dry run file outputs

* Update API usage in Meta, test TemplateManager

* Wait on lastModified, lookup by filename in SpringCodegenTest

* Test DefaultGenerator + ignore file

* Move config.processOpenAPI in DefaultGenerator

* Fix wrong use of libraries templateDirector (java)

The samples scripts for Java incorrectly referenced the libraries
directories directly rather than the upper-level Java directory. This
was incorrect usage of template directories, because the generator
expects to be given the "language" directory and perform a lookup for
missing templates in the order:

* user defined libraries directory
* user defined language root
* embedded libraries directory
* embedded language root
* _common directory

This is incorrect in our samples scripts because a user or maintainer
has the expectation that any template change to files at the Java/ root
should also be honored on generation if the script specifies a custom
template directory.

* Fix handlebars extension usage, clean up Meta tasks

HandlebarseEngineAdapter previously didn't handle files without
extensions in the same was as the MustacheEngineAdapter. This now allows
for files without extension (or dotfiles) to lookup in the same
location.

Meta tasks are cleaned up to use template manager only, rather than
attempting to create an "empty" generator to use the previous templating
specific methods.

* Update kotlin-multiplatform gradle wrapper

* Rename GraphQL .gitignore template

The .gitignore file is unable to load via classpath resource from the
graphql node server resource directory (for unknown reasons). Before
this change, the missing template would fail silently.

A .gitignore file may exist in other directories and load as expected.
Added a default .gitignore to _common as a fallback so as not to break
any custom generators which may also be failing silently.

* Log entire stacktrace in go sdk built by gradle in AppVeyor

* Rename PHP .gitignore to gitignore

Java resources may not load .gitignore, this follows suit with other
generators and uses "gitignore" (some use "gitignore.mustache").

* [php] Rename .gitignore templates to gitignore

* Use same classpath lookup in common locator

* [rust] Properly escape empty triple-braces

* [samples] Regenerate
2020-05-30 00:19:03 -04:00
William Cheng
92a350ed72 set pester version (#6448) 2020-05-27 17:22:50 +08:00
Jim Schubert
fb57b602c2
[ci] Execute maven and verify with no-snapshot-updates (#6415) 2020-05-25 14:30:12 -04:00
William Cheng
f327f01c19
Replace powershell generator with powershell-experimental generator (#6213)
* replace powershell generator with powershell-experimental generator

* add back samples

* add back scripts

* remove outdated script

* update doc
2020-05-08 20:13:01 +08:00
William Cheng
63c8f5f965
[PowerShell] Test powershell petstore client in Appveyor (#5674)
* remove scala version in parent pom

* test ps petstore in appveyor

* fix command

* build and import

* fix import module

* fix import

* skip module import

* run multiple commands

* move to test script

* test ps exit

* fix exit

* check last status code

* clean tests

* exit last code

* add import

* change dir

* skip build failure

* fix check

* trigger build failure

* fail fast

* restore c# test

* new line comment

* add powershell exp to ensure up to date script
2020-03-24 13:39:15 +08:00
Jim Schubert
1ac0f141a6
[feature] Default CI log level for slf4j-simple to error to prevent noise (#5118)
* [feature] Log "debounce" filter to remove spam.

* [log] slf4j-simple should be optional

This also sets the default log level to ERROR during CI builds for many
mvn invocations. This should reduce noise in the logs.

* [log] Rely only on mvn loglevel=error for now

* [cli] Clean up unused dependency

* [log] Change level to error/warn in more CI
2020-01-29 16:28:42 +08:00
Jim Schubert
ea55968737
Evaluating https issues in CircleCI (on top of CiscoM31-maven-h… (#5034)
* replace http with https. Replace http://central.maven.org with https://repo1.maven.org

* replace http://www.apache.org/licenses/LICENSE-2.0 with https://www.apache.org/licenses/LICENSE-2.0

* Force HTTPS for mavenCentral gradle DSL

Co-authored-by: Sebastien Rosset <serosset@cisco.com>
2020-01-18 18:53:05 -05:00
Jérémie Bresson
89d0c01764 Use 4.0.2-SNAPSHOT version in gradle samples (#3085) 2019-06-04 06:54:25 -04:00
William Cheng
e06a408141
Update C# client dependency (#2678)
* update csharp dependency

* fix appveyor test

* skip build error

* update nunit version

* fix nunit path

* update petstore test

* various fix
2019-06-03 21:17:17 +08:00
Jérémie Bresson
dc81574f2b Update version to 4.0.2-SNAPSHOT (#3047)
* Update version to 4.0.2-SNAPSHOT

* Update samples

* Change AppVeyor script (test of gradle sample)

* Fix release version bump script (gradle plugin, sample poms)

* Include sonatype snapshots in maven examples which reference 4.0.2-SNAPSHOT
2019-06-01 21:32:44 -04:00
Richard Whitehouse
a4be2c0bb4 Remove -XX:MaxPermSize (#2712)
This was removed in JDK 8 and produces a warning
2019-04-23 11:34:01 +08:00
William Cheng
5fbb812d65
Test Gradle plugin in Appveyor CI (#2651)
* update travis to test gradle plugin

* update gradle version

* show gradle version

* test gradle plugin in circleci

* test appveyor in gradle

* use direct link

* revert other ci config
2019-04-13 00:36:52 +08:00
William Cheng
d2ce584a3a
Rename generator: csharp-refactor => csharp-netcore (#2348)
* renmae csharp-refactor to csharp-netcore

* update appveyor config

* update config

* update doc
2019-03-12 09:04:25 +08:00
Jim Schubert
f39e200e5d C# refactor improvements: .NET Standard and .NET Core (#2187)
* [csharp-refactor] limit available target framework

This removes .NET 3.x, .NET 4.0, UWP, and the "5.0" option (which
referred to PCL 5.0). This gives us a smaller footprint for maintenance,
and doesn't necessarily block consumers from creating custom templates
to support those target frameworks. A workaround for users wanting these
options is to build against openapi-generator 3.3.4.

This moves logic for applying additional properties to strategies per
target framework, as a means to reduce maintenance overhead at the cost
of maybe a little redundancy between strategies.

* [csharp-refactor] Fixing .netstandard support

* [csharp-refactor] Fixing netcoreapp2.0 support

* [csharp-refactor] Regenerate samples

* Fix toLowerCase missing Local.ROOT

* [csharp-refactor] Remove unnecessary bash/batch scripts, update appveyor.

* Update appveyor.yml to test for dotnet/xunit

* Update appveyor.yml

Wrap xunit console environment variables in quotes, to prevent yaml syntax error.

* Update appveyor.yml

Try to use dos-style switches, attempting to remove yaml parse error in appveyor. Previous command matched appveyor docs, but resulted in the parser error.

* Update appveyor.yml

Wrap full commands for netstandard tests in quotes

* Fix linux style slashes in dotnet build, use dotnet test over appveyor xunit

* [csharp-refactor] Update generator docs
2019-03-10 12:33:49 +08:00
William Cheng
2ccfdc8e5d
Add C# client (refactor) to Appveyor CI (#1738)
* add c# client (refactor) to CI

* fix typo
2018-12-23 08:08:05 +08:00