Commit Graph

6906 Commits

Author SHA1 Message Date
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
Steven Masala
43abd61144 Typescript nullable (#1730)
* fix name sanitation when using kebab case filenaming

* remove whitespaces

* nullable

* remove test comment
2018-12-22 16:49:44 +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
Jérémie Bresson
d38b9e588b
[core] support for 'x-enum-varnames' for enums in arrays (#1703) 2018-12-20 16:30:34 +01: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
Daiki Matsudate
9ff8a24895 fix description (#1710) 2018-12-20 15:55:29 +08:00
gndrm
98ae7a816c Introduced GeneratorProperties as a thread-safe clone of System Properties (#1598)
* Introduced GeneratorProperties as a thread-safe clone of System Properties

* Removed unnecessary SmartBear copyright
2018-12-19 21:46:05 +08:00
William Cheng
81cf611aa4
add nullable support to perl api parameter (#1690) 2018-12-17 17:11:23 +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
William Cheng
c05dc24e6a
Mark swift3 generator as deprecated (#1675)
* mark swift3 as deprecated

* update windows batch scripts
2018-12-16 19:20:37 +08:00
David Cloutier
06150767f4 Proposed fix for issues #1654. fix isSerializable for java jaxrs-cxf (#1656)
* Update model.mustache

fix serializable import for cxf-cdi

* Update pojo.mustache

add implements to the pojo if isSerializable is true

* Update model.mustache

add import statement to fix compile issue when {{#serializableModel}} is true

* Update pojo.mustache

remove extra space to prevent unecessary diffs in petstore examples: diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/*
2018-12-15 17:04:45 +08: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
Jim Schubert
1f95b54cef Include mavenCentral in java build.gradle (#1653)
the android dep is currently missing from jcenter. This adds
mavenCentral as an additional repository to the default java generator's
build.gradle.
2018-12-14 21:23:06 +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
William Cheng
66cff2b05a
fix alias to free form object & map (#1638) 2018-12-10 22:46:41 +08:00
feihongmeilian
489c404783 Add instructions for erlang-server (#1643) 2018-12-10 17:45:19 +08:00
Denis Korenevskiy
a27224e50d [php] bugfix: Array and Map inner schema definition can be missing. (#1586) 2018-12-10 17:43:44 +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
Akihito Nakano
f19794464b
Delete --lang option (#1592)
* Delete --lang option

* Fix -l

* Fix -l flag (windows)

* Add migration guide

* Change to -g

* Remove lang option

* Change to -g
2018-12-09 19:26:51 +09:00
Akihito Nakano
7e3e9dba11 Replace Class.newInstance() with Constructor.newInstance() (#1635) 2018-12-08 22:31:57 +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
Phil Adams
2d39f14882 Fix NPE in ModelUtils.isFreeFormObject() (#1625)
Fixes #1696

An object schema containing no properties that also has additionalProperties
set to an object schema with no properties will cause
ModelUtils.isFreeFormObject to throw an NPE.
This PR adds additional checking to avoid the NPE.
2018-12-07 23:16:58 +08:00
William Cheng
2f4bea6967
remove isNotContainer (#1629) 2018-12-07 23:10:35 +08:00
Tomek Cejner
922532da6a [core] Prevent NPE when enpoint did not define responses (#1617) 2018-12-07 11:57:16 +01: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
Erik Timmers
c0634ac213 [elm] Enable setting Http request trackers (#1609) 2018-12-06 23:41:44 +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
314b4cc54f
remove deprecated methods in default codegen (#1031) 2018-12-06 16:17:32 +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
Hemant Zope
df19c13347 [C] Resolve some issues from #1473 (#1497)
* change folder structure for external and added list as primitive type

* modified gitignore for C generator

* change include statement as per directory structure

* added projectname variable for using in cmakelists

* modified cmakefile:compile files irrespective of testfiles and add support for make install

* updated readme with how to compile and how to use

* CMakeLists change curl to 7.58.0

* fix indentation

* add remove as reserved word
2018-12-06 11:39:30 +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