Commit Graph

11337 Commits

Author SHA1 Message Date
John Wang
ed8433a849 [Golang][client] fix response decode error handling (#1291)
* handle and return API response decode error

* ensure-up-to-date

* refactor go/api.mustache for easier readability

* disable error reporting for TestPlaceOrder with invalid RFC 3339 `+0000` UTC offset present in Petstore test server
2018-10-26 18:10:59 +08:00
Benoît Courtine
f4eb96933a [Rust] Client library choice between hyper and reqwest (#1258)
* Port of PR https://github.com/swagger-api/swagger-codegen/pull/8804.

* Correction of conflict with PR #528 (missing template file).

* Add rust-reqwest samples to Circle CI tests.

* Add integration test pom.xml file with launcher to trigger cargo execution.

* Deduplicate Maven project name.

* Fix "api_key" header for Petstore.

* Better API key management.

* Fix query param for lists of objects other than strings (numbers, etc.).

* Update to reqwest 0.9, and refactor of header management (using reqwest transition feature).

* Merge scripts generating rust-hyper and rust-reqwest samples.

* Consistent full stops.

* Use raw variables in all Rust mustache templates.

* Replace production build in CI with a quick simple check.

* Update samples.

* Finish Reqwest 0.9 migration (removing "hyper 0.11" transition feature).

* Configuration implements Default trait.

* API template reorganized: HashMap is not required anymore.

* Revert "Merge scripts generating rust-hyper and rust-reqwest samples."

This reverts commit 970f996566a740045f2a986fd70fc70f11952925.

* Remove deprecated "-XX:MaxPermSize" java arg.
2018-10-26 10:24:14 +01:00
William Cheng
eb4dfe0fc1 update documentation 2018-10-25 12:29:54 +08:00
Yuen-Kuei Hsueh
d4a5cd05cc [Java][Spring] Add bean vaildation for email datatype (#1115) 2018-10-25 11:50:12 +08:00
William Cheng
196f1228e5
update python samples and comment out flake test (#1308) 2018-10-24 21:02:23 +08:00
feihongmeilian
24ea88495b For erlang-server. add two options: packageName and openAPISpecName (#1303)
* Implement the ability to read packageName and openAPISpecName from a json file

* Replace '{{openAPISpecName}}' with '{{{openAPISpecName}}}'

* Update erlang-petstore-server
2018-10-24 16:29:53 +08:00
William Cheng
76aedca6b2
Update test spec to use "localhost" instead (#1300)
* update test spec to use localhost intead

* add new files
2018-10-24 13:56:39 +08:00
William Cheng
3d7a019524
update samples and reenable ensure-up-to-date (#1304) 2018-10-24 13:56:24 +08:00
Nate Jensen
b36b4611de fix #1276 by adding colon (#1301) 2018-10-24 11:50:17 +08:00
Thibault Duperron
0aec7728f9 [Java][jaxrs-resteasy] add @Valid when bean validation is enabled (#1237) 2018-10-23 23:58:03 +08:00
mwoodland
258de8909d Add support for using Spring HATEOAS to add links in the spring gener… (#1130)
* Add support for using Spring HATEOAS to add links in the spring generator.

* Ensure that Spring HATEOAS links appear last in the JSON serialisation of objects.

* A couple of changes following code review:
1. Make sure the @JsonPropertyOrder annotation is only used when the jackson library is being used since it's a part of the jackson library.
2. Make sure to include the Spring HATEOAS dependency in the pom file for the spring-cloud and spring-mvc generators when the hateoas option is enabled.

* Don't order the json properties since there's no requirement for the links to be last.

* Remove unnecessary import.
2018-10-23 22:56:03 +08:00
William Cheng
4a0bc8f177 Merge branch 'Rizzen-ctor-without-parameters' 2018-10-23 21:50:43 +08:00
William Cheng
1418860c3a Merge branch 'ctor-without-parameters' of https://github.com/Rizzen/openapi-generator into Rizzen-ctor-without-parameters 2018-10-23 21:12:03 +08:00
William Cheng
8455dfe75d update petstore samples 2018-10-23 18:21:25 +08:00
William Cheng
0001682a08
Add file post-processing support for Java generators (#1052)
* add clang format support for java

* rename java env variable

* fix export command
2018-10-23 16:59:32 +08:00
Erik Timmers
e782001eb9 [elm] Add support for additionalProperties (#1262)
Fixes #1140.
2018-10-23 16:58:33 +08:00
john lilley
e06665f368 Set isModel property (#1275)
* Set isModel property

* Replace tab characters
2018-10-23 16:52:36 +08:00
Dec12 | Fujigon
bb056ccf3d [General] fix InlineModelResolver's logic and use openapi-generator's InlineModelResolver, so that nested "required" works correctly (#1200)
* fix InlineModelResolver's logis and use openapi-generator's InlineModelResolver, so that nested "required" works correctly

* add "required" to nested model schema

* update ensure-up-to-date to include openapi v3's jaxrs

* change test required field

* fix sample shell script, hide timestamp

* fix NPE

* move test case to petstore-with-fake-endpoints-models-for-testing.yaml

* fix jaxrs-jersey (oas3) example generate shell script to use petstore-with-fake-endpoints-models-for-testing.yaml

* add default value

* re-generate samples
2018-10-23 16:51:55 +08:00
Sebastian Rühl
51d2e4bd4c [TypeScript] typescript-axios: Added possibility to add custom axios instance. (#1274)
* typescript-axios: Added possibility to add custom axios instance.
This comes in handy if you want to use mocks in tests.

* typescript-axios: aligned to fetch API for custom instance
2018-10-23 16:42:10 +08:00
William Cheng
111a3626b2
update scala akka dependencies (#1294) 2018-10-23 16:34:27 +08:00
William Cheng
8507916d56
Update migrated generators in the migration guide (#1283) 2018-10-22 22:11:50 +08:00
William Cheng
a55533c178
Add "servers" support to Ruby API client (#1280)
* update ruby samples with OAS3 spec

* add server support to ruby api client

* minor format change

* minor format fix, skip form models

* better exception and add test for invaid value

* remove exception test code
2018-10-22 12:52:52 +08:00
raghuraman1
2b88a1d26f Boolean conversion for maven plugin (#1252)
* saving the fixes.
Used commons-configuration2 for
org.apache.commons.configuration2.PropertiesConfiguration.
It makes the configuration easier to read amongst other benefits

* removing tabs

* updating and simplifying based on sugegstion from William. This should
now fix across all generators

* upgraded pom

* added some javadocs for the new method
2018-10-21 22:24:17 +08:00
moreginger
33a1ac4397 Don't generate unused ApiException class for java/webclient. (#1165) 2018-10-21 22:01:47 +08:00
William Cheng
f1d4ae230e
Remove outdated comment (#1268) 2018-10-21 21:39:26 +08:00
sunn
0853b2d31d
Add ref support inside fromProperty (#1235) 2018-10-20 13:52:46 +02:00
sunn
e32b70d579
Allow all apis under a single endpoint to be hosted in one server (#1230) 2018-10-20 13:50:09 +02:00
Akihito Nakano
27fd224828 [CLI] Fix help command (#1279)
* Bump up airline

* Since airline 0.8, "ParserUtil.createInstance" requires CommandFactory
2018-10-20 15:06:55 +08:00
William Cheng
0326558f9a
update spring core version (#1265) 2018-10-19 00:21:40 +08:00
William Cheng
147e193b31
minor doc revision (#1242) 2018-10-18 22:53:47 +08:00
Jérémie Bresson
16f1fc0739
Consider callbacks in unused schemas (#1232) 2018-10-18 14:58:28 +02:00
William Cheng
c1afba7194
Fix jackson-databind security issue (#1259)
* fix jackson databind security issue

* fix java jersey 1 dependency

* fix java webclient dep
2018-10-18 16:29:38 +08:00
William Cheng
dcde12ac07
Add "tomplus" to Python technical committee (#1264) 2018-10-18 11:29:52 +08:00
William Cheng
d8957af76b
Update generator option (#1236)
* update generator option

* update kotlin option usage

* update lua option

* update wording for lua option
2018-10-16 23:05:14 +08:00
William Cheng
ebc2700a92
update gradle download link (#1254) 2018-10-16 23:04:50 +08:00
William Cheng
ffd72767af
Prepare 3.3.2 snapshot version (#1249)
* release_version_update

* update readme

* restore felix version

* update petstore samples
2018-10-16 10:53:12 +08:00
William Cheng
0136aeefbc
Prepare 3.3.1 patch release (#1247)
* release_version_update

* comment out ensure up to date

* release_version_update_docs

* update release table
2018-10-15 23:18:24 +08:00
William Cheng
0b6e63b427
add file post processing to csharp generator (#1238) 2018-10-15 15:25:19 +08:00
Jim Schubert
6817b4348f [cli] config-help writes doc-compat output (#1239)
This updates config-help to have more control over how the output is
written for the user. We dump config-help output for per-generator
documentation, and this cleans up some cross-platform compatibility
issues that might arise from tweaking the output for clarity in the
target file.

Previously, we'd pipe config-help output to sed, then insert the
generator name, which we then redirected to an output file. The sed
syntax had to include a trailing newline so our tabbed configs would
automatically become code tags in markdown. Inserting newlines into sed
replacement strings doesn't work the same across platforms, mostly
because of Apple's customizations to GNU programs.

This commit moves the generator name and newline insertion into the
command itself. It also includes a new --output option, allowing the
user to specify the output location of the config-help.

Currently, we only dump in plain-text, and it is only coincidental that
our plaintext output results in a desirable Markdown output. If
tabbed lines did not automatically convert to a code style block, some
generators like C# would end up with broken text (`List<T>` would become
just `List`, for example).

I had previously discussed extending config-help to output to other
formats like asciidoc. This commit does not introduce any steps toward
that end.
2018-10-15 15:21:13 +08:00
William Cheng
df98126354
Add an option to enable file post-processing (#1241)
* add option to enable post process file

* fix typo
2018-10-15 15:02:51 +08:00
Rubén Martínez
ded765bcb9 [C#] Fixed issue #1126 with invalid generation of C# children models in allOf clauses (#1127)
* Run ./bin/utils/ensure-up-to-date to re-generate samples run in the CI.

* Fixed issue #1126. DefaultCodegen now sets the hasChildren property of CodegenModel when children models are added to the model. Changed the modelGeneric.mustache template to decide whether to include a base validation model (for children to inherit) based on the hasChildren property, and not the discriminator property.

* Run the ./bin/utils/ensure-up-to-date script after fixing the issue #1126

* Reverted modification in go samples, performed by ./bin/utils/ensure-up-to-date, that are failing in CI.

This partially reverts commit 2168df0f82d987ff8d50963d34efb269b015ef98.
2018-10-15 13:13:05 +08:00
Dec12 | Fujigon
12a702ee07 fix gradle build error on java9+ (#1240) 2018-10-15 11:09:38 +08:00
Dec12 | Fujigon
fbd4411b22 fix export_generator shell script (#1223)
* fix export_generator shell script

* fix script with bash

* use bash instead of sh
2018-10-14 21:11:59 +08:00
Christophe Bornet
34409bc0d8 Update spring-cloud generator to use openfeign (#1191) 2018-10-14 12:23:50 +08:00
Marcus Weaver
8909641667 Ctor without parameters 2018-10-13 23:26:44 +03:00
Nico König
9c736731f2 fix: fix return type for api interface (#1218) 2018-10-12 17:48:06 +08:00
Tomasz Prus
71aa421179 fix: python/asyncio no-ssl-verify affects verification of server certs only (#1211)
Bug fix: python/asyncio no-ssl-verify affects verification of server certs
2018-10-12 17:05:01 +08:00
William Cheng
11b7fb4f7b
rename JS environment variable (#1214) 2018-10-12 17:03:50 +08:00
Andrew
ccf9611ad7 Add x-go-custom-tag to go-server generator (#1146)
* Add x-go-custom-tag to go-server generator

* update model templates to include x-go-custom-tag
2018-10-12 17:00:02 +08:00
William Cheng
dd8dd48a62
Revert "Various improvements (#1213)" (#1220)
This reverts commit 448680e764.
2018-10-11 20:11:51 +08:00