70 Commits

Author SHA1 Message Date
martin-mfg
b730e36937
[JAVA] fix several anyOf/oneOf problems (#19817)
* erasure duplicates

* sanitize beanValidation

* oneOf maps

* anyOf

* update samples
2024-10-10 14:50:18 +08:00
Joscha Feth
17e0b7ca71
[typescript] fix: nullable enums should not serialize a null value to a string (#19540)
* fix: `nullable` enums should not serialize a `null` value to a string

* better solution?

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java

Co-authored-by: Joscha Feth <joscha@feth.com>

* chore: Update circle_parallel.sh

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-09-24 23:46:32 +08:00
Tobias Zink
01fec76ab1
feat(typescript-angular): add support for Angular V18 (#18916)
* feat/typescript-angular/add-v17-support

* HTTP_TRANSFER_CACHE_IN_OPTIONS for angular 17 as well

* run build scripts again because of angular 17 HTTP_TRANSFER_CACHE_IN_OPTIONS
2024-06-14 15:14:28 +02:00
William Cheng
4be5971e0f
[cpp-restsdk] add support for oneOf via std::variant (#18821)
* Revert "Revert "[cpp-restsdk] add support for oneOf via std::variant (#18474)…"

This reverts commit 8d398719c99fbcbfa6471e0bb938f9d384454f8f.

* update samples

* update pom

* set cxx 17

* Revert "set cxx 17"

This reverts commit 0cec8f725dd8017217b75e827a54da5440dd55d1.

* install clang 6.0

* Update CI/circle_parallel.sh

Co-authored-by: Amin Yahyaabadi <aminyahyaabadi74@gmail.com>

* fix include

---------

Co-authored-by: Amin Yahyaabadi <aminyahyaabadi74@gmail.com>
2024-06-07 12:24:39 +08:00
William Cheng
ca94559fb6
Add tests for Cpprestsdk client in CircleCI (#18817)
* add cpprest sdk test in circleci

* install
2024-06-01 17:31:20 +08:00
Vikrant Balyan
4b56fd281a
[Go] uses sanitized model name instead of the name (#18644)
* uses sanitized model name instead of the name

* commit sample

* samples updated

* update CI file to test the changes

* adds a pom.xml to the sample
2024-05-12 15:04:39 +08:00
Erko Risthein
bd02e65f88
[Java] Update Java version in GitHub actions (#18513)
* Update Java version in Github actions

* Generate samples

* [java] Upgrade Gradle wrapper to 8.7

* Generate samples

* [Java] Add resttemplate-jakarta to CI

* Upgrade CI machines to ubuntu-2204:2024.04.4 which use Java 21

* Change CI machines to ubuntu-2204:2024.01.1 which use Java 17

* Change CI machines to ubuntu-2004:2024.01.1

* [ruby] Update Gemfile.locks

* Use gradle wrapper for samples-java-client-jdk17
2024-04-30 13:57:01 +08:00
Yohei Kitamura
34ebc1c644
[ruby] Use Marcel to detect content-type in form-data file upload using faraday (#18243) 2024-03-29 21:58:08 +08:00
dvacca-onfido
9deeb608e6
fix(ruby): Detect content-type in form-data file upload using faraday (#17851) (#17853)
* fix(ruby): Detect content-type in form-data file upload using faraday (#17851)

* Update samples

* Add needed dependency libmagic-dev into node 1 setup of Circle Parallel CI

* After merge/pull last master + regeneration of samples
2024-02-14 21:14:01 +08:00
Laith Hussein
a7439e456e
feat(typescript-angular): add support for v17 of angular (#17685)
- Add support for `transferCache` property in request options

Refs: [#17301]

Co-authored-by: Laith Hussein <laith.hussein@beno.com>
2024-01-26 09:21:48 +01:00
William Cheng
e6161cc044
Test perl petstore client in CircleCI (#17669)
* test perl client in circleci

* cpanm install

* install

* add bash

* bin bash

* update

* undo pom.xml change
2024-01-22 14:30:53 +08:00
Robert Schweizer
a0418c2855
[python][client] Clean up samples and CI (#17509)
* chore: Remove leftover Github action file

This was probably added by mistake. A similar file is active in
.github/workflows/samples-python-pydantic-v1-petstore.yaml.

* chore: Remove leftover VERSION from old python-experimental sample

* ci: Stop running Python integration tests in Circle CI

These Python clients are all tested with Github Actions already, which
is faster, more cleanly separated and only runs on modifications.

I'm not cleaning up the pydantic-v1 client, I expect it to be removed soon anyway.

* chore: Remove true from sample folder name

python-disallowAdditionalPropertiesIfNotPresent-true
-> python-disallowAdditionalPropertiesIfNotPresent
2024-01-16 10:34:04 +08:00
William Cheng
5693eee4e0
Fix CircleCI build (#17016)
* fix circleci build

* add maven opts

* remove cache path

* clear cache

* fix node 0

* use 1024

* skip save cache

* restore tests

* fix

* fix typo

* update

* clean up pom.xml
2023-11-13 10:00:55 +08:00
William Cheng
d67f5ddeff
Fix circleci node 4 failure (#16236)
* fix circleci failure

* remove debug

* fix
2023-08-02 15:13:13 +08:00
William Cheng
8b26d81163
use mvnw instead of mvn in workflow (#15880)
* use mvnw instead of mvn in workflow

* fix

* more fix
2023-06-20 17:11:33 +08:00
William Cheng
780d266fe1
Decommission python client generator (#15486)
* decomission python client generator

* udpate

* update doc
2023-05-14 16:33:13 +08:00
William Cheng
4e8d41bd79
Fix circleci test failures (#15317)
* fix circleci test failures

* trigger test

* update circleici pom.xml

* rearrange test

* comment out tests

* fix test

* comment out python-prior

* comment out test

* fix import

* comment out tests
2023-05-03 15:17:25 +08:00
William Cheng
6b80410bf3
update CI to install v1.18 (#14607) 2023-02-03 16:34:43 +08:00
William Cheng
0cf5ed619d
Add a new Python client generator - python-nextgen (#14157)
* add python-nextgen generator

* remove client_side_validation from model

* remove configuraiton import from models

* add inheritance support

* update test requirements, tox

* add typings, pydanic to models

* add test model

* minor improvements

* add enum support

* add typing for parameters, remove validations

* add oneof, anyof support

* fix default value

* fix deserialization, api tests passed

* private variable naming, update tests, all tests passed

* remove six

* remove nose

* update doc

* remove sortParamsByRequiredFlag option

* add parameter validation

* add validation tests

* simplify Field()

* remove previous required parameter validation

* improve parameter handling

* support discriminator mapping

* better typing discriminator mapping

* format test code

* fix tests

* fix oneOf from_dict, add test

* add set validation test

* fix nested oneof serialization, add tests

* add model import

* remove models. prefix

* remove import models

* remove model import from api

* simplify from_dict

* add typing for return

* skip pydantic import in return type

* fix tests, fix enum

* restore more enum schema tests

* uncomment enum integer test

* clean up getfullargspec import in model

* clean up getfullargspec import

* fix deserilizatoin for nested oneof

* minor fixes, add tests

* fix regular expression

* add aiohttp samples, add tests

* remove default content type to json

* update template

* fix select accept, content-type

* move tests

* move tests

* fix url query parameters

* fix list

* fix samples

* fix param pydantic, add list as reserved word

* fix auto-generated doc

* fix readme

* fix list, fix special variable name with var_

* fix Literal in python 3.7

* fix default configuration

* fix aiohttp tests

* set default api client instance

* deprecate get_default_copy method

* fix enum model

* fix enum serializatio/deserialization

* add github workflow support

* add regular expression validator

* add enum validator

* better model import

* fix file, remove x-py-import-models

* rename local var

* better model example

* fix regular expression warning, add special_name test, whitelist schema

* skip self import

* update samples

* various fixes

* add base64, json as reserved word

* add http signature support

* add http signature test

* add additioanl properties support in python client

* add decimal support

* use strictstr instead of constr

* fix test with virtualenv

* add nullable support

* add readonly support

* add model name caching

* fix circular reference import

* add onelook discriminator lookup

* add tests

* update samples

* fix locale

* Fix client legacy generator asyncio README code example

* test python-nextgen in circleci

* fix pom.xml

* update python to 3.7.15

* test with python 3.7.12

* various updates

* fix python legacy
2022-12-17 16:05:47 +08:00
Justin Black
7e73645303
Switches python-experimental in as the primary python client (#13501)
* Changes python to python-prior

* python -> python-prior, python-experimental->python

* Renames sample spec directories

* Samples regnerated

* Regenerates docs

* Fixes test

* Samples regenerated

* Updates renerators list

* Fixes made to python paths in pom.xml

* Fixes node4 sh file paths
2022-09-24 16:19:38 +08:00
Justin Black
6158274f65
Adds openapi v3.0.3 unit test spec, includes test cases, autogenerates model tests with them (#12619)
* Adds draft6 tests and python file reader

* Adds processing of multiple files

* Moves test examples into a different component so component schemas can be booleans

* Excludes boolean schema cases and some others that contain patternProperties

* Adds automatic test generation, template not quite working with indentation

* Turns on allOf tests, some failing

* Adds more generated components and tests

* Adds enum tests

* Turns on all of themissing tests

* Adds exclmax and min exclusion reasons

* Adds items test cases

* Adds maximum

* Adds maxItems

* Adds maxLength

* Adds maxProperties

* Adds minimum

* Adds minItems

* Adds minLength

* Adds minProperties

* Adds multipleOf

* Adds not

* Adds oneOf

* Adds pattern

* Adds patternProperties

* Working on properties examples, partial fix for escaped characters

* Further improves example string escaping

* Fixes properties test cases

* Adds draft6 test samples license

* Adds ref

* Finishes ref

* Adds remoteRef

* Adds required

* Improves required testing

* Fixes build error / javadoc warning

* Fixes uniqueItems bug in python-experimental

* Turns all tests back on

* Fixes 2 failing tests, all python tests pass

* Fixes java npe errors

* Fixes formatting of tests, indentation fixed

* Test fase name fixed to toTestCaseName, docstring added to ObjectWithTypeBooleans

* Fixes typo

* Adds test deletion to samples generation, samples regenerated

* Updates python-exp unit test sample, includes new ref examples
2022-07-01 13:46:02 -07:00
William Cheng
0b2cb06229
[CircleCI] improve execution time (#12253)
* add cache folder, remove mvn install

* debug

* update test

* fix cache
2022-04-30 16:43:39 +08:00
William Cheng
5eacc0d09f undo changes to CI/circle_parallel.sh 2022-03-29 14:00:05 +08:00
William Cheng
e268f46d76
Test PHP client in Travis CI (#11996)
* test php in circleci node 2

* restore image

* install php 8.1.4

* install plugin

* install libonig-dev

* install libzip-dev

* test php in travis

* rehash
2022-03-29 13:43:38 +08:00
William Cheng
69c69df5f2
[CircleCI] update image (#11929)
* use supported images from circleCI

* skip scala-httpclient test

* new way to install r

* skip r test

* test go only
2022-03-29 10:58:00 +08:00
Justin Black
42f3258faa
Turns on python-experimental CI tests (#11390)
* Installs python3.9 in node3

* Moves python clients into separate node so they can use a docker image

* Installs java and maven into docker

* Switches off some python tests
2022-01-24 15:44:38 -08:00
Justin Black
ffe5df8fa1
Turns python-legacy CI back on in circle, fixes python-legacy test (#11326)
* Turns python-legacy CI back on in circle, fixes python-legacy test

* Installs python 2.7 into circleci node 3

* Python 2.7 version changed to 2.7

* Switches back to py2714
2022-01-16 17:12:38 +08:00
William Cheng
4cece10bae
rebalance circleci tests (#10727) 2021-10-29 13:38:16 +08:00
William Cheng
026dd8d5f8
Move TypeScript, JavaScript tests to CircleCI (#10510)
* move ts, js tests to circleci

* set NODE_ENV

* curl -k

* comment out haskell installation
2021-10-02 15:38:05 +08:00
William Cheng
483a13f3e1
Test Python clients in CircleCI (#10354)
* test python in node3

* install python3

* install python 3.6

* use pyenv

* run with 3.5.2

* install py 3.8.9

* fix folder name

* install via pyenv

* list pyenv

* install 3.6.3

* rearrange test

* Revert "rearrange test"

This reverts commit 1b075ed97ce95c94fb1d15e9a9ffbcbde3b46f1b.

* only test py3
2021-09-09 12:43:55 +08:00
Peter Leibiger
22db406c35
[ci] Move openapi-generator build/docs/samples to github actions (#9550)
* [ci] Move openapi-generator build/docs/samples to github actions

* Naming

* Test failure on samples and docs

* Revert code changes after successful docs/sample failure
2021-05-24 10:59:35 +08:00
Peter Leibiger
b8c5a647e0
[dart][ci] Move Dart samples from CircleCI to Github actions (#9515)
* [dart] Move Dart samples from CircleCI to Github actions

* Fix format failing with latest Dart version

* Workflow naming

* Split dart samples depending on version

* use fixed version to prevent flaky builds

* Change branch pattern for release branches
2021-05-21 14:45:50 +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
Peter Leibiger
47e292c0e7
[dart][dart-dio] Remove sample formatting from dart-dio-next (#9121) 2021-03-31 16:45:47 +08:00
William Cheng
773a8d8a08
move dart test to node 2, remove oas v2 dart tests (#9028) 2021-03-21 10:53:00 +08:00
Peter Leibiger
3d038b74fd
[dart][dart-dio] Next-gen dart-dio generator (#8869)
* [dart-dio] Remove old Dart 1.x templates

* [dart-dio] Initial version of a next-gen Dart Dio generator

* Fix a couple readme links and examples

* Fix import in testcase

* Add integration tests to master POM

* Run initial dart format and improve some base formatting

* Generate docs

* Use integer matchers in test for content-length

* Separate more built_value specific files

* Fix mustache partial path

* Update pubspec template

* Fix tests after mock lib updates

* Generate with new built_value pre-release

This solves the problem of not being able to serialize null.

* Update built_value dependency

* Regenerate after merge

* Regenerate tests

* Fix missing byte response cast

* Update dio to 4.0.0-prev1

* Run format

* Ignore unused imports in inheritance classes

* Update mock test library

* Update docs

* Make a couple variables final

* Update and freeze dio dependency

* Update generator doc

* Add a new option to post processes all dart output at once

This is much faster than individual files. The committed samples should be formatted since Dart is very opinionated and it makes diffs in PRs much easier to read.
Due to this, we also need to format in CI, otherwise there is a git diff.

* Test some CI stuff
2021-03-20 12:26:56 +08:00
William Cheng
1df719801e
Add a new crystal client generator (beta) (#8304)
* add crytsal client generator

* update samples

* update doc

* regenerate spec

* regenerate spec

* various fixes

* test crystal in circleci

* test crystal client in drone ci

* Revert "test crystal client in drone ci"

This reverts commit 317f2cf2a09f902c08ced214e8e5802fa79c3de8.

* fix install

* fix installation

* test crystal in travis

* cache image

* add --cache-from

* update doc

* run petstore with mvn

* install crystal

* fix install crystal

* sudo mvn

* run server

* using mvnw

* fix form or body parameter

* remove crystal from circleci

* fix test

* remove cache-from

* update doc
2021-01-07 17:10:22 +08:00
William Cheng
0707b4bb20
[Scala] setup Ivy cache directory (#6978)
* use ivy2 cache

* use ~/.ivy2 cache dir

* add pom.xml to openapi-generator-ignore

* update scala-akka sample

* use ~ for home directory
2020-07-18 15:48:47 +08:00
William Cheng
49f088ec8e
[CircleCI] rebalance tests (#6981)
* rearrange tests

* move java tests to others
2020-07-18 15:47:46 +08:00
William Cheng
47b4e16420
Remove JDK7 tests in CircleCI (#6890)
* remove jdk7 tests in circleci

* test microprofile-rest-client in jdk8
2020-07-09 17:46:52 +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
faf6f197be Merge remote-tracking branch 'origin/master' into 5.0-sync-master 2020-04-17 15:51:00 +08:00
Sebastien Rosset
527d5e4248
[Java] Update version of maven-surefire-plugin (#5509)
* use more recent version of maven-surefire-plugin

* use more recent version of maven-surefire-plugin

* higher debug level for troubleshooting ci issue

* temporarily increase debug log to help troubleshoot

* Use local instance of pet store service for unit test purpose

* Add more logging to troubleshoot unit test failures

* Add more logging to troubleshoot unit test failures

* Add more logging to troubleshoot unit test failures

* Add more logging to troubleshoot unit test failures

* Add more logging to troubleshoot unit test failures

* use random ID for Java unit test instead of fixed id

* add code comments and specify URL for java unit test

* reenable quiet argument

* fix java unit test issues

* fix java unit test issues

* Revert "fix java unit test issues"

This reverts commit e8508416ff0f2aeb568e3f916b013dc967390f74.

* fix java unit test issues
2020-03-26 16:47:51 +08:00
Sebastien Rosset
5e6a261d12
[go-experimental] Do not generate HTTP signature unit test for every generated SDK (#5588)
* Do not generate HTTP signature unit test for every generated SDK

* Add golang 1.14 to CI environment

* fix unit test issues

* remove script commands that were commented out

* add support for ed25519 private keys
2020-03-14 19:34:58 -04:00
William Cheng
68a291e380
Test Dart petstore client in CircleCI (#5544)
* test dart2 in circle ci (jdk7)

* fix tests

* update package

* fix dart installation
2020-03-07 00:20:44 +08:00
William Cheng
100b01844a Merge remote-tracking branch 'origin/master' into 5.0.x 2020-02-04 15:31:10 +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
Erik Timmers
b62fc1c031 Elm refactoring (#4891)
* [elm] Remove support for Elm 0.18

* [elm] Drop `Main.elm`

* [elm] Put all models in a single file

* [elm] Put generated code in `Api` package

* [elm] Introduce Request type for operations

* [elm] Generate list of enum variants

* [elm] Make default Time module

* [elm] Small improvements & fixes

* [elm] Improve support for allOf

* All of types are now nested;
* Adding a discriminator creates a custom type wrapping all variants
  and a 'catch-all' fallback variant.

* [elm] Add support for recursive types

* [elm] Add catch-all type for allOf

* [elm] Drop support for post-processing of files

* [elm] Only import required packages

* [elm] Handle reserved and unsafe words

* [elm] Minor improvements

* [elm] Add support for integer enums

* [elm] Remove additional slash in path

* [elm] Add link to docs

* [elm] Update CI test file & scripts
2020-01-10 17:12:33 +08:00
William Cheng
de69eac316
Use non-batch mode in ensure-up-to-date (#4573)
* use non batch mode in ensure-up-to-date

* update samples
2019-11-22 11:43:52 +08:00
Jim Schubert
4a91e62fb7 [ci] Setting ensure-up-to-date to use batch option in CircleCI (#4445)
* [build] Enable --batch option in ensure-up-to-date

* [samples] Regenerate

* [ci] Use --batch in CircleCI script
2019-11-13 18:06:14 +08:00