164 Commits

Author SHA1 Message Date
William Cheng
09be19cef7
upgrade okhttp-gson and google-api-client to junit5 (#18668)
* upgrade okhttp-gson and google-api-client to junit5

* add changes in StringUtilTest

* use https instead of http to fix 301 (moved) error

* revert petstore test server url to http://petstore.swagger.io and regenerate samples

* synced gradle/sbt/pom, re-generated samples

* revert removal of port 80 from test url

* udpate google api client tests

* update sha

* update comment

---------

Co-authored-by: Thorsten Hirsch <t.hirsch@web.de>
2024-05-14 17:04:33 +08:00
William Cheng
eec30f2cda update sha256 for JSONTest.java 2024-05-12 00:08:27 +08:00
Tadas Krivickas
06ed7c8205
[dart] [dart-dio] Support Dart3 (#18001)
* Support both dart 2.x and 3.x

* Append dart3 keywords

* Update docs
2024-04-28 22:09:10 +08:00
William Cheng
83b45fd1e8
[java][okhttp-gson] Fix oneof, anyof for array type (#18324)
* fix oneof, anyof for array type in java okhttp-gson

* fix oneof

* fix add tests

* clean up comments

* update

* add new files
2024-04-08 22:20:23 +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
d4e10508cd
[C#] fix anyof, oneof mixed primitive object parse error (#17986)
* Update csharp oneOf and anyOf mustache templates to accept primitive, object, and array types when deserializing

 Add bug openapi spec

Remove generated files

Add test endpoints

Generate base on spec

Remove issue spec as it is moved into sample test spec

Add back in number and int

Round trip anyOf/oneOf serialization tests

Generate classes with int/num types

Do through converter instead of object ctor

Regen models

Use convert methods

Regen models

Test data

Add enum

Remove enums

Regenned models

* update sha256

* use new spec

* skip tests

* update workflow

* fix

---------

Co-authored-by: Ruben Aguilar <ruben.aguilar@forgeglobal.com>
2024-02-29 16:05:08 +08:00
William Cheng
5bcdc25645 update test file sha256 2024-02-08 11:20:05 +08:00
William Cheng
dccb147055
Fix allOf with a single item in inline model resolver (#17683)
* fix inline model resolver for allof with 1 item

* add files

* update sha

* more checks
2024-01-23 23:37:39 +08:00
Charles Treatman
166ebc50b0
[Java][okhttp-gson] validateJsonElement does not validate enum values (#16865)
* validate enum properties in validateJsonElement

* regenerate samples

* add test for enum validation in okhttp-gson models
2023-11-08 14:14:48 +08:00
William Cheng
5d03c4ac82
[java-okhttp] Restore integration tests (#16985)
* restore java okhttp tests

* update PR template, update sha
2023-11-04 22:50:23 +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
3cf646cda8
[csharp-netcore] fix back slash in regex (#15441)
* fix back slash in regex (csharp-netcore)

* undo add pattern test

* update shasum
2023-05-09 13:52:46 +08:00
Nathan Baulch
9f1fa0e440
Fix another batch of spelling typos (#13915)
* Fix typos

* Remove repeated words

* Minor grammar fixes
2022-11-07 21:30:24 +08:00
William Cheng
6a1acd89a1
Add array tests to java okhttp-gson client (#13913)
* array test to java okhttp-gson client

* better code format

* add ClientTest.java to test_file_list.yaml
2022-11-04 20:01:01 +08:00
William Cheng
866d67a78f
Move some travis tests to github workflow, remove redundant c# test (#13704)
* move some travis tests to github workflow, remove reduntant c# test

* setup ruby

* switch to setup-ruby

* bundle install

* remove bash

* remove bundle install

* remmvoe gemfile

* add more folders in tab detection

* comment out java folder in tab detection

* undo changes in tab detection
2022-10-16 16:20:49 +08:00
William Cheng
f73decb0f0 update test file sha256 2022-08-06 18:46:13 +08:00
Kamil Szymon Jadeszko
b79162118c
[doc] Fix urls to sbt-openapi-generator in doc and script (#12015)
* Fix sbt-openapi-generator URL in integration.md 

Fix URL to sbt-openapi-generator previously pointing to outdated repo outside OpenAPITools

* Fix sbt-openapi-generator URL in release_checkout
2022-04-01 00:38:24 +08:00
William Cheng
9a33f99937 fix typos 2022-02-26 14:01:17 +08:00
William Cheng
bd1a6471b6
[java][Jersey2] add spotless maven, gradle plugins (#10796)
* add bunker-holding logo

* add spotless plugin to jersey2 java client

* add spotless plugin to java jersey2 client

* use jdk11 in gradle tests

* fix gradle test local spec

* setup java 11

* skip spotless in check task
2021-11-06 18:11:58 +08:00
Nathan Baulch
5d68bd6a03
Fix thousands of spelling typos (#10272) 2021-08-28 22:58:24 +08:00
William Cheng
8c4991ba3e
minor update to use 5.3.0 (#10168) 2021-08-17 18:26:50 +08:00
William Cheng
90f7bcd909
Prepare v5.2.0 release (#9920)
* 5.2.0 release

* update samples

* update meta codegen
2021-07-09 17:06:55 +08:00
William Cheng
ad3ecadd75
Move ensure up-to-date script to drone.io (#9339)
* move ensure up-to-date to drone.io

* fix tests

* Revert "fix tests"

This reverts commit ea5efd3b3b45e7e7720b2aa893403aed8a458d9f.

* skip 2.0 tests

* use mvnw

* fail fast

* fix meta-codegen

* test java 11 first
2021-04-26 22:08:49 +08:00
William Cheng
de5651adac
[C#] fix integer enum without format (#9136)
* fix inner enum integer without format

* add line break, update samples

* remove line break

* add line break

* update SHA
2021-03-31 15:11:10 +08:00
William Cheng
402cf9a3a2
Fix integer enum in csharp generators (#9035)
* fix integer enum in csharp generators

* add comment
2021-03-25 21:30:42 +08:00
William Cheng
1ba323f058
Add tests for array of string serialization (#8913)
* add tests for array of string serialization

* update test file SHA
2021-03-09 08:53:05 +08:00
William Cheng
9c4c624eb7
Add monitoring to detect tabs in the templates (#8738)
* add monitoring for tabs in the templates

* rename script

* add detect_tab_in_templates.sh

* rearrange tests

* add kotlin folders

* move test to circleci

* restore .travis.yml

* fix grep
2021-02-23 19:00:59 +08:00
William Cheng
b7ee885805
[C#][netcore] fix binary response (#8593)
* fix binary response

* update test file hash
2021-02-04 11:01:44 +08:00
NANASHI0X74
a968fb1e33
make shebangs portable (#8556)
Co-authored-by: nanashi0x74 <rian.lindenberger@mpq.se>
2021-01-29 10:54:54 +08:00
William Cheng
64c57e3f52
Add a script to detect changes in test files (#8020)
* add script to detect changes in test files

* remove build failure test
2020-12-04 12:22:35 +08:00
agilob
ae95c2b19b
Generate docs on 4 threads (#7586) 2020-10-05 23:31:51 +08:00
Jim Schubert
6ade544904
[ci] Clarify wording in ensure script output (#7512) 2020-10-01 22:06:35 -04:00
Jim Schubert
0e9c6dd9a8
[ci] Update gitattributes and allow skipping docs generation for Windows CI workflows (#7273) 2020-08-22 22:14:04 -04:00
Jim Schubert
0cb080d5f1
[ci][cli] Allow invoking generate-samples.sh with single file + args (#6609) 2020-06-11 23:39:26 +08: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
734d6d9f09
[Java][jersey2] fix cast error for default value in DateTimeOffset object (#6547)
* fix cast error for datetimeoff in java

* add back files

* fix datetime initialize

* comment out ensure uptodate
2020-06-05 11:42:09 +08:00
Sebastien Rosset
54e2574013
[Java][Jersey2] Fix typo and script, Log enhancements, HTTP signature, deserialization (#6476)
* Mustache template should use invokerPackage tag to generate import

* fix typo, fix script issue, add log statement for troubleshooting

* Add java jersey2 samples with OpenAPI doc that has HTTP signature security scheme

* Add sample for Java jersey2 and HTTP signature scheme

* Add unit test for oneOf schema deserialization

* Add unit test for oneOf schema deserialization

* Add log statements

* Add profile for jersey2

* Temporarily disable unit test

* Temporarily disable unit test

* fix typo in pom.xml

* fix duplicate jersey2 samples

* fix duplicate jersey2 samples

* fix duplicate artifact id

* fix duplicate jersey2 samples

* run samples scripts
2020-05-31 22:45:01 +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
6abc4fdab2
Migrate all scala generators to use OAS3 (#6407)
* migrate all scala generators to use oas3

* add back pom.xml for scala-sttp

* skip form model in scalaz

* fix scala lagom tests

* add new files

* skip form models in scala finch petstore

* update samples
2020-05-25 23:09:34 +08:00
William Cheng
db4c4917e2
migrate ruby samples to oas3 (#6414) 2020-05-25 23:02:30 +08:00
William Cheng
d5304055ab
Minor improvements to the Lua client generator (#6219)
* minor improvement to lua client gen

* add new files
2020-05-09 14:26:54 +08:00
William Cheng
faf6f197be Merge remote-tracking branch 'origin/master' into 5.0-sync-master 2020-04-17 15:51:00 +08:00
William Cheng
57dc8a43f6
fix file path in release_version_update_docs (#5724) 2020-03-29 00:55:25 +08:00
Jim Schubert
2a115090a7
Update bump.sh to go SNAPSHOT to version (#5727) 2020-03-27 21:30:46 -04:00
William Cheng
b49128f04b
Fix SSL setting in checkout script (#5725)
* fix ssl setting in checkout script

* add check for sbt-openapi-generator
2020-03-27 20:21:28 +08:00
William Cheng
94b962e198
Add Scala client scripts to ensure-uptodate process (#5712)
* add scala client to ensure-upto-date

* new scala-akka petstore oas3 folder

* regenerate scala akka oas2 petstore

* remove script
2020-03-26 20:36:53 +08:00
William Cheng
76a2f69dea comment out powershell petstore in uptodate script 2020-03-24 19:57:25 +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
Sebastien Rosset
a16079ce7b
[Java] Generated API class has wrong dataType and does not compile Issue (#5331)
* add unit test assertion

* add check for composed schema

* add support for x-allOf-name

* change x-allOf-name to x-all-of-name

* Add more troubleshooting information

* Add more troubleshooting information

* Add more troubleshooting information

* Add more troubleshooting information
2020-03-17 15:37:33 +08:00