56 Commits

Author SHA1 Message Date
Jochen Schalanda
32adeddd8f
Fix usage of javax.annotation (#6645)
* Fix usage of javax.annotation:javax.annotation-api

* Regenerate samples

```
bin/generate-samples.sh bin/configs/java-* bin/configs/jaxrs-* bin/configs/spring-* bin/configs/kotlin-* bin/configs/other/java-* bin/configs/other/jaxrs-* bin/configs/other/kotlin-* bin/configs/other/openapi3/jaxrs-cxf-client.yaml bin/configs/other/openapi3/kotlin-*
```
2020-06-14 17:01:18 +08:00
Jim Schubert
60ceded171
[ci][cli] Moving ensures script to config-based batch generation of samples (#6509)
* Ensure CLI-level generator settings are available in additional properties

* Initial conversion to yaml configs

Configs prefix with 1- need to be manually evaluated.

* Add "other" configs not in ensure-up-to-date

* Add other/openapi3 files

* Cleanup all generation scripts

* Clean up: add missed configs and fix some openapi 3 diffs

* Move generate-samples script, error on batch failures

* Temporarily disable elm which requires skip validation of spec

* CI updates (todo: run all generators through appveyor or move to github workflows)

* Add success count to batch generation command output

* [samples] Regenerate

* Remove bin/windows

* Generate swift5 samples in bitrise

* Expand user input glob pattern

* Regenerate samples

* Update PR template

* Support config based generateAliasAsModel

* [samples] Regenerate

* [rust] Generate as alias for all samples configs

* [csharp] Move test staged file changes to in-directory

* Include "live" test files and ignore test cache files from samples.ci

* Remove concept of samples.ci staging

Generators support .openapi-generator-ignore, allowing maintainers to
explicitly ignore the regeneration of files which have been modified.

Note that the tooling does not overwrite test files whenever those files
exist, and it's not entirely necessary to add test files to the ignore
file.

* Re-add meta generator scripts

* Modify ensure-up-to-date to log stdout, so script does not look like it hangs on slower machines

* [csharp] Regenerate sample

* Set generateAliasAsModel CodegenConfigurator#toContext

This ensures the property (which is effectively a thread-local) gets set
as expected if the caller resets GlobalSettings as is done in the
GenerateBatch command.

* [rust] Regenerate samples

* Re-enable elm

* [java] Support OffsetDateTime example, fail ensures script on any generation error

* [samples] Regenerate

* Fix jersey2-java8 ignore file

* Fix elm spec validation

* Force UTC in sample generation to avoid timezone conflicts during generation (user vs ci)

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-06-09 18:28:58 +08:00
dumitru-petrusca
057c4294de
Issue 5497: Support the use of tags in the delegated Spring Kotlin generator. (#5499)
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
2020-06-07 19:24:20 -04:00
Michael Kreis
7baa72eefa
add use-site target field for JsonProperty annotation in kotlin data classes (#6186) 2020-06-07 19:23:15 -04:00
sylvainmoindron
388218bdf9
[kotlin][spring] Fix ApiUtil compilation (#6084) 2020-06-04 21:29:40 -04:00
Jim Schubert
70ca93570e
[core][general] Add metadata file tracking to aid in "Golden Tests" regeneration (#6325) 2020-05-22 16:48:32 -04:00
William Cheng
100b01844a Merge remote-tracking branch 'origin/master' into 5.0.x 2020-02-04 15:31:10 +08:00
William Cheng
b36b65964f update kotlin samples 2020-02-03 16:32:31 +08:00
William Cheng
82e2448bf2 Merge remote-tracking branch 'origin/4.3.x' into 5.0.x 2020-01-20 15:46:13 +08:00
William Cheng
04af5e0445 Merge remote-tracking branch 'origin/master' into 4.3.x 2020-01-20 15:04:34 +08:00
Jim Schubert
ea55968737
Evaluating https issues in CircleCI (on top of CiscoM31-maven-h… (#5034)
* replace http with https. Replace http://central.maven.org with https://repo1.maven.org

* replace http://www.apache.org/licenses/LICENSE-2.0 with https://www.apache.org/licenses/LICENSE-2.0

* Force HTTPS for mavenCentral gradle DSL

Co-authored-by: Sebastien Rosset <serosset@cisco.com>
2020-01-18 18:53:05 -05:00
William Cheng
165a9e0508 Merge remote-tracking branch 'origin/4.3.x' into 5.0.x 2019-12-20 20:52:27 +08:00
William Cheng
531dc30917 Merge remote-tracking branch 'origin/master' into 4.3.x 2019-12-20 20:38:49 +08:00
Bruno Coelho
265ad2297b [kotlin] add options sortParamsByRequiredFlag and sortModelPropertiesByRequiredFlag (#4707)
* [kotlin] add option to sortParamsByRequiredFlag

* [kotlin] add option to sortParamsByRequiredFlag

* [kotlin][client] sort parameters in the models

* [kotlin] update docs

* [kotlin][client] simplify sortParamsByRequiredFlag implementation

* [kotlin] experiment with sortnmodel properties by name

* [kotlin] introduce sortModelPropertiesByRequiredFlag

* [kotlin] update docs

* [kotlin] update kotlin

* [kotlin] fix tests

* [kotlin] update docs

* Revert "[kotlin] update docs"

This reverts commit 88ad825de5b4c090fe04398bdfde2e9d3252742f.

* [kotlin] update docs and petstores

* [kotlin] update docs

* [kotlin] update pet projects
2019-12-20 17:42:48 +08:00
William Cheng
11c7007429
Prepare v4.2.3 (#4663)
* update version

* update doc

* update samples
2019-12-02 15:26:01 +08:00
William Cheng
4ed742b6bc update samples 2019-11-21 15:24:13 +08:00
William Cheng
facabd4472 Merge branch '4.3.x' into 5.0.x 2019-11-21 15:19:31 +08:00
William Cheng
60f4de0f22 Merge remote-tracking branch 'origin/master' into 4.3.x 2019-11-20 18:15:22 +08:00
Massimo Siani
964260101b [kotlin-spring] add support for the delegate pattern (#3925)
* #2526 support the delegate pattern for kotlin-spring

* fix the diamond

* update the doc

* fix ci

* use Resource? instead of MultipartFile when dealing with files

* bump after rebase on master
2019-11-19 15:22:29 +08:00
William Cheng
f07b3e0521
Prepare 4.2.2-SNAPSHOT (#4497)
* update to 4.2.2-SNAPSHOT

* update doc

* update samples

* skip ocaml test

* update version

* fix version
2019-11-15 21:34:25 +08:00
William Cheng
4824bb7711 sync master, update samples 2019-11-04 09:28:19 +08:00
William Cheng
47e2c0d027
update samples (#4334) 2019-10-31 13:31:49 +08:00
William Cheng
01222268e8 update samples 2019-08-11 18:56:47 +08:00
William Cheng
5956569e7a
Prepare 4.1.1-SNAPSHOT (#3603)
* update pom

* update samples

* update pom
2019-08-10 09:41:08 +08:00
William Cheng
3e027c61da Merge remote-tracking branch 'origin/master' into 5.0.x 2019-07-27 20:53:38 +08:00
William Cheng
d0b728794d update kotlin server samples 2019-07-25 18:56:59 +08:00
wing328
8fd4539836 Merge remote-tracking branch 'origin/4.1.x' into 5.0.x 2019-07-02 22:48:41 +08:00
wing328
9df5bdabc8 Merge remote-tracking branch 'origin/master' into 4.1.x 2019-07-02 22:48:09 +08:00
Roman Müller
73966a0152 [KOTLIN Spring] add interfaceOnly option (#3050)
* move template definition to processOpts()

* add interfaceOnly option for kotlin-spring

* add template for interface only option
2019-06-27 12:23:50 -04:00
wing328
a48d7f77fb Merge remote-tracking branch 'origin/4.1.x' into sync_41x_50x 2019-06-27 18:27:20 +08:00
wing328
7534df4520 Merge remote-tracking branch 'origin/master' into 4.1.x 2019-06-26 16:01:23 +08:00
William Cheng
8e11fd9fe4
Prepare 4.0.3-SNAPSHOT (#3185)
* update version to 4.0.3-SNAPSHOT

* update readme

* update gradle, maven plugin

* update release schedule

* update samples
2019-06-20 18:50:49 +08:00
Vincent Devos
57560d365f [KOTLIN Spring] fix generation with modelNamePrefix/Suffix (#3038)
* [KOTLIN Spring] fix generation with modelNamePrefix/modelNameSuffix

* fix indent

* fix indent

* fix indent

* fix indent

* fix indent

* fix indent
2019-06-04 21:57:43 +08:00
Andrej Završnik
caac76c265 Kotlin-Spring template fixes/improvements (#3007)
* Fixed case where invalid comma is added to consumes/produces list in case last element is empty.

* Changed default HttpStatus.OK response to match first response code in definition.
Allowing also other responses 201, 202 ...

* Changed default HttpStatus.OK response to match first response code in definition.
Allowing also other responses 201, 202 ...

* run ./bin/kotlin-springboot-petstore-server.sh
Updated APIs
2019-06-03 20:48:40 +08:00
William Cheng
46da7fe0e9 Merge remote-tracking branch 'origin/4.1.x' into 5.0.x 2019-06-03 09:28:51 +08:00
sylvainmoindron
7916f2f880 [kotlin-spring] add reactive behavior via Kotlin coroutines (#2934)
* kotlin spring : add reactivity via kotlin's coroutines

* add kotlin spring boot reactive samples

* bug : fix spring version and import for coroutines

* remove exception handler for reactive (webflux doesn't support it)

* add spring milestone repository to maven pom

* add reactive type for list in Api and ApiImpl methodes for mathching body responsive parameter

* fix baseType for ArraySchema

* regenerate samples

* updating documentation
2019-06-02 15:50:45 -04:00
William Cheng
7e457f7e41 sync master 2019-06-03 00:32:13 +08:00
William Cheng
8d3a1a5add Merge remote-tracking branch 'origin/master' into 4.1.x 2019-06-03 00:06:43 +08:00
Jérémie Bresson
dc81574f2b Update version to 4.0.2-SNAPSHOT (#3047)
* Update version to 4.0.2-SNAPSHOT

* Update samples

* Change AppVeyor script (test of gradle sample)

* Fix release version bump script (gradle plugin, sample poms)

* Include sonatype snapshots in maven examples which reference 4.0.2-SNAPSHOT
2019-06-01 21:32:44 -04:00
fj-roman
7109f5fb3b [kotlin] add testFolder configuration for kotlin (#2975)
* add apiSuffix configuration

* refactor the global option apiSuffix to kotlin specific feature

* add testcase

* add testFolder for kotlin gen

* add basic api_test.mustache template

* add api_test,mustache

* add tests

* improve usage of file separators

* replace defined file separator into os specific separators

* improve test templates and kotlin-springboot sample

* add test dependecies into gradle template

* add newline into template file
2019-05-26 17:12:31 +08:00
William Cheng
94fc0474b9 update version 5.0.0-snapshot and samples 2019-05-15 01:54:29 +08:00
William Cheng
24187b8186 update petstore samples 2019-05-15 00:10:03 +08:00
William Cheng
cbe39ba881 Set version to 4.0.1-SNAPSHOT (#2882) 2019-05-14 10:28:32 +02:00
Vincent Devos
ef26ce68d4 [Kotlin] client improvement / remove WildCards in client/server (#2862) 2019-05-11 11:42:11 +08:00
William Cheng
25d39c3634 add new kotlin sample file 2019-04-06 18:42:33 +08:00
Mike Wilkes
67b3766332 [Issue#392] Correct issue with OAuth scopes not propogated correctly (#1982)
If a path defined security to an OAuth type, and defined scopes, the scopes from the
components definition were still being used, rather than the (most likely shorter) list
of specific scopes for the path.

This copies all the component security information over EXCEPT for the scopes. The scopes
to be included are determined by the path's security settings.

NOTE: Modified the petstore.yaml file so the GET operations only have read:pets scope and
utilized the Kotlin server sample to verify output. Sample output updated only for this scenario
2019-04-05 18:49:29 +08:00
Esteban Marin
88cdbbc41f [Kotlin SpringBoot Server] alternative: fix optional parameter not correctly declared in service (#2539)
* fix kotlin optional parameters

* ensure kotlin samples up to date
2019-03-28 22:30:58 +08:00
William Cheng
1313cff93a update kotlin spring samples 2019-03-27 22:16:28 +08:00
sylvainmoindron
74fbd3454b [kotlin-spring] use spring resource for file handling (#2455)
* [kotlin-spring] use org.springframework.core.io.Resource for file handling

* run ./bin/kotlin-springboot-petstore-server.sh

* run ./bin/kotlin-springboot-petstore-server.sh after building the CLI

* use MultipartFile for file in form and the specified type otherwise

* remplace tab with space

* [kotlin-springboot] replace all instance of MultipartFile by Resource

* run ./bin/kotlin-springboot-petstore-server.sh
2019-03-27 21:44:24 +08:00
William Cheng
1c1c1ef9c3
Fix Kotlin default value (#2513)
* fix kotlin default value

* fix test cases
2019-03-27 14:04:52 +08:00