Commit Graph

12185 Commits

Author SHA1 Message Date
Jim Schubert
a02cb19d31 [docs] Document new templating engine, adding ability to reference templates by file to comlete the example (#2773) 2019-05-05 18:03:28 +08:00
Vincent Devos
c33547e0f1 [JAVA][KOTLIN] fix var Naming for all uppercase with Numbers (#2794) 2019-05-05 17:41:06 +08:00
Jonas DOREL
f2f12b9e04 [Documentation] Add instructions to build the javascript client module (#2806)
* Add instructions to build the module

* Updated samples
2019-05-05 17:32:05 +08:00
William Cheng
92eacdfda9
use mvn instead of run-in-docker (#2821) 2019-05-05 16:59:11 +08:00
William Cheng
9c89e6af25
Better handling of form data (#2818)
* better warning message, better handling of form payload

* fix form data detection

* better format
2019-05-05 16:05:18 +08:00
Fabrizio Ferrai
250e5284cd [haskell-servant] Add some missing types to the generated modules (#2675)
* Add some missing types to the generated modules

* Run bin/openapi3 script
2019-05-04 17:05:15 -05:00
Jim Schubert
9dcab9de6b
Clarifies need to build project for sample output (#2819)
PR template seems to assume contributor is compiling the project, and would have had "latest" build completed locally. New contributors making template or documentation changes may not have built the project at all, and wouldn't know to do so based on previous PR template instructions.
2019-05-04 14:39:57 -04:00
Andy
6b94aba8a1 [Elm] Bugfix .encode in modelTypeDiscriminator (#2807)
The function is called `encode`. This fixed the call.

See dfa7e616c0/modules/openapi-generator/src/main/resources/elm/modelTypeArray.mustache (L11)
2019-05-04 15:24:47 +02:00
Jim Schubert
73d9d2d641
Apply strict spec option to CodegenConfig instance (#2814) 2019-05-03 19:32:05 -04:00
sunn
561c1e0646
Use super class methods for Model and Api Filenames (#2787) 2019-05-03 19:14:12 +02:00
Jim Schubert
a2fb88c1c1
[all] Adds strict spec option (#2783)
* [all] Adds strict spec option

Introduces an option to allow user customization of strict specification
behaviors. For instance, OpenAPI 3.x requires a path object name to be
prefixed with '/' so we append any missing '/', but this may not be
desirable to some users or generators. In this commit, this fix specifically is
the only modification affected.

* Clarify strict-spec docs, add option to README.md

* Update CLI options in docs/usage.md
2019-05-03 10:57:47 -04:00
William Cheng
e71eb3020c
add warning about .net 2.0 framework without support (#2804) 2019-05-03 22:44:39 +08:00
Jérémie Bresson
814d5b3cc2
[java] add test for Enum_Test (#2801) 2019-05-03 10:15:34 +02:00
Vincent Devos
bd0d6af968 [TypeScript-axios] fix using withSeparateModelsAndApi and withoutPrefixEnums with additional-properties option (#2719) 2019-05-03 11:40:20 +08:00
sunn
d373cde1df
[ASP.NET Core]Switch registry to MCR for dotnet images (#2789)
* Switch registry to MCR for dotnet images

* Update PetStore

* Reverted EOL image tag 2.0
2019-05-02 19:23:01 +02:00
sunn
d112eea088
Process server port (#2782) 2019-05-02 19:22:23 +02:00
sunn
1c16d9a9e8
[C++][Pistache]Fix import of model header (#2781)
* Fix import of model header

* use method from super class
2019-05-02 19:20:23 +02:00
Jim Schubert
bd775a992c [general] Remove swagger-codegen "lang" mappings (#2785)
For 4.0.0, we've removed the "lang" option. This removes any mappings
from swagger-codegen "lang" to openapi-generator "generator" options.
2019-05-02 17:53:41 +08:00
Alexis Yushin
4b414d81d4 dart2: Do not add non-nullable fields to model json (#2777)
* do not add non-nullable fields to model json

This fix would avoid adding and sending fields that are not isNullable in the request.

* updated sample for issue #2535
2019-05-02 16:31:38 +08:00
Erik Timmers
006cfa35e6
[elm] Fix repetitive enum prefixes (#2784)
Fixes #2759.
2019-05-02 10:05:39 +02:00
SalDiAngelus
f9d04c9c23 Fixed checking for optional properties when converting from json. (#2779) 2019-05-01 23:18:38 +02:00
sunn
1fddb69960
Allow socket address reuse option (#2780) 2019-05-01 23:16:53 +02:00
William Cheng
05053f5b8a [ASP.NET Core] minor format fix, better null check (#2778)
* aspnet core format fix, better null check

* minor wording change

* update doc
2019-05-01 16:55:14 -04:00
dan-drl
40759a57fb [C++][RESTSDK] support enums (#2749)
* Support enums

* Updating petstore sample

* Use enum class instead of just enum

* Use string_t for g++ compatibility

* Add enum descriptions

* Fix string parsing. Make g++ compatible.
2019-05-01 17:22:05 +02:00
William Cheng
26c493b4a1 Merge branch 'fschlag-master3' 2019-05-01 21:30:13 +08:00
William Cheng
4203cd468c update c-sharp samples 2019-05-01 21:04:44 +08:00
William Cheng
4e7f1876b5 Merge branch 'master' of https://github.com/fschlag/openapi-generator into fschlag-master3 2019-05-01 21:00:12 +08:00
William Cheng
a88e0acc47
[C#][.NET Core] fix map instantiation in models extending Dictionary (#2776)
* fix map type in csharp netcore

* add new files for csharp netcore client
2019-05-01 20:48:05 +08:00
William Cheng
09559da027
Add a link to the article on "Simply How" (#2774)
Add a link to the article on "Simply How"
2019-05-01 15:15:45 +08:00
dan-drl
a7df4adcf5 [C++][RestSDK] Windows vcpkg vs2017 support (#2751)
* Add boost-uid to vcpkg isntall command. It's required.

* Add instructions for building on visual studio 2017

* Add section to support vcpkg and visual studio

* Undef U on windows to stop compiler error

* Update pet store sample

* Move undef U to apiclient-header

* Slight change to address compiler warning
2019-04-30 22:27:22 +02:00
Jim Schubert
5ea4391af5 [cli][gradle] Adds package name as a global option (#2557)
* [cli] Support packageName as global option

CLI supports other package-related options (--api-package,
--model-package, --invoker-package). This aligns those options with
--package-name to avoid confusion about how to configure these options
where those are supported.

This intentionally does not apply a packageName getter/setter to
DefaultCodegen to reduce the footprint of this change.

* [gradle] Add packagName as global option

This makes packageName available as a global option, beside apiPackage,
modelPackage, and invokerPackage to reduce potential confusion about how
to configure the four of these options by generators which support them.
2019-05-01 00:46:48 +08:00
Vincent Devos
a5235f25b4 [TypeScript] Generate oneOf schemas as type unions (#2647)
* [TypeScript] Generate oneOf schemas as type unions

* [TypeScript] Generate oneOf schemas as type unions

* [TypeScript] Generate oneOf schemas as type unions

update aurelia sample
2019-05-01 00:46:05 +08:00
William Cheng
d3f418166b
mark java jersey1 client as deprecated (#2767) 2019-04-30 19:14:52 +08:00
Vincent Devos
0ece56209f minor typo fix in samples : "pestore" -> petstore (#2763)
* minor typo fix in samples : "pestore" -> petstore

* add typescript-rxjs in samples auto-labeled bot

* Changing file permissions
2019-04-30 17:55:44 +08:00
Florian Schlag
651ead1346 Additional null check before doing SequenceEqual check 2019-04-30 10:32:49 +02:00
Jacob Floyd
942a0dafb6 [Python Connexion Servers] BUGFIX: handle . in package names (#2508)
This fixes adding supporting files to packages that have a '.'.

If the controllersPackage or modelsPackage has a '.' (eg to put the
controllers and/or models in a subpackage of the invokerPackage),
supporting controller and models were ending up in directories that
included the period instead of converting the periods to file
separators.
2019-04-30 14:52:22 +08:00
Jim Schubert
baf0e85216
Load TemplatingEngineAdapter via Service Provider (#2755) 2019-04-29 15:17:11 -04:00
William Cheng
1dd3188361
Add a link to OpenAPI Generator eBook (#2762)
Add a link to OpenAPI Generator eBook
2019-04-29 23:05:30 +08:00
ota42y
044961f481 Pass opts argument to api client in ruby-client (#2754)
* Pass opts argument to api client in ruby-client

We want to change the option when debugging, changing timeout to specific api, etc...
So we want to merge and pass options to api client.

* fix ruby-client

* fix openapi ruby-client

* fix typo

* fix template
2019-04-28 18:44:24 +09:00
dan-drl
0ebc714d29 [C++][RESTSDK] models header fix (#2750)
* Fix issue including header, the filename not the class name should be used to import a header file.

* Include header file name, not class name.

Header file name and class name differ.

* Update petstore samples
2019-04-28 01:07:24 +02:00
Sebastien Arod
567eb6cdd3 [Bug][Python]Support body as bytes when Content-Type is unknown (#2626)
* Support body as bytes when Content-Type is unknownfix #2623

* Revert unwanted import changes

* update samples/openapi3
2019-04-27 01:45:34 +08:00
Vincent Devos
0ae43fcb7a [Elixir] update to 1.6 version (#2741)
* [Elixir] update version / add test

* update samples (add missing 200 responses in petstore-with-fake-endpoints-models-for-testing.yaml)

* [Elixir] update to 1.6 version

* [Elixir] fix test petapi
2019-04-26 22:38:11 +08:00
Vincent Devos
6e6926a8b8 [TypeScript] harmonize gitignore file (#2746) 2019-04-26 22:34:24 +08:00
sunn
19619251f5 Fix filename generation due to camelize rework (#2744) 2019-04-26 13:30:29 +08:00
Jim Schubert
8bbeb8b7e3
Feature: Experimental Handlebars support (rienafairefr) (#2657)
* new module: openapi-generator-core
* templating engine adapters to support extension (currently only Handlebars)
* new `-e` templating engine CLI option
* adapt Generator to process Template with the passed TemplatingEngineAdpater
* add a MustacheEngineAdapter to the codegen in the unit tests
* force default MustacheEngineAdapter
* copy new core module in the root Dockerfile
* add processTemplatingEngine to CodegenConfig, to be overriden by Codegen classes if needed
* support multiple file extensions per templating engine adapter
* Extends handlebars experimental adapter with explicit contextual resolvers (e.g. map processing)
* Add new openapi-generator-core/pom.xml to release_version_update.sh
* A detailed message will be logged on missing handlebars helper
* Adds README documentation around template default and beta options
* Moves mustache package under new templating package
* Include built-in handlebars helpers which require explicit registration, and custom `startsWith` helper.
2019-04-25 21:52:50 -04:00
sunn
61ed2eecef
Add server port processing (#2743) 2019-04-26 02:32:30 +02:00
aspaseltiner
11dc675221 Remove quotation marks around {{paramName}} for header params in api-body.mustache (#2727) 2019-04-24 17:15:32 +02:00
Akihito Nakano
5b7dbd1d5f Add FiNC Technologies (#2728) 2019-04-24 10:58:57 +08:00
William Cheng
3785165e07
fix missing parenthesis for http bearer auth (#2723) 2019-04-24 10:46:40 +08:00
Ferdinand Beyer
cff6eaa108 Add missing closing parenthesis (#2720) 2019-04-24 00:56:38 +08:00