186 Commits

Author SHA1 Message Date
Linh Tran Tuan
9827098057
[Rust] [Server] New generator bases on Axum (#17549)
* Rust Server - Axum based (#5)

* Fix typo

* Address comment

* Address comment
2024-01-09 11:38:54 +08:00
William Cheng
84d619b883
fix travis build (#16288) 2023-08-09 16:28:59 +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
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
bb8098a66f add --quite to mvn cmd in travis.ci 2023-05-10 17:17:08 +08:00
William Cheng
3826d712ad show error only in travis build to reduce log size 2023-03-14 17:24:13 +08:00
William Cheng
644bccfd92
Reduce log level to avoid Travis CI build failure (#14946)
* reduce log level to avoid travis build failure

* add new file
2023-03-14 12:40:37 +08:00
William Cheng
3746a2069f
enable onBrokenLinks (#14730) 2023-02-17 16:53:07 +08:00
William Cheng
cea5022b5d
update docusaurus to latest version (#14728) 2023-02-17 14:15:29 +08:00
William Cheng
a28772b08f
skip website push (#14573) 2023-01-31 22:44:03 +08:00
William Cheng
cffacc8023
fix deploy in travis (#14428) 2023-01-12 01:05:52 +08:00
William Cheng
3f96cdb756
Fix circleci build failure (node1) and Travis build failure (#14425)
* move python fastapi test to another node

* fix travis build

* fix install

* fix install

* fix install

* skip php test

* fix

* use trusty

* test bionic

* fix install

* fix pom

* skip perl test

* skip fastapitest
2023-01-11 20:28:53 +08:00
William Cheng
c27180849f
fix gem bundler version (#14329) 2022-12-27 16:37:58 +08:00
Eric Haag
bd79231d6b
Fix Gradle plugin publishing (#14150) 2022-11-30 22:43:33 +08:00
William Cheng
77e06466db
Cleanup Shippable CI config and file (#14145)
* clean up shippable ci related config and files

* comment out closeAndReleaseRepository

* Revert "comment out closeAndReleaseRepository"

This reverts commit 5a76e403b1419950b229e14199970b2e858da017.

* remove closeAndReleaseRepository
2022-11-30 12:38:05 +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
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
840917ccb8
fix travis docker version release (#13515) 2022-09-24 21:41:12 +08:00
Lukas Woodtli
d2e60f59b3
Cpp restbed server improvements (#13030)
* Keep old implementation of cpp-restbed generator as cpp-restbed-server-deprecated

* Refactor operation path processing

* Restructure samples directory to better allow writing tests

* Improve templates for cpp-restbed-server

Improve templates

* Add integration tests

* Improvement in templates for cpp-restbed-server

* Fix tests

* Improve cpp-restbed generator

* Improve cpp-restbed-server

* Add more tests

* Add suppoert for arrays of enums in query params

* Generate CMakeLists.txt

* Small improvements and example in Readme

* Add integration tests to maven project

* Update doc
2022-08-27 18:10:28 +08:00
William Cheng
83473eb735
Test Perl client in Travis CI (#12898)
* test perl client in travis

* fix pom
2022-07-17 14:46:49 +08:00
William Cheng
4d0da694ba update github token in travis 2022-05-10 16:00:36 +08:00
William Cheng
8d4c9e2472 comment out cpp qt tests 2022-05-08 15:16:08 +08:00
William Cheng
af60ec7d04 comment out website update due to failure 2022-05-03 12:29:51 +08:00
Rick Lane
9aaf30e0f2
Conditionally install phpenv based on cache (#12030) 2022-04-02 12:08:33 +08:00
William Cheng
8eb818c098 skip php 8.1.4 installation by using cache 2022-03-30 18:38:24 +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
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
bcf12b36e6
skip crystal tests (#10509) 2021-10-02 13:51:05 +08:00
Nathan Baulch
5d68bd6a03
Fix thousands of spelling typos (#10272) 2021-08-28 22:58:24 +08:00
Yusuke Hosonuma
5ea31b585c
[crystal] Update crystal version 1.0.0 (from 0.35.1) (#9477)
* [crystal] update crystal version 1.0.0

* [crystal] show crystal version on CI

* [crystal][client] $ shards update --ignore-crystal-version

* [crystal][client] update pom.xml
2021-05-15 16:02:06 +08:00
William Cheng
dbdb6c51c4 fix missing space in bash script 2021-04-14 16:55:12 +08:00
William Cheng
19b68f75de
[Docker] support multi-arch build (#9246)
* multi arch build

* fix buildx

* use openjdk

* fix bash install

* remove armv7

* remove arm64

* use jre 11

* add v8

* skip bash install

* add back tests

* remove v8

* minor change

* fix tag and push

* fix tag

* skip pull request for dockerhub push
2021-04-14 11:15:12 +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
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
3506ad6f17
Ignore docker login error for PR (#8327)
* ignre docker login error

* trigger faiure

* Revert "trigger faiure"

This reverts commit ce17593d2835e1c940e11dbe6df8f88d7c82e5c1.
2021-01-05 10:46:28 +08:00
William Cheng
caf52641f0
login dockerhub before pull (#8314) 2021-01-04 13:36:34 +08:00
Tomofumi Chiba
9889e5dfba
[typescript(experimental)] fix for Deno v1.6 (#8265)
* fix for Deno 1.6

* update dependency version of Deno test code
2020-12-28 13:57:00 +01:00
Shinya Sugmoto
6a2ba0e615
test: enable typescript-axios integration test (#8163)
* test: enable typescript-axios integration test

* chore: update old dep & devDep

* refactor: use axios installed in test target

* chore(travisCI): update node version from v8.12.0 to v12.20.0
2020-12-17 11:38:19 +01:00
William Cheng
681d23d2d3
use local deno install sh (#8126) 2020-12-09 10:28:05 +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
Jim Schubert
ee1cbf6f4b
[bug][maven] Fix custom windows classpaths in maven plugin (#7587)
* [maven] Fallback to templates using classpath rather than OS-specific paths

Previous checks would cause logic in Windows to return early, for
built-in templates only. This reorganizes and simplifies the ordering
behavior.

* Match classpath check in WorkflowSettings with that in TemplateManager

* [maven] Much needed unit/integration tests

This follows similar approach used in PMD and other plugins managed by
maven.

Unit tests simply verify we can load configuration as expected into the
Mojo.

Integration tests execute actual sample projects bound to the current
build's Maven plugin. This uses maven-invoker-plugin, which also allows
for specifying the maven options in invoker.properties to execute the test.
It also provides a verification framework using groovy files with the
required naming convention of "verify.groovy". This allows us to quickly
and easily check that certain files are outputted by generation, and we
may also spotcheck file contents.

templateResourcePath option is skipped on windows. I've tested back to
version 3.3.3 and this doesn't seem to have worked consistently with how
the property works on non-Windows.

* Set groovy 3.0.5 for test harness

* Print stacktrace on Maven error in Travis

* [maven] Set groovy version in tests to supported in Java 11+

* Puts maven integration tests in separate profile called 'integration'
2020-10-18 12:05:56 -04:00
William Cheng
cbcb7ff848 comment out cpanm in travis 2020-08-04 18:07:41 +08:00
William Cheng
44726ef471
move maven,gradle tests to shipppable ci (#7108) 2020-08-02 13:32:28 +08:00
William Cheng
d143f8db5c skip some installations to shorten build time 2020-08-01 10:45:25 +08:00
Tomofumi Chiba
1f277002a1
Add Deno support to typescript(experimental) generator (#6732)
* add 'deno' to typescript platforms

* add Deno support to typescript generator

* add Deno support to typescript generator

* add Deno support to typescript generator

* add Deno support to typescript generator

* add Deno support to typescript generator

* add extensionForDeno property for typescript generator

* add URLParse Deno wrapper for typescript generator

* update deno version in .travis.yml
2020-06-27 08:32:43 +02:00
William Cheng
36930fe5cc
[PS] better code format, vendor extension naming (#6778)
* better code format, extension

* show php version

* set php version to 7.2.15
2020-06-25 18:09:44 +08:00
Tino Fuhrmann
ff68128c15
[TypeScript] Rewritten TypeScript client generator supporting fetch & jquery (#6341)
* Added http module draft

* Added generic enum

* Modified http lib, added config & middleware definition to ts-fetch

* Added model generation with imports

* Added auth module

* Added servers

* Added sample for typescript client

* WIP: Models & API

* Updated auth

* WIP: api modeling

* Implemented RequestFactory and Processor completely

* Implemented fetch client

* Ignore dist folder in typescript client sample

* Added middleware to fetch

* Restructured TypeScript generator

* Reverted: http library.send returns string again

* Removed TODOs

* Added pom.xml files to TypeScript PetStore client samples

* Removed tabs from TypeScriptClientCodegen

* Added ts client codegen to root pom.xml and travis

* Added server variable configuration to ts-refactor

* [TS-Refactor] Added tests for Object Serializer

* Added simple test for PetApi

* Fixed ObjectSerializer test

* Added handling for different http status codes and test for deletePet

* Removed tabs in TypeScriptClientCodegen

* Removed tabs in DefaultCodegen

* Additional tests for pet store api

* Fixed file uploads

* Made api call configuration separately settable

* Use string union for enums

* Remove tab

* Restructured module layout

* Use observables internally

* Added promise based middleware

* Made discriminator and attributeTypeMap readonly

* Configure discriminator correctly

* Set discriminator value automatically

* Fixed date-time and date handling

* Added comments & license info

* Added comments

* Ignore openapi-generator-cli/bin

* Removed accidentally created generated code

* Fixed compilation issues in TypeScriptClientCodegen

* Added typescript to docs/generators

* Updated docs

* Added gitignore and git_push

* Added jquery library

* Added pom.xmls, fixed packagejsons and hopefully webppack

* Removed tabs in TypeScriptClientCodegen

* Fixed a couple issues with pom.xml

* Ensured up to date

* Fixed missing fetch definition in TS default tests

* Updated typescript docs

* Refactor typescript merge master (#4319)

Merge master into ts-refactor

* Typescript refactor: stub rxjs (#4424)

* Remove unused supportsES6 field from codegen

* Add a new switch for RXJS

* Remove redundant npm dependency on rxjs4 types

* Fix return type of PromiseMiddleware methods

* Install webpack dependency to run jquery tests

* Update form-data to 2.5 which includes typings

* Add missing dependency on node typings

* Fix test artifact name typo

* Stub rxjs when it is not explicitly enabled

* Typescript refactor: Platform select for browser and node (#4500)

* Use string form of filename parameter

This works for the form-data library and is also compatible with the
browser FormData object.

* Add new option to select platform node or browser

When no platform is selected, a default is chosen by the framework
option and likewise the file data type option is implied by the
platform.

* Remove redundant import of node dns module

* Only use form-data library for node platform

* Generate npm package from npmName option

* Use method convertPropertyToBooleanAndWriteBack

* Generate typescript samples with ensure-up-to-date

* Removed tab from DefaultCodegen

* Readded missing change

* Mark typescript client codegen as experimental

* Removed whitespace

* [TS-Refactor] Top-level exports for fetch & jquery (#6138)

* Added top-level exports
* Updated generator README
* Updated typescript generator docs

* Allow browsers File type for files (#5521)

* Allow passing file parameters as File objects
* Add test for jquery upload
* Use HttpFile object for node platform
* Regenerate samples

This is by far the most common use case. A `File` object already
contains the name attribute. This commit allows that information to be
used directly.
When sending a `Blob`, in most browsers the `File` constructor can be
used to assign a file name. In all other browsers the alternative is
```typescript
Object.assign(data, { name: "foobar.txt" });
```
That is why we explicitely pass the name as third parameter to
`FormData.append`. This `Object.assign` method also works for `Buffer`
objects in node.

If one really does not want to touch the data object in the browser it
is possible to define another reference to the data with
```typescript
new Blob([data], { type: data.type })
```
or in node via
```typescript
Buffer.from(data)
```

* [TS-Refactor] Added options for npm version, repository, name and updated readme (#6139)

* Added options for npm version, repository, name and updated readme

* Removed `this`  where not required

* Updated typescript docs

* Typescript refactor fixes (#6027)

Fixes a handful of issues identified in https://github.com/OpenAPITools/openapi-generator/issues/802#issuecomment-617262139

List of changes

* Clean: Remove redundant cliOption definition

* Remove redundant directory structure in templates

If we need to have different index.ts files for the different
frameworks, we can mostly do that in the one mustache file. In the cases
where that is not possible, we can still add a new override file later.

* Use File.separator consistently

* Only export selected api type

* Simplify promise polyfill import

The behaviour should be the same, according to the es6-promise docs.
Previously tsc would report the error:
> error TS2307: Cannot find module 'es6-promise'.

* Import HttpFile in all models

* Export server configurations

* Use undefined as default body value

The empty string is not interpreted as "no body" by the browser fetch
api and thus leads to an exception during get requests

* Improve codestyle: prefer guards to nesting

* Remove verbose debug output

This should not be commited, because every developer has very different
requirements what debug information he needs to see.

* Fix: Use cleaned model names for imports

* Fix: do not call toString on undefined

* Fix typo in doc comment

* Introduce RequestBody type and remove method check

* Support media types other than json (#6177)

List of changes:

* Add */* as fallback to accept header

* Use more sophisticated media type selection

* Handle object stringify in ObjectSerializer

* Parse response with ObejctSerializer

* Fix: Correctly extract response headers in browser

* Create HttpFile objects from responses

* Handle binary responses

* Clean up dependencies and replace isomorphic-fetch

Instead of isomorphic-fetch, which is unmaintained, we directly use
node-fetch and whatwg-fetch polyfills.

* Updated versions in ts-default/jquery and ts docs

* Replaced isSuccessCode with is2xx

* [TypeScript-Refactor] Use OAIv3 spec and fix bugs in JQuery Blob download (#6416)

* Change to OAIv3 spec for TS-Refactor

* Moved samples to oaiv3 folder

* Updated package-lock

* Update pom to use OAIv3 paths for Typescript-refactor

* Renamed ts-refactor samples & tests in pom.xmls

* Fixed compile issues in ts-refactor jquery http test

* Fixed bugs in blob handling of jquery

* [Typescript] Support http bearer authentication with token provider (#6425)

* Add http bearer security

* Update typescript to 3.9

* Fix: Use Authorization header for basic and bearer

* Allow asynchronous tokenProvider in bearer auth

* Add TS-Rewrite-Jquery tests node_modules to travis caching

* Remove NoAuthentication

* Added file to generate TS samples on Windows

* Exclude btoa in browser

* Regen samples

* Remove outdated ToDo comments

* Document and optimize `getReturnType` in TSClientCodegen

* Added option to generate objects for operation function arguments

* Upgrade typescript docs

* Updated generators

* Updated samples

* Updated docs

* Readded pom.xml

* [Typescript] Support InversifyJS (#6489)

* Add config option to enable InversifyJS

* Add pascal case lambda for mustache

* Generate a class for each auth method

* Add service identifiers and service binder helper

* Split Configuration into interface and factory

This way we don't need to import the factory everywhere to do
typechecking.

* Define minimal interface for ServerConfiguration

* Add annotations for inversify when enabled

* Always expose list of server configurations

* Add samples and defalt tests for useInversify

* Simplify sample generation script

* Fix: Add object_params arg description to help

* Fix: Properly enable inversify with bool property

* Build tests in pom instead of prepublish

Otherwise running `npm install`, when the build failed was impossible.

* Update dependencies for inversify tests

* Test basic api service resolution

* Remove Promise and Observable prefix from exports

* Fix, RxJS: Import Observable in object params api

* Add ioc service identifier for object param api

* Add hint about unimpeded development

* Simplify api service binder syntax

* Remove default tests for inversify

* Add wrapper for easy promise based http libraries

This wrapper allows defining and injecting http libraries that do not
need to know anything about observables, especially when useRxJS is not
enabled. I will employ this in the tests for InversifyJS.

Not sure if we should also use this wrapper internally.

* Add named injects for remaining auth parameters

* Directly inject promise services without RxJS

* Add tests for api service binder

* Add convenience method to bind all api services

* Fix: Rename inversify test artifact

* Run bin/utils/copy-to-website.sh

* Restore changes to CONTRIBUTING.md from PR #6489

Co-authored-by: Bodo Graumann <mail@bodograumann.de>
Co-authored-by: Esteban Gehring <esteban.gehring@bithost.ch>
2020-06-15 08:12:39 +02:00
Yuriy Belenko
e282a052bf
[php-slim4] Set required PHP version to 7.2 (#6530)
* Bump required PHP version to 7.2

* Update rest dependencies to meet php 7.2

Latest phpunit 9 requires PHP 7.3, so I've set phpunit 8 as a fallback.

* Fix TestCase inheritance

* Add phpunit cache file to gitignore

* Put license @phpdoc into separate mustache

* Bump readme PHP version to 7.2

* Bump @phpdoc PHP version to 7.2

* Update Zend Diactoros with suggested package

* Refresh samples

* Remove broken tests

These tests will be fixed in next PR which moves Mock feature to
external repo.

* Point root Travis CI environment to PHP 7.3
2020-06-14 22:40:06 +08:00
William Cheng
1efeb92f6b
Migrate Perl samples to use OAS v3 spec (#6490)
* update perl samples to use oas3

* test perl in travis ci

* fix uri query

* fix comment

* fix bearer token

* fix add pet

* update body to pet
2020-05-30 17:00:22 +08:00
Jim Schubert
fb57b602c2
[ci] Execute maven and verify with no-snapshot-updates (#6415) 2020-05-25 14:30:12 -04:00