Commit Graph

5272 Commits

Author SHA1 Message Date
William Cheng
0dee995ebb
Fix discriminator name not following variable naming convention (#1742)
* fix discrimintator name not following variable naming convention

* fix test

* update samples

* use discriminator name directly in php

* single quote array index
2018-12-24 10:17:43 +08:00
tanmen
aed2c882da add nullable support to typescript-axios (#1743) 2018-12-24 00:59:13 +08:00
Yuriy Belenko
72dcee9d86 [Slim] Abstract API controllers (#1483)
* [Slim] Add abstract prefix to API controllers

* [Slim] Add userClassname property to codegen

* [Slim] Add src folder to Composer autoload

* [Slim] Change template to produce abstract controllers

* [Slim] Update API tests template

* [Slim] Add implementation note

* [Slim] Remove deprecated AbstractApiController

* [Slim] Refresh samples
2018-12-23 23:51:26 +08:00
Akihito Nakano
f1831533d4 [Java] Update dependencies (#1735)
* Update retrofit2

refs:
https://nvd.nist.gov/vuln/detail/CVE-2018-1000850
https://nvd.nist.gov/vuln/detail/CVE-2018-1000844

* Update samples

./bin/java-petstore-all.sh

* Implement okhttp3.Call#timeout

refs https://github.com/square/okhttp/pull/4363

* Update samples

./bin/java-petstore-all.sh

* Update Play26CallFactory

* Fix indent
2018-12-23 19:03:50 +08:00
Akihito Nakano
05107032d1
Fix missing closing parenthesis (#1739)
* Add a script to generate kotlin client samples from OAS3

* Generate kotlin client

* Fix missing closing parenthesis

* Update samples

* Add build folder to gitignore
2018-12-23 09:54:51 +09:00
William Cheng
667275fb25
Fix C# client warnings (#1737)
* fix csharp warnings

* fix incorrect line break removal
2018-12-23 08:06:55 +08:00
Jérémie Bresson
a7dfc650b6 Swagger parser update: 2.0.8-OpenAPITools.org-1 (#1721)
* Update Swagger-Parser Version

* Update samples

* surpress javadoc warning

* fix TS tests

* Set version to 2.0.8-OpenAPITools.org-1
2018-12-22 18:12:08 +08:00
William Cheng
77edec0c65
Revert "[Rust] Support formParams and fix list-params." (#1732)
* Revert "Disable rust-reqwest petstore test"

This reverts commit 9e1cce2e7b.

* Revert "Fix various CI issues (#1722)"

This reverts commit 77270a0118.

* Revert "[Rust] Support formParams and fix list-params. (#1678)"

This reverts commit 4a494b45d3.
2018-12-22 16:28:55 +08:00
Marco Farrugia
4a494b45d3 [Rust] Support formParams and fix list-params. (#1678)
* [Rust] Support formParams and fix list-params.

Form params were previously unsupported, and list-params would produce code that didn't compile.

* update rust samples
2018-12-21 10:08:00 +08:00
Jim Schubert
10ecc0e52f [csharp-refactor] Minor csharp refactor changes (#1723)
* [csharp-refactor] Minor changes to JSON mime usage

🐎 This maeks the regex static to reduce GC overhead for active clients.
This also removes the lowercase call on the mimetype before evaluating,
as the regex already uses the inline modifier for case insensitivity.

* [csharp-refactor] Regenerate sample
2018-12-21 09:57:38 +08:00
Tomasz Prus
89a0ffa66c feat: [python/asyncio] use ssl argument instead of ssl_context (deprecated from aiohttp>=3.0.0) (#1724) 2018-12-21 09:52:27 +08:00
William Cheng
b6e80e86b2
Add nullable support to JAXRS-CXF parameters (#1679)
* add nullable support to jaxrs cxf parameters

* remove end of file line break

* fix default value for list

* update samples
2018-12-20 16:07:45 +08:00
William Cheng
f188fa08e5
fix enum and map of neum (regression) (#1706) 2018-12-20 16:07:22 +08:00
William Cheng
93c13074ff
various fixes to csharp refactor client (#1711) 2018-12-20 16:06:29 +08:00
William Cheng
d7d994620c
Add multiple inheritance support to Perl client (#1681)
* add multiple inheritance support to perl client

* remove allof test from fake petstore
2018-12-17 15:28:20 +08:00
William Cheng
b6a23986b3
fix java instantiated lists (#1683) 2018-12-17 14:42:04 +08:00
Joe Elliott
33fbd9c78b [Swift] Updates for Swift 4.2 (#1443)
* [Swift] Update Alamofire version and update tests and Swift version to 4.2 for default and RxSwift variants

* Update promiseKit for Swift 4.0

* Update project files.

* Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator into OpenAPITools-master

# Conflicts:
#	samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj

* Merge in latest master

* Remove typo in bash file
2018-12-17 15:41:06 +09:00
Yuriy Belenko
3896821d5e [Slim] Add phplint cache to gitignore (#1686)
* [Slim] Add phplint cache to gitignore

* [Slim] Refresh samples
2018-12-17 14:21:39 +08:00
William Cheng
fb15a4baf3 [core] Update parser and core to latest version (#1569)
* Update swagger-parser to 2.0.7
* Update swagger-core to 2.0.6
2018-12-17 06:56:46 +01:00
Dec12 | Fujigon
7609398150 Fix the bug header bean validation is not performed (#1661)
* update template

* update template

* update samples
2018-12-15 16:37:25 +08:00
meganemura
82fcde1d91 Improve model class of ruby-client (#1670)
* Add Model.build_from_hash

* Use Model.build_from_hash instead of Model.new.build_from_hash

* Update sample for ruby-client

* Update sample for openapi3 ruby-client
2018-12-15 16:24:03 +08:00
William Cheng
8c599ebf12
Add support for multiple inheritance (#1664)
* add all parent names

* clean up supportsInheritance

* fix npe

* fix allVars, fix test cases

* add more tests, remove comments

* update docker m2 cache dir, add more tests, fix mandatory

* update samples

* regenerate js spec files

* add logic to detect self reference

* add isSelfReference flag to codegen property

* add ruby tests for cat model

* remove debugging info

* fix JS allvars not have x-js-doctype

* update samples

* update js samples
2018-12-15 00:24:36 +08:00
William Cheng
587bd56655
add mavencentral to build.gradle (#1674) 2018-12-15 00:22:11 +08:00
ccozzolino
95c744381b [JAVA][Server] Fixed issue #1525: Fix model class field initializations (Regression since 3.3.1) (#1549)
* Fixed issue #1525. Adjust class field declarations with proper initializations.

* Adjusted templates to add default only when it is exists.
2018-12-13 01:11:47 +08:00
feihongmeilian
489c404783 Add instructions for erlang-server (#1643) 2018-12-10 17:45:19 +08:00
William Cheng
98aa5f8db2
add erlang-proper to shippable CI (#1642) 2018-12-10 17:43:00 +08:00
Juan Facorro
87bc9d436f Introduce optional weight function for commands and other improvements (#1618)
* Generator erlang-proper

Used to generate PropEr generators for property-based testing

* Rearrange *_statem.erl functions and remove *_statem.hrl

* Optional weight function

* Optional argument to override generated values

* Export function with arity 1

* Move syntactic sugar to header file

* Only provide body when its allowed

* The weight function should not depend on the state
2018-12-10 11:41:12 +08:00
John Bush
c4f0521e10 Fix escaped regex values in Python client (#1517). (#1539)
* Fix escaped regex values in Python client (#1517).

* Override PythonClientCodegen toRegularExpression() method to correct
  issue with backslashes being escaped. This issue was a result of
  calling escapeText() in the parent DefaultCodegen class.

* Only escape unescaped forward slashes in PythonClientCodegen.

* Override addRegularExpressionDelimiter in PythonClientCodegen.java
  such that only unescaped forward slashes in the pattern get escaped.
* Adds a new test resource .yaml file for specifically testing this
  issue.

* Check for regular expression modifiers in PythonClientCodegen.

* Adds check in postProcessPattern() in PythonClientCodegen.java to
  check if regular expression has modifiers defined. If so, it throws an
  exception as modifiers are not currently supported in the Python
  client.

* PythonClientCodegen warns that regex modifiers are not supported.

* Changes behavior in PythonClientCodegen.java to no longer throw an
  IllegalArgumentException in the case that a pattern contains
  modifiers. A warning message will be logged instead stating that
  modifiers are not currently supported by the codegen class.

* Remove warning for PythonClientCodegen regex modifier support.

* Removes warning message from PythonClientCodegen.java stating that
  regular expression modifiers are not currently supported. Further
  code review and testing revealed that this feature is already
  supported and working.

* Add updated Python client sample files.
2018-12-08 11:32:55 +08:00
William Cheng
774013c7e1
Better OpenAPI spec v3 support: allOf, anyOf, oneOf (#1360)
* add oneOf support to Ruby

* add anyOf support to ruby client

* add discriminator support to ruby client

* fix typo

* update samples, fix NPE

* better format in ruby generator

* fix test cases, disable mapping test

* fix update script, update samples

* add test, fix mapping

* update exit code

* reenabled discriminator test

* remove duplicated properties

* add test for duplicated properties

* update samples, add new spec

* fix ruby test cases

* fix hasMore after removing duplicates

* refactor method, comment out haskell client test

* fix hasMore and update samples

* fix parent detection

* fix discriminator check

* [haskell-http-client] need to use {{vars}}{{required}} instead of {{requiredVars}}

* remove deprecated methods in default codegen (#1031)

* regenerate samples

* remove commented code
2018-12-07 00:30:20 +08:00
William Cheng
92d60b684a update samples 2018-12-06 18:58:21 +08:00
Jaumard
d40cbf9dbd add default timeout to calls (#1596)
add properties to send or not null values
update deps
2018-12-06 18:34:01 +08:00
William Cheng
d57009d14d Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator 2018-12-06 17:22:19 +08:00
Atsushi Hanaoka
ced6e0502e [typescript] Avoid strictNullChecks errors for apiKeys (#1611)
* [typescript] Avoid strictNullChecks errors for apiKeys

fix #1607

* Run ./bin/{LANG}-petstore.sh

- ./bin/typescript-angular-petstore-all.sh
- ./bin/typescript-inversify-petstore.sh

* Run ./bin/security/{LANG}-petstore.sh

- ./bin/security/typescript-angular.sh
- ./bin/security/typescript-angular2.sh
- ./bin/security/typescript-inversify.sh

* [typescript] Fix parameter name sanitization

* Fix invalid consumes of petstore-security-test.yaml

* Run ./bin/security/typescript-*.sh
2018-12-06 17:10:45 +08:00
William Cheng
21b2b20c2d Merge remote-tracking branch 'origin/4.0.x' 2018-12-06 12:21:14 +08:00
Prateek Malhotra
1e023f3b6e [Typescript][Fetch] Fix bugs with new typescript-fetch generator (#1545)
* [Typescript][Fetch] Always initialize queryParameters

* [Typescript][Fetch] Resolve date and date-time formats to parameter type Date

* [Typescript][Fetch] Update models template

- Add `readonly` modifier to readOnly parameters.
- Omit readOnly parameters from requests when serializing models
- Use allVars in models template when serializing/deserializing requests

* [Typescript][Fetch] Omit time component when parameter format: date

* [Typescript][Fetch] Add moduleResolution: node option to tsconfig.json

* [Typescript][Fetch] Added non-model enums
2018-12-06 12:20:34 +08:00
William Cheng
4be605bcb7
GraphQL Server (#1603)
* Add GraphQL express/apollo server generator

* add basic resolvers; adjust parameters/input types

* small adjustments and improvements

* adjust logger config for GraphQL generators

* remove MaxPermSize form bash script as it will be removed from later Java versions; add isNullable utility helper method; Adjust TODOs for graphql implementation

* re-created samples for graphql config and server generators

* re-added templates for graphql config generator

* add graphql-config-petstore bash script

* add isNullable utility method

* fix javadoc issues

* adjust licence headers

* rename Generator to Codegen for GraphQL classes

* renaming, minor enhancement to graphql generator

* add graphql server samples

* add windows batch files, rename directory
2018-12-05 18:20:53 +08:00
William Cheng
01ac429954
fix TS version check (#1616) 2018-12-05 18:06:55 +08:00
Philipp Kainz
10ea00066a [typescript-angular] Angular 7 compatibility of dependencies and package generator (#1613)
* added Angular v7 compatibility version support

* fix logic error

* updated petstore samples

* fixed failing tests and added Angular 7 client test app
2018-12-05 15:15:51 +08:00
Mark Thebridge
4930f75dc7 Generic JSON body support in rust-server (#1523)
* Ensure that generic JSON bodies are correctly autogenerated

Generates valid Rust for an arbitrary JSON response body of type `object` with no other schema.
2018-12-04 16:51:59 +00:00
William Cheng
8795bff35e Merge remote-tracking branch 'origin/4.0.x' 2018-12-04 23:26:52 +08:00
Fabrizio Ferrai
6976a8c775 Upgrade haskell-servant generator to latest LTS (#1469)
* [Haskell Servant] Upgrade to lts-12

- Upgrade Servant to the latest version
- Add Maybe for optional values
- Add UUID, UTCTime and Day types
- Fix the URL configuration so that it has one param with all data
- Add Data and ToSchema instances to models
- Switch to TLS http manager so it can connect to https urls
- Add nicer API to call the endpoints
- Add Nix support

* [Haskell Servant] Upgrade Petstore

* [Haskell Servant] Delete old swagger-petstore samples

* [Haskell Servant] Use generics for ToForm and FromForm instances

* [Haskell Servant] Generate ToSchema instance only if it's safe to do
2018-12-04 19:03:08 +08:00
Juan Eugenio Abadie
e84c59f4cc [cpp rest-sdk] Add status code to response handler (#1541)
* Add status code parameter to the response handler

* Update PetStore
2018-12-04 18:35:39 +08:00
Kiran-Sivakumar
0a33ad465f [Java][okhttp-gson] Fix bug when performing OAuth token retry (#1576)
* Fix access token retry bug

* Update petstore samples

* Remove newline

* Import Pair and List in RetryingOAuth template

* Update petstore samples

* Update petstore samples
2018-12-04 18:33:10 +08:00
Rubén Martínez
e3ab059530 [csharp] Fix #1531 with non-nullable enums on operation parameters not compiling (#1543)
* Run ./bin/utils/ensure-up-to-date to re-generate samples run in the CI.

* Fixed issue #1531. Now in C# operation parameters are post-processed to correctly mark them as enumerations. The api.mustache C# template now marks parameters as nullable when they're non-required enums.

* #1531 Added fix for enum, non-required parameters to the interface of the auto-generated C# Apis.

* Fixed error with the development of ticket #1531, which duplicated nullable question marks for primitive types.
2018-12-03 17:28:08 +08:00
William Cheng
dfa7e616c0 Merge remote-tracking branch 'origin/master' into 4.0.x 2018-12-01 19:18:27 +08:00
William Cheng
2f4dc9a049
Prepare 3.3.4 release (#1583)
* update release version

* update doc for 3.3.4 release

* comment out stack installation due to error in travis
2018-12-01 01:00:06 +08:00
William Cheng
cf2ddb8b8c
Fix header parameters display in the documentation (#1579)
* fix header parameters display in html

* fix cwiki header, remove test header parameter
2018-11-30 20:57:52 +08:00
William Cheng
8f8d3547f6
Update JS client dependency (#1578)
* update js dep

* fix missing comma

* remove unused test files in JS

* remove StringBooleanMap.spec.js

* remove StringBooleanMap.spec.js
2018-11-30 18:47:32 +08:00
William Cheng
b226f52d13 Merge remote-tracking branch 'origin' into 4.0.x 2018-11-30 10:16:16 +08:00
sunn
308515bbc1
[cpp-qt5] client response headers and validation of properties for client and server (#1508)
* Add validation of required properties
Add Header extraction for client
* Remove some todos
* Add Test for Store API
Improve some checks for serialization
2018-11-29 11:00:37 +01:00