Commit Graph

7138 Commits

Author SHA1 Message Date
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
Shimin Guo
0695cf99e6 [haskell-http-client] update katip version bound (#2305)
* haskell-http-client: update katip version bound

0.8.0.0 is needed due to the interface change in `mkHandleScribe`

* update petstore
2019-03-06 07:31:45 -06:00
Vincent Devos
4f37e81d55 Minor fix on pom (#2304) 2019-03-06 17:22:12 +08:00
Adrian Price
2985c0f0b8 JAX-RS/CXF 1158 Options to generate fully functional method bodies passing fully populated test data (#1879)
* add option to generate alias as model

* [JAXRS/CXF] Emit method bodies, test data (#1158)

New jaxrs-cxf-extended generator with options:
 - supportMultipleSpringServices Support generation of Spring services
   from multiple specifications
 - generateOperationBody (boolean) Enables generation of fully
   functional test/service method bodies that pass/return random
   but valid values & models.
 - loadTestDataFromFile (boolean) When true, generated method bodies
   load test data from a generated JSON file. When false, generated
   method bodies contain inline code to construct the test data.
 - testDataFile (string) The path of a JSON file to contain generated
   test data. The file is initially generated but editable; edits are
   preserved by subsequent generations.
 - testDataControlFile (string) The path of a JSON file to control test
   data generation - specifically, to control the number of items
   required in array properties, structured by API class
   / operation name / parameter name. The file is initially generated
   but editable; edits are preserved by subsequent generations.
 - tests for the jaxrs-cxf-extended generator, including the new options
Bug fixes:
 - fix bug (DefaultGenerator): handle absolute paths in supporting file
   spec
 - fix bug (DefaultCodegen): process enums in allVars
 - fix bug (AbstractJavaCodegen): support multiple inheritance via
   allOf (inheritance code deleted, as a subsequent pull broke it)
 - fix bug (JavaCXFServerCodegen): use operationId instead of nickname
(gets out of step with duplicate operationIds)
 - fix bug (JavaCXFServerCodegen): set appropriate default
consumes/produces for operations with body parameters or non-void
returns (CXF providers don't handle */*)
 - fix indentation (DefaultCodegen)
 - add support for a system property openapitools.implementation.version
to specify the package implementation version when running non-JAR'd
classes in an IDE (otherwise {{{generatorVersion}}} evaluates to
'unset'.

* reformat code

* make sh executable

* fix template folder

* fix template folder, update samples

* run test data manually to avoid ci failure
2019-03-06 08:58:11 +08:00
William Cheng
37c890f755
minor wording change (#2299) 2019-03-06 01:13:28 +08:00
Benjamin Gill
bcb4b03798 Refactor and use some Java 7 features (#2225)
* Fix typo in (unused) method name

* Tidy up Rust server generator

Remove some repetition and use some nifty new methods introduced in Java 8

* Start using Objects.hash and Objects.equals

* Convert more equals implementations over

To use Objects.equals

* Convert more hashCode implementations over

To use Objects.hash. Might have the pleasant side-effect of improving
performance a bit.
2019-03-06 01:12:52 +08:00
William Cheng
c57abbe5bd
js_flow_improve (#2298) 2019-03-05 19:09:40 +08:00
Michael van Niekerk
caf404d857 Typescript+Axios: Separate model and api classfiles and package (#2005)
* Typescript 3.2

* Typescript spread operator

* Add vendor extension to the operation

* Remove url.URLSearchParams

* Generate form data in API

* Make axios scripts executable

* Reran generator

* Generate sample code

* Codegen having the model and api extra flag

* Revert to 2.4 Typescript

* COLLECTION_FORMAT.{{collectionFormat}} everywhere for consistency

* Consistency on the CollectionFormats, comment on the vendor extension

* Throw exception if api and model packages are not given

* Templates splitting api and models

* Post process the operations in the the process

* Beginning to get the axios tests up

* Ensure-up-to-date doesnt include TS/Axios tests

* Docs update for Typescript/Axios

* Merge master

* Api tests re-run

* Add windows bat file
2019-03-05 16:44:33 +08:00
Ramzi Maalej
cc1fe6eebf fix resources management (#2229)
* fix resources management

* remove obselete if statement

* throw exception when body is null

* prevent potentional nullpointerexception

* use valueOf instead of constructor

* remove duplicated code

* avoid unclosed resources

* remove redundant key

* fix broken tests

* fix sonar issues

* fix tests

* add Veamly as a company using openAPI generator

* revert back if statement to explicitly express the intention behind it
2019-03-04 22:27:54 +08:00
kemokemo
0c54286909 Apply GIN_MODE=release for the Dockerfile of go-gin-server (#2283)
* chore: apply release mode for the Dockerfile

* docs: update by `./bin/go-gin-petstore-server.sh`

* docs: update by `./bin/openapi3/go-gin-petstore-server.sh`
2019-03-04 22:24:12 +08:00
Akira Tanimura
1d02f0374b [Ruby] Escape string interpolation notation of Ruby (#2261) (#2287)
* escape string interpolation notation of Ruby (#2261)

* update samples (#2261)
2019-03-04 22:22:45 +08:00
ota42y
88abea1755 update ZenTest (#2289)
* update ZenTest

ZenTest 4.11.1 requires rubygems 2.x.

But Ruby 2.6.0 include rubygems 3.x.
So we can't use ruby client in Ruby 2.6.0.
https://www.ruby-lang.org/en/news/2018/12/25/ruby-2-6-0-released/

ZenTest 4.11.2 removed rubygems dependency so we should update.
1883b210aa

* update ruby client sample
2019-03-04 22:18:15 +08:00
William Cheng
8843df65a4
[aspnetcore] - make more configurable and generate abstract class library #2181 (#2282)
* Add ability control out put generation and support to generate a library

* Roll back pom version - it seems to break the CI/CD checks

* Roll back pom version - it seems to break the CI/CD checks

* Match with genrators - no changes from new code

* Fix inadvertent changes

* No idea why the names of params have changed pet to body for instance

* Match generated document

* Clarify logic as per PR review

* Remove the generatewwwroot option and use the buildtarget option

* Remove ar artifactVerson (not used), update docs and TODO notes

* Add ability control out put generation and support to generate a library

* Roll back pom version - it seems to break the CI/CD checks

* Roll back pom version - it seems to break the CI/CD checks

* Fix inadvertent changes

* Match generated document

* Add ability control out put generation and support to generate a library

* Roll back pom version - it seems to break the CI/CD checks

* Roll back pom version - it seems to break the CI/CD checks

* Fix inadvertent changes

* Match generated document

* Clarify logic as per PR review

* Remove the generatewwwroot option and use the buildtarget option

* Remove ar artifactVerson (not used), update docs and TODO notes
2019-03-03 23:23:17 +08:00
kemokemo
8c88f46fba Fix 2278: migrate the docker image for the aspnetcore generator (#2281)
* fix: migrate the docker image.

* doc: fix the inner port of the docker image

* docs: update samples by `./bin/aspnetcore-petstore-server.sh`
2019-03-02 19:04:03 -05:00
William Cheng
24f20941e5
fix npe when array item missing (#2247) 2019-03-02 21:48:00 +08:00
Bernd
052879d6cb [typescript-rxjs] fix enums (#2242)
* fix issue with duplicate enum exports

* regenerate typescript-rxjs samples
2019-03-01 19:09:06 +08:00
Jon Schoning
c30a21ac3c
[haskell-http-client] Allow logger selection via cabal flags. Emit Consumes */* for requestBody when not specified
[haskell-http-client] Allow logger selection via cabal flags. Emit Consumes */* for requestBody when not specified
2019-02-28 13:04:50 -06:00
William Cheng
54d9c19c77
Use https URL to download dependencies (#2248)
* fix groovy default value, use https to download dep

* update groovy build gradle file
2019-02-27 23:26:53 +08:00
William Cheng
92757581d6
better info message about using generateAliasAsModel (#2246) 2019-02-27 17:31:07 +08:00
Dec12 | Fujigon
5fe0c94135 [Java][JaxRs] bean validation annotation (e.g. NotNull) is applied to body param of api interface (#2239)
* fix template so that bean validation annotation (incl. NotNull) is applied to api interface.

* regenerate samples
2019-02-27 11:38:57 +08:00
William Cheng
b5ce0bddee
[JavaScript] Add petstore integration test to JS ES6 client (OAS3) (#2245)
* add test for js es6 oas3 client

* fix test with proper done

* add test, fix servers index check
2019-02-27 11:14:51 +08:00
Dec12 | Fujigon
aa339d6046 [core] add test cases for referenced enum case (#2237)
* add test case

* regenerate samples
2019-02-27 11:14:21 +08:00
William Cheng
9e2a9e1515
[Ruby] various improvements (#2226)
* add to_s in api error class

* rename variable to align with code sample

* fix initalize, better validation

* update petstore samples

* add code sample for model

* add auto-generated travis file

* improve error message

* add travis file

* uncomment to_s
2019-02-27 03:38:20 +08:00
William Cheng
9695090d9b
[R] Fix NPE issue due to default value using example value (#2231)
* fix NPE issue due to default value using example value

* update r petstore sample
2019-02-25 19:09:26 +08:00
William Cheng
8e7ad9c9b6
Removal of number being default to example in python client (#2228)
* remove number default to example in python client

* update python samples
2019-02-25 16:44:38 +08:00
William Cheng
e6658278ad
R client refactoring (#2215)
* [R] fix namespace, use 2-space indentation (#2105)

* fix namespace, indentation

* use 2-space indentation in model files

* update gitignore

* use PascalCase for function naming (#2106)

* [R] improve .travis.yml, .Rbuildignore (#2109)

* update travis

* enhance travis.yml

* update travis, .Rbuildignore

* [R] Add auto-generated documentations, change parameter naming (#2114)

* add auto-generated doc for r client

* remove module name

* replace nil with void

* [R] fix object serialization to JSON (#2129)

* fix object serialization

* fix array property seriziation

* fix deserializing array of string

* fix array of object deserialization

* [R] Fix return type (#2140)

* fix return type

* update r petstore sample

* add auto-generated tests (#2141)

* rename file to conform to style guide (#2142)

* add authenticaiton support to R (#2153)

[R] Add authentication support, minor ApiClient refactor

* rename test files

* [R] various improvements and bug fixes (#2162)

* fix api keys in headers

* use optional parameter in function signature

* fix property naming

* fix doc assignment operator

* [R] fix base64 encode (#2171)

* fix base64 encode

* fix basic http auth

* fix typo, update instruction (#2203)

* rename test files to conform to style guide (#2206)

* [R] improve class constructor (#2208)

* update constructor with optional parameter, default value

* update r petstore sample

* clean up files

* regenerate files

* Revert "rename test files to conform to style guide (#2206)"

This reverts commit 90a6302a6565d208a6ab298fda41a47836a63d9c.

* fix query parameter in api client (#2214)
2019-02-23 23:51:11 +08:00
William Cheng
f2002b25da
[Python] remove default value from being fallback to example (#2213)
* remove example fallback

* reset test case
2019-02-22 20:44:27 +08:00
Kevin Howell
329843bc92 Gradle - make GenerateTask properties optional (#2185)
This allows easier creation of custom `GenerateTask`. Specifically, this makes:

 - generateModelTests
 - generateModelDocumentation
 - generateApiTests
 - generateApiDocumentation
 - withXml

optional, following the same pattern as other properties in GenerateTask.

Without this change, we get `java.lang.IllegalStateException: No value
has been specified for this provider.` until these properties are
specified for the task, when attempting to define a custom generate task
(such as one to generate API docs).
2019-02-21 18:18:47 -05:00
Stefan Dresselhaus
ae376c151b Something in the dependencies changed. This switch is no longer needed. (#1850) 2019-02-20 15:25:11 +08:00
boxdot
bc6c94d412 Use oauth token for basic bearer auth in Rust. (#2161)
* Use oauth token for basic bearer auth in Rust.

* Add bearer_access_token instead of reusing oauth_access_token
2019-02-20 10:17:22 +08:00