8767 Commits

Author SHA1 Message Date
Jens Oberender
82700e5958 Fix for the added interceptor and when the http client is set several times, which leads to a stack overflow because of too many interceptors. (#2420)
Also added tests for that.
2019-03-18 11:04:43 +08:00
Adrian Price
9bb94fe95d Fix #2340 (#2387)
Test case was using an invalid mixture of File.getAbsoluteFile|Path()
and File.getCanonicalFile|Path() to identify generated output files.
2019-03-18 11:02:59 +08:00
William Cheng
d18bf044e8
[Java][C#][JS] remove localVariablePrefix (#2423)
* remove localVariablePrefix from template

* remove local variable prefix option from java gen

* remove local var from c#, js

* update doc
2019-03-18 10:46:33 +08:00
Karl von Randow
28ddad44e5 TypeScript: add typeRoots to tsconfig (#2395)
* TypeScript: add typeRoots to tsconfig

This avoids typescript looking in parent directories to find type definitions. We don’t _need_ this behaviour from typescript, as this module is self-contained. If we don’t block this behaviour from typescript, and you put the generated source inside a project that already has a node_modules/@types directory, you can run into conflicts when some types require newer versions of TypeScript than is used by this module.

* Update petstore examples for all TypeScript variants
2019-03-17 21:22:33 +08:00
William Cheng
22d21afceb
Fix boolean example value in ruby client generator (#2431)
* fix boolean example value in ruby

* update samples
2019-03-17 18:06:02 +08:00
Vincent Devos
a6a1264f25 [GRADLE] upgrade to 2.16 in java/scala/androit client to fix Vulnerability (#2416) 2019-03-17 17:40:11 +08:00
Akira Tanimura
40253a5b82 [Ruby] Fix type mapping for Ruby (#2385) (#2386)
* maps 'boolean' to 'Boolean' in Ruby (#2385)

* update Ruby client samples (#2385)
2019-03-17 11:07:00 +08:00
William Cheng
94466d54b3 Remove global options from PHP generators (#2403)
* remove global options from php generators

* update doc
2019-03-17 09:57:45 +09:00
sunn
2ea4025d2b
Fix generation of optional file when model name prefix is selected (#2341) 2019-03-16 17:38:19 +01:00
sunn
f41f50c3e5
[C++] [Qt5 Server] server allow api handler override of generated code (#2308)
* Allow overriding the default API handler to use a derived class from generated code
* Allow overriding the default api handler
2019-03-16 17:36:50 +01:00
Jason Henriksen
e5a0d18374 PR for ability to easily debug newly created codegen classes. (#2388)
* 2nd attempt to make the automatic checkin testing work

* trying to submit the samples in hopes that the CI matches them and passes

* found some samples I hadn't updated.  Maybe this is it?
2019-03-16 12:53:45 +09:00
Bilal Amarni
07e8b5ae03 [go] support decoding plain string responses (#2414)
For the following spec:

``` yaml
      responses:
        "200":
          description: Pong.
          content:
            text/plain:
              schema:
                type: string
```

The generated client currently fails with `undefined response type`.

In this scenario, `v interface{}` is a string pointer which can be
populated regardless of the content-type.
2019-03-15 22:17:37 +08:00
Jon Schoning
c9737cf97d
[haskell-http-client] add cli option customTestInstanceModule (#2406)
setting `customTestInstanceModule` will import typeclasses from the
specified module into tests/Instances.hs, to provide typeclass
instances for types not known by the generator

this property set using `--additional-properties`

example:
```
--additional-properties=customTestInstanceModule=CustomInstances
```
2019-03-15 07:34:46 -05:00
William Cheng
5ba35ecd31
[R] url-encode path parameters (#2397)
* url encode path parameter

* convert number to string before encoding
2019-03-14 20:54:10 +08:00
Jimmi Dyson
065bbc7bdb [Go] Fix up json check regexp and support vendor-specific mime types (#2322)
* [Go] Fix up mimetype regexps

* [Go] Support vendor-specific JSON mime types

* [Go] Tidy up unmarshalling content type checks

* [Go] Generate sample clients
2019-03-14 16:40:00 +08:00
Vincent Devos
f2ff473155 [Kotlin Server Ktor] upgrade to stable version (1.1.3) (#2333)
* [Kotlin Server Ktor] upgrade to stable version (1.1.3)

* [Kotlin Server Ktor] upgrade to stable version (1.1.3)

fix indentation

* [Kotlin Server Ktor] upgrade to stable version (1.1.3)

fix indentation

* add missing kotlin ktor in Server stubs list

* [Kotlin Server Ktor] upgrade to stable version (1.1.3)

fix compilation warnings
2019-03-14 16:38:39 +08:00
William Cheng
3e085e9492
update java okhttp dependencies (#2368) 2019-03-14 16:35:08 +08:00
Tom Ghyselinck
83bc863b2b Python apikey cookie (#2367)
* The `ApiClient` will now have support to store and use HTTP Cookies (as APIKey auth).

* Use Cookie authentication for user management.

* - Updated Python related samples.
2019-03-14 16:33:35 +08:00
Jon Schoning
33786e11f3
[haskell-http-client] add support for import-mappings (#2381)
import mappings take the form of:
```
--import-mappings %DATATYPE%=%MODULE%
```

full example (with --type-mappings):
```
--type-mappings intstr.IntOrString=IntOrString
--import-mappings IntOrString=Kubernetes.CustomTypes
```

The import-mapped module will be an exposed module of the generated library.

The import mappings will be re-exported from ImportMappings, which itself is re-xported from Models.

Model.hs
```
module Kubernetes.Model (module Kubernetes.Model, module Kubernetes.ImportMappings) where
import Kubernetes.ImportMappings
```
ImportMappings.hs:
```
module Kubernetes.ImportMappings (module ImportMappings) where
import Kubernetes.CustomTypes as ImportMappings (IntOrString(..))
```
2019-03-13 18:30:03 -05:00
Esteban Marin
ce60dbbc58 fix typescript fetch compile issue (#2383)
* fix tyepscript fetch compile issue

* generate samples

* improve fix
2019-03-13 23:12:13 +08:00
Jon Schoning
302b2fafff
[haskell-http-client] fix bug in test for Maybe A.Value from aa7ea8bdca (#2382) 2019-03-13 07:38:14 -05:00
sunn
7ba973ca7c Fix package name in the localVar types (#2378) 2019-03-13 10:13:55 +08:00
ota42y
fcfe687f19 Outputs dataType to YARD tag (#2329)
* output dataType to YARD tag

YARD supports parameter type tag.
https://www.rubydoc.info/gems/yard/file/docs/Tags.md#param

We can use `dataType` as parameter type.
So it's very useful to output `dataType`.

* update samples
2019-03-13 00:17:49 +08:00
Lukas S
317168fe9d [typescript-fetch] Support deepObject serialization in query parameters (#2234)
* [typescript-fetch] Support deep objects in query parameters

Support objects in query parameters as specified by the deepObject serialization style of OpenAPI 3:
`Object id = {"role": "admin", "firstName": "Alex"}` => `/users?id[role]=admin&id[firstName]=Alex`

Not supported due to ambiguity are arrays of objects (e.g. `person[name]=Alice&person[name]=Bob` could be an array of person objects with one name each, or one person object with an array property `name`).

* [typescript-fetch] Update sample files

* [typescript-fetch] URL-encode query parameter array elements
2019-03-12 22:20:22 +08:00
Vincent Devos
c8ecc5bf45 [Kotlin] Add ability to use modelNamePrefix/modelNameSuffix (#2349) 2019-03-12 17:47:21 +08:00
Jens Oberender
fde3252924 Port of @ngaya-ll 's pull request from swagger to openapi. (#2356)
See https://github.com/swagger-api/swagger-codegen/pull/8053
2019-03-12 11:57:57 +08:00
Vincent Devos
b1dc2eeaac [Maven doc] fix/add General Configuration parameters (#2359) 2019-03-12 10:15:52 +08:00
Elliot Lee
1491c7037c [Java] Update Javadocs for HttpBearerAuth (#2364) 2019-03-12 09:27:47 +08:00
tecywiz121
a0d907cf27 Support nullable fields in the Rust generator (#2353)
* Use Option for nullable fields in Rust (closes #2337)

* Update Rust's petstore
2019-03-12 09:20:54 +08:00
William Cheng
d2ce584a3a
Rename generator: csharp-refactor => csharp-netcore (#2348)
* renmae csharp-refactor to csharp-netcore

* update appveyor config

* update config

* update doc
2019-03-12 09:04:25 +08:00
Jon Schoning
aa7ea8bdca
[haskell-http-client] tests - in Arbitrary instances, reduce the size for non-primitive fields to prevent infinite recursion. Add special handling for Maybe A.Value (#2343) (closes #2312)
* [haskell-http-client] tests - in Arbitrary instances, reduce the size for non-primitive fields to prevent infinite recursion

* [haskell-http-client] tests - generate Nothing instead of (Just Null :: Maybe A.Value) to avoid roundtrip test errors
2019-03-11 12:30:24 -05:00
William Cheng
b128d14707
[scala-httpclient] mark the generator as deprecated (#2357)
* deprecate scala-httpclient

* update doc
2019-03-11 22:45:16 +08:00
William Cheng
b0aac250c6
remove default value from api (#2351) 2019-03-11 14:08:59 +08:00
Jim Schubert
f39e200e5d C# refactor improvements: .NET Standard and .NET Core (#2187)
* [csharp-refactor] limit available target framework

This removes .NET 3.x, .NET 4.0, UWP, and the "5.0" option (which
referred to PCL 5.0). This gives us a smaller footprint for maintenance,
and doesn't necessarily block consumers from creating custom templates
to support those target frameworks. A workaround for users wanting these
options is to build against openapi-generator 3.3.4.

This moves logic for applying additional properties to strategies per
target framework, as a means to reduce maintenance overhead at the cost
of maybe a little redundancy between strategies.

* [csharp-refactor] Fixing .netstandard support

* [csharp-refactor] Fixing netcoreapp2.0 support

* [csharp-refactor] Regenerate samples

* Fix toLowerCase missing Local.ROOT

* [csharp-refactor] Remove unnecessary bash/batch scripts, update appveyor.

* Update appveyor.yml to test for dotnet/xunit

* Update appveyor.yml

Wrap xunit console environment variables in quotes, to prevent yaml syntax error.

* Update appveyor.yml

Try to use dos-style switches, attempting to remove yaml parse error in appveyor. Previous command matched appveyor docs, but resulted in the parser error.

* Update appveyor.yml

Wrap full commands for netstandard tests in quotes

* Fix linux style slashes in dotnet build, use dotnet test over appveyor xunit

* [csharp-refactor] Update generator docs
2019-03-10 12:33:49 +08:00
William Cheng
cdb447d187 temp disable JavaJAXRSCXFExtServerCodegenTest tests 2019-03-09 18:00:56 +08:00
sunn
3739584a1a Add support for free form requests (#2288) 2019-03-09 00:03:31 +08:00
Bernd
ab8ee710a1 [typescript-rxjs] drop unneeded function wrapping (#2332)
* feat(typescript-rxjs): make internal RAW functions pricvate

* feat(typescript-rxjs): regenerate samples

* feat(typescript-rxjs): drop unneeded function wrapping

* feat(typescript-rxjs): regenerate samples

* fix(typescript-rxjs): remove "raw" from function name

* feat(typepscript-rxjs): regenerate samples
2019-03-08 23:50:54 +08:00
Lukas S
a797dd668b [typescript-fetch] Guard array mapping against undefined on optional array model properties (#2324)
* [typescript-fetch] Guard array mapping against undefined on optional array model properties (#2323)

* [typescript-fetch] Update samples
2019-03-08 23:13:55 +08:00
Tom Ghyselinck
c6a5017a13 Fix regex in Python server model code (#2314)
* - Fix regex in Python server model code.

* - Adding (regular expression) `pattern` to user name and category name.

* - Update Python server related generated code samples.
2019-03-08 17:10:52 +08:00
Vincent Devos
7124b119ea [PHP] fix bad links in Model docs (#2316)
* [PHP] fix bad links in Model docs

* [PHP] update php sample and fix tests using deleted Model

* [PHP] update php sample and fix tests using deleted Model
2019-03-08 02:08:59 +08:00
quackes
93486369fe [java]: fix datatype for non-multipart file request body (#2271)
[Spring] fix datatype for non-multipart file request body
2019-03-08 01:27:43 +08:00
Vincent Devos
e6b7ee6f4c [Java] Bean Validation for decimalmin/max incorrect when exclusive set (#2115)
the exclusiveMinimum openApi properties is not mapped in bean validation annotation templates
2019-03-07 17:00:30 +08:00
Vincent Devos
d653d2d495 Java Spring : fix defaultValue annotation double quoted in api operation (#2267) 2019-03-07 16:55:02 +08:00
Vincent Devos
14aacfaa63 Java RESTEASY : fix defaultValue annotation double quoted in api operation (#2268) 2019-03-07 16:46:09 +08:00
Julian
c00a439dcd [PHP] Username checks #1408 (#1892)
* Reverted path changes. Removed additional files in php petstore-security-test folder. Generated new samples.

* Batch and Shell scripts modified to use the same specification files for sample generation. Sample files generated.

* Input file path in PHP client batch file equalized with the input path in the shell script file. Samples generated.

* Added a missing bracket in the PHP client mustache template.

* AbstractPhpCodegen apiDocPath and modelDocPath creation adjusted to always use slash instead of system seperator, since the values will just be used in Markdown files.

* Unnecessary samples removed.

* Fixed unnecessary diversions between Windows and Linux/Mac paths in PHP codegen.

* New samples generated after rebase.

* Fixed a sample in TypeScript Angular v2 which caused CI to break.
2019-03-07 16:07:58 +08:00
Willians Cassiano
8a0248eee0 [typescript-fetch] remove namespaces in enums (#2123)
* fix #1947, namespaces on typescript fetch

* fix #1947, namespaces on typescript fetch

* reversed change in AbstractTypeScriptClientCodegen specialized TypeScriptFetchClientCodegen.postProcessModels

* removed enums in ts-fetch tests
2019-03-07 16:00:38 +08:00
Vincent Devos
49ef024cf6 [java-server-msf4j] fix and upgrade (#2303) 2019-03-07 15:59:32 +08:00
d3v-cl
49b15ee518 Dart queryargs (#2250)
* [DART2]: fix encoding query args

* [DART]fix: url encode query arguments

* [DART][DART2]feat: rebuild petstore
2019-03-07 15:52:34 +08:00
Jeff Groom
9236e50098 add Blueplanet language (#2184)
Add python-blueplanet server generator
2019-03-07 15:48:57 +08:00
Shimin Guo
0cd5fb6dc2 [haskell-http-client] fix indentation in .cabal file (#2306) 2019-03-06 07:33:30 -06:00