Commit Graph

11140 Commits

Author SHA1 Message Date
William Cheng
09a62d7fef
Minor improvements to Kotlin Spring Boot generator (#918)
* minor improvement to kotlin sprinbboot generator

* add dr4ke616 to tech comm, add zalando to company list
2018-08-29 11:34:58 +08:00
Jim Schubert
2544ace262
[docker] Fixes hub dockerfile for online project (#914)
An update was made in #876 to remove version from the generated artifact
for openapi-generator-online. The change is missing the -online suffix.
My original glob pattern put the * in the wrong place for
maintainability.
2018-08-28 18:08:51 -04:00
William Cheng
a1205f6109
add https://www.boxever.com/ to the company list (#916) 2018-08-29 00:42:40 +08:00
lukoyanov
4558e49c7e [Java] Retrofit2 Play! Framework 2.6.x support (#901)
* added play framework 2.6 support

* generated petstore sample

* generated petstore sample #2

* generated petstore sample #3

* Revert "generated petstore sample #3"

* generated petstore sample #4

* fixed circleci configs

* one more time samples regen
2018-08-28 22:48:05 +08:00
Jack O'Sullivan
5926ee5f1f Add callback model (#861)
* Add callback model (#372)

This adds a new `CodegenCallback` class, a list of which is now present in
`CodegenOperation`. `CodegenOperation` now also includes a
`isCallbackRequest` boolean since `fromCallback()` (the method added to
`DefaultCodegen` to process operations which contain OpenAPI callbacks)
uses CodegenOperation as the model for a callback request.

A `CodegenOperation` which represents a callback request will have a
`null` operation id.

A test is included for this new model.

* Generate callback request `operationId`

* Add license to `CodegenCallback`
2018-08-28 21:10:13 +08:00
Adam Drakeford
8689227b3e [KOTLIN] Spring Boot Server Generator (#820)
* Kotlin Spring initial bootstrap

* Basic configuration construction for Kotlin Spring

* Wired up with comand line client

* Initial kotlin spring boot application generated using gradle kotlin-dsl

* Added basic support for generating models

* Basic controllers generated without endpoints generated

* Basic spring boot app generated with models and controllers

* Added fix for type mapping in AbstractKotlinCodegen. Originally it was mapping list o kotlin.Array instead of kotlin.collections.List

* Fixed return type mapping

* Sorted bash springboot petstore generator script

* Implemented toVarName in AbstractKotlinCodegen to better handle some edgecases

* Checking for reserved words or numerical starting class names in AbstractKotlinCodegen

* Implemented toOperationId in AbstractKotlinCodegen

* Fixed types that were not correctly being mapped to primitives (byte / arrayOf / mapOf)

* Escaping dollar symbols in function names

* Added support for outter enum classes

* Added basic support for generating services

* Removed option for generated config package. Added option to enable/disable generated global exception handler

* Added configuration option to generate gradle. Generated maven pom.xml file as default

* Fixed up bash scripts for generating test sample code

* Added configurable option for Swagger Annotations

* Added configurable option for generating service interfaces and service implementations

* Added README generation

* Enable optional bean validation

* Added kotlin spring sample to CircleCI pom.xml

* Removed kotlin spring boot from .gitignore

* Minor fixes from PR comments for user submission (#1)

* Minor fixes from PR comments for user submission

* Puts braces around conditional block bodies with one-liner bodies.
* Modifies README.mustache to use artifact id and version supplied by
user (or default configuration)
* Targets templates under resource directory explicitly to prevent the
need to rebuild for evaluation of  template-only changes.

* [kotlin-spring] Remove comments referencing sbt in bash scripts

* List of changes based upon code review:
* Additional comments around how we set the title based off the open api spec
* Fixed missing `beanValidationCore` template
* Put the lambdas into the lambda object as other generators do (Ktor, C#, cpp)
* Bump swagger-annotations version to latest pre-2.0 version (1.5.21)
* Set kotlin version to 1.2.60
* Updated README to set port based on template
* Added more additional properties to build bash scripts
* Removed `defaultBasePath.mustache` in place of using {{contextPath}} directly
* Log warning for when `serviceImplementation` is set t o true

* Updated samples

* Generating ConstraintViolation Exception Handler, as Springboot doesnt correctly catch the error and return bad request. Handling other exceptions a litle better

* Small fix for date time mappings (plus sample re-gen)

* Minor fix in README template, where port was using wrong variable

* Fix missing jackson-dataformat-xml dependency

* Fix build - needed to re-run kotlin-server-petstore.sh

* Fixes after merge with master

* Revert "Small fix for date time mappings (plus sample re-gen)"

This reverts commit 4152dc78b4813da71c675272ca90fb31a333aea1.

* Moved type mappings to Kotlin Spring generator

* Regenerated samples

* Regenerated samples
2018-08-27 23:54:53 +08:00
William Cheng
5cd5143b80
Add test case to detect stack overflow error (#904)
* add test case to detect stackoverflow errors

* use bash insted of sh
2018-08-27 20:46:50 +08:00
Jeremie Bresson
1ea0a1e856 Revert "[CI] Change the way gradle uploadArchives works (#902)"
This reverts commit e3bd47921c.
2018-08-27 10:51:51 +02:00
William Cheng
b505795bf7
use JsonIgnoreProperties to fix recursion (#903) 2018-08-27 16:14:35 +08:00
Jérémie Bresson
e3bd47921c
[CI] Change the way gradle uploadArchives works (#902) 2018-08-27 09:06:54 +02:00
Yuriy Belenko
15cec0ae09
[Slim] Add PHP CodeSniffer to check coding style (#897)
* [Slim] Add PHP CodeSniffer package

* [Slim] Add phpcsStandard generator option

We follow PSR-2 coding style guide in PHP generators. It might be convenient
for users to specify own coding standard without modifying templates. That's
why I've added this option.

At first, I thought to add option validation and accept only standards from
predefined list. But this option also can be a full path to the standard's
root directory, I've changed my mind. User should use this option with caution.

Ref to all PHP CodeSniffer CLI options:
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage

* [Slim] Extend readme with PHP CodeSniffer docs

* [Slim] Format templates to meet PSR-2

* [Slim] Refresh samples
2018-08-26 15:26:09 +05:00
William Cheng
4401407c7c
remove eof from elm mustache template for better code format (#879) 2018-08-26 16:38:27 +08:00
Jérémie Bresson
40d815946a
[CI] use regex to check if TRAVIS_BRANCH is a working branch (#899) 2018-08-26 08:22:17 +02:00
Hugo Barrigas
37fd4264ac [JAVA][Webclient] Add constructor to allow custom WebClient to be passed into ApiClient (#882)
* add constructor to allow custom webclient to be passed into ApiClient
2018-08-25 15:22:36 +02:00
Marco
39e9206976 [Java][Webclient] Init authentication on ApiClient instantiation (#887) 2018-08-25 14:22:16 +02:00
William Cheng
50c6ac34f1
Add x-nullable (OAS2) support (#889)
* add x-nullable oas2 support

* add test spec for testing x-nullable
2018-08-25 18:31:23 +08:00
sunn
6a00b2a802
[cpp-pistache] removed model namespace when unused for operations (#775)
* Remove using model namespace when model is unused
* Add comments to clarify introduction of hasModelImport at API/operations level instead of operation/vendorExtensions level.
2018-08-24 10:52:01 +02:00
Jérémie Bresson
010b469914
[build] create jar without version in openapi-generator-online (#876)
Simplify other scripts needing this jar
Consistent with openapi-generator-cli
2018-08-24 08:50:26 +02:00
sunn
f802f8b7d7
[qt5 server] various improvements (#725)
* Improve handling of all primitive types

* Fix missing includes in case of simple APIs

* Fix minor error in template function

* Remove tabs

* Refactor code for simplicity

* Remove tabs

* rework the router for handling multiple path param

* rework router to handle multiple path parameters

* rework router to handle multiple path parameters

* rework router

* Add support for Multi path param

* Add comments to code block and remove duplicate parameters

* Remove tabs :(

* Add missing imports after resolving conflict
2018-08-24 08:47:01 +02:00
Matiss
219a88e9c6 Add support for Api key in cookie for Symfony (#884) 2018-08-24 09:53:25 +08:00
Tomasz Prus
79dacb20a0 fix: python-asyncio/aiohttp with disabled ssl verification (#891) 2018-08-24 09:43:32 +08:00
Navneet Karnani
f2b0adfa05 Nit: Language fix in README.md (#871)
* Nit: Language fix in README.md

Usage of "then" vs "than"

* update TS petstore samples
2018-08-23 17:33:38 +08:00
William Cheng
4830be0ea4
Fix Elm CI issue due to new version (0.19) installation (#877)
* update elm usage

* remove yes from elm script

* install elm 0.18

* add npm cache

* add gem env to travis

* add gem cache directory
2018-08-23 16:25:26 +08:00
William Cheng
4a5bd50202
add xml attr support in go client (#867) 2018-08-23 15:23:49 +08:00
William Cheng
6a47d49ee8
add nullable support (#873) 2018-08-23 10:51:57 +08:00
William Cheng
3d06900e68 Prepare 3.2.3-SNAPSHOT version (#870) 2018-08-22 13:39:20 +02:00
William Cheng
3259bf71e6
3.2.2 release (#869)
* run bin/utils/release_version_update.sh

* comment out ensure-up-to-date script

* run bin/utils/release_version_update_docs.sh

* fix link to lc3
2018-08-22 16:44:31 +08:00
Michael Kotten
526e980a69 [JAXRS] use contextPath variable for @ApplicationPath in RestApplication (#850)
* Use contextPath variable for RestApplication templates
* Update generated RestApplication.java files, as they are skipped by default otherwise
* Update Petstore sample for jaxrs so that CIs can verify the change
2018-08-22 09:15:08 +02:00
Jeremie Bresson
ab09909f99 Add missing import 2018-08-22 06:53:48 +02:00
Matthieu Berthomé
d8b597b168 [DefaultGenerator] consider referenced headers (#863) 2018-08-22 06:07:57 +02:00
Jens Oberender
9bc335b35e Forbiddenapis check and fix (#672)
* Added forbiddenapis check and fixed the findings in the normal code
* Fixed forbiddenapi findings in java templates and samples.
* Generated all samples for Java.
2018-08-22 06:06:01 +02:00
William Cheng
227f2779d7
escape various descriptions in the spec (#866) 2018-08-22 11:48:32 +08:00
William Cheng
2ffda45adf
Add https://www.suva.ch/ to the company list (#868) 2018-08-22 10:43:32 +08:00
marcotta
bb2712fe45 Use thread safe manager store dictionary (#864)
Fix crash due to concurrent access of managerStore dictionary.
Swift2 and Swift3 had been enhanced respectively with the following
pull requests: #3873 #5610
2018-08-22 02:27:40 +08:00
Jim Schubert
cbf61d5524 [docker] build files for automated builds (#836) 2018-08-21 23:08:24 +08:00
matthesrieke
39763a8ca7 fix unescaped description in requestBody (#857)
Fix unescaped description in requestBody
2018-08-21 22:28:32 +08:00
Jim Schubert
aa19369466 📝 Remove swagger comment, fix typo in README (#862)
I had previously copied the multi-task description in the gradle
plugin's docs from a response made in an issue. The reference to 'the
old swagger plugin' have no context in the gradle plugin README, so I've
updated that wording.

Also, I found that the link to openapi-generator-cli.sh in the root
README was broken. It pointed to openapi-generator.cli.sh instead of
openapi-generator-cli.sh.
2018-08-21 22:13:55 +08:00
Jérémie Bresson
3f65d6c350
[all] Support for Free-Form Objects (#849)
Consider "additionalProperties: true"

Fixes #796
2018-08-21 12:26:54 +02:00
Yuriy Belenko
99646e6436 [Slim] Update main documentation (#839)
* [Slim] Update main documentation

Kotlin server README has been used as a ref. There are no links to apis and
models docs, because Slim codegen doesn't provide them right now.
Also I'm not sure about white spaces, but we can change it anytime in future.

* [Slim] Refresh samples
2018-08-21 18:25:43 +08:00
Dominik Sumer
450d624474 add possiblity to pass baseOptions to the API Configuration, which will be passed to every fetch call (#642) 2018-08-21 16:25:56 +08:00
OmriHarary
ca0c35aa15 [java-server] Fix improper quoting of default values for query parameters (#708) 2018-08-21 10:17:31 +02:00
Daiki Matsudate
fcfd8ea76e Update swift samples (#738)
* update all swift samples

* fix method name starting with number literal

* better handling of operationId starting with number

* update swift 4 samples
2018-08-21 15:17:56 +08:00
ccozzolino
2044c36398 Adjust client response handler to be backwards compatible with older versions of Vert.x (<3.5) (#854) 2018-08-21 13:12:18 +08:00
Yuriy Belenko
d374e1c160 [Slim] Official htaccess (#838)
* [Slim] Change htaccess to official

Slim docs contains more simple htaccess example.
https://www.slimframework.com/docs/v3/start/web-servers.html#apache-configuration

* [Slim] Refresh samples
2018-08-21 11:59:29 +08:00
Jean-François Côté
ee491a0e5e
Fix problems in typescript jquery generator (#801)
* Add missing curly bracket + remove unnecessary `postProcessParameter` because it add 2 time "models."

* Add generated client for samples
2018-08-20 08:44:46 -04:00
Yuriy Belenko
e605882451 [PHP] Add gitignore to AbstractPhpCodegen (#765)
* [PHP] Remove PHP related rules from root gitignore

After conversation with @ackintosh we've agreed that every PHP codegen
should create it's own `.gitignore`. Client libraries(SDKs) should ignore
`composer.lock` file while server stubs better do opposite.

* [PHP] Set .gitignore as default supporting file

* [PHP] Add default gitignore to Client SDK

* [PHP] Add default gitignore to Laravel

* [PHP] Add default gitignore to Lumen

* [PHP] Add default gitignore to Silex

Seems like issue #663 and pull request #681 missed this security script,
I've changed output path in bin/security/silex-petstore-server.sh.

* [PHP] Update Slim

* [PHP] Add default gitignore to Symfony

I've copied few old rules from root gitignore to local one. These rules
should be reviewed by original SymfonyCodegen authors.

* [PHP] Add default gitignore to Zend

* [PHP] Refresh Openapi3 client samples

* [PHP] Add refs to .gitignore templates collection
2018-08-20 12:16:01 +08:00
Jérémie Bresson
b91c8e17a7 Improve documentation for usage of a generator in an other jar (#817) 2018-08-20 12:15:10 +08:00
Matiss
dcc622d374 Improve Symfony 4.1 compatibility (#830) 2018-08-20 12:11:33 +08:00
Jim Schubert
a3e5edc367 📝 Updating 'help generate' switches in README
Adds new --log-to-stderr as well as a missed option for
--skip-validate-spec.
2018-08-19 21:37:20 -04:00
Jack O'Sullivan
bd7c9e30d3 [cli] Don't log to STDOUT if debug flags are set (#474)
It makes sense that error messages should be written to STDERR and
all others should be written to STDOUT (as shown in #207). However, it
would be convenient to parse the debugging output when the relevant
flags are set.

This change will disable logging to STDOUT and redirect all log messages
to STDERR when any of the debug flags are set. (Resolves #473)
2018-08-19 21:33:49 -04:00