2070 Commits

Author SHA1 Message Date
William Cheng
73564bc046 update samples 2021-04-28 17:57:26 +08:00
William Cheng
37eaf70755 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-04-28 17:48:21 +08:00
William Cheng
4aaaae765b
[Scala][Akka] Use Files.createTempFile to address security concerns (#9348)
* fix scala akka server temp file issue

* update test templates
2021-04-28 14:53:51 +08:00
Mateusz Hubert Stefaniak
b9a1c8f016
[Java][Spring] Fix for #8659 - Different in-parameter types generated for api and delegate for files (#9331) 2021-04-26 09:49:21 +08:00
William Cheng
139e9e458f
Minor improvements to go-echo server (#9303)
* minor improvements to go-echo server

* update go tech comm
2021-04-21 21:11:05 +08:00
Farshad Nematdoust
733a180a62
Add Go echo server codegen (#9224)
* Update codegen config

* Add templates for Go Echo openapi-codegen

* Add the yaml config file!

* Add GoEchoServerCodegen.java.
This is the first iteration, it works but probably needs a lot of improvements.

* Update codegen, adds some comments.

* Update GoEchoServerCodegen.java

* Update GoEchoServerCodegen.java

* Update GoEchoServerCodegen.java and related yaml file

* Add the result of generate-samples.sh for CI purposes.

* Add the result of bin/utils/ensure-up-to-date for CI purposes.

* Update go-echo-server-petstore-new.yaml
Fix the outputdir

* Update in regard to result of ./bin/generate-samples.sh

* Update in regard to result of ./bin/generate-samples.sh

* Remove wrongly generated files

* Add correct generated files.

* Add changes regarding /bin/utils/ensure-up-to-date

* Update templates to include comments.

* Update/add result of ./bin/generate-samples.sh and ./bin/utils/export_docs_generators.sh
2021-04-21 16:22:10 +08:00
William Cheng
92561085ba update ruby sinatra samples 2021-04-21 16:00:23 +08:00
William Cheng
515d4a0153
[Java][JavaJaxRS] Respect readOnly/writeOnly attribute markers (#9276)
* [Java] [JavaJaxRS] Respect readOnly/writeOnly attribute markers

Generate jackson JsonProperty like following:
- `readOnly` is present in Spec: `@JsonProperty(value = "[name]", access = JsonProperty.Access.READ_ONLY)`
- `writeOnly` is present in Spec: `@JsonProperty(value = "[name]", access = JsonProperty.Access.WRITE_ONLY)`

Edge case: both are present -> Spec is invalid and generator cancels anyway with:
> org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
> | Error count: 1, Warning count: 1
> Errors: 
>	-attribute components.schemas.Example. writeOnly and readOnly are both present

* update samples

Co-authored-by: Michael Kroll <9883575+mickroll@users.noreply.github.com>
2021-04-16 18:07:41 +08:00
William Cheng
c285f393b0
switch to oas3 spec for php-symfony samples (#9248) 2021-04-14 10:36:48 +08:00
William Cheng
1f227061c6
add sponsor message in F# giraffe generator (#9247) 2021-04-13 13:50:41 +08:00
Aliaksei Zhuk
53e5986800
[Go] Parse int arrays and respect the 'required' property (#9120)
* Added int arrays parsing in parameters. Respect the 'required' property.

* Replaced spaces with tabs

* Generate samples with new spacing

* Removed unused import

* Merged with latest master
2021-04-11 23:43:53 +08:00
William Cheng
5dae270c3e
[Go][server] parse bool in query parameter (#9171)
* Add bool query in example

* Add parseBoolParameter

* test with boolean parameter

* add endpiont for testing boolean

* remove bool parameter test

Co-authored-by: Stéphane Guillemot <gmtstephane@gmail.com>
2021-04-05 16:45:38 +08:00
William Cheng
c79d056935
Allow to specify response headers (needed for redirecting clients) (#9170)
* Allow to specify response headers (needed for redirecting clients) (#8148)

Co-authored-by: Bernardo Pastorelli <13519917+randomswdev@users.noreply.github.com>

* add addResponseHeaders option

* enable addResponseHeaders

* fix comma

Co-authored-by: randomswdev <randomswdev@users.noreply.github.com>
Co-authored-by: Bernardo Pastorelli <13519917+randomswdev@users.noreply.github.com>
2021-04-05 16:27:41 +08:00
William Cheng
a35e9b590c Merge remote-tracking branch 'origin/5.2.x' into 6.0.x 2021-03-30 13:18:35 +08:00
William Cheng
99ddd6d2f2 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-03-30 11:41:09 +08:00
William Cheng
a078b1d826 Merge branch '5.2.x' into 6.0.x 2021-03-29 12:56:33 +08:00
William Cheng
c99226900b update samples 2021-03-27 18:47:57 +08:00
Prakhar Gupta
b1837693b1
[JAVA][jaxrs-spec] Added custom methods to add/remove elements from Java Collections (#6468) 2021-03-27 13:59:49 +08:00
William Cheng
3579094298 update samples 2021-03-27 13:03:16 +08:00
leonluc-dev
7e6ce69c64
[ASPNETCORE 3.x] Microsoft.AspNetCore.Authorization directive no longer requires useSwashbuckle condition (#8368)
* Update controller.mustache

Moved using directive for Microsoft.AspNetCore.Authorization outside of useSwashbuckle tag to prevent compilation errors with Authorize tag if Swashbuckle is disabled.

* Updated aspnetcore-3.x samples
2021-03-27 09:56:37 +08:00
William Cheng
16b141e402 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-03-26 10:20:36 +08:00
vnq
74e5c3ccd3
[php-symfony] remove nested Valid constraint (#8994)
* Fix constraint Valid cannot be nested

* Update PetController.php

* Update UserController.php
2021-03-24 13:30:42 +08:00
Blackclaws
b69fb79573
[csharp][aspnetcore] Enable Consumes Tag for Specs where not every operation consumes (#9039)
* Change break to consumes so that all operations will be processed

* Update Samples
2021-03-24 12:30:23 +08:00
Blackclaws
46a7d972b9
[csharp][aspnetcore] Fix FileUpload Parameter Generation for aspnetcore (#9000)
* Aspnetcore fix file parameters

https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/1183#issuecomment-612022568

* Update Samples

* Add Consumes to Controller. Needed for correct swashbuckle

* Add bodyParam annotation again

* Add InputFormatterStream

* Selective Use of IFormFIle

* Update samples

* Add missing List

* Fix duplicate consumes

* Update samples

* Remove executable bit

* Add missing files

* Add Comments
2021-03-22 12:35:45 +08:00
William Cheng
95d356ab6b Merge remote-tracking branch 'origin/5.2.x' into 6.0.x 2021-03-21 01:10:46 +08:00
William Cheng
47483e60cb update version to 5.2.0-SNAPSHOT, update samples 2021-03-21 00:10:10 +08:00
William Cheng
0dc62e8b79
Prepare v5.1.1 in the master (#9027)
* Prepare v5.1.1 in the master

* move dart dio next to configs/other
2021-03-20 23:05:11 +08:00
William Cheng
e023eaa821
Prepare v5.1.0 release (#9017)
* prepare v5.1.0 release

* update samples (dart-dio-next)
2021-03-20 16:45:05 +08:00
Blackclaws
061b00e990
[csharp][aspnetcore] Update aspnetcore nuspec and csproj with authors and description (#8995)
* Update aspnetcore nuspec and csproj with authors and description

* Removed unneccesary include
2021-03-19 21:25:32 +08:00
Justin Black
a925c76561
Adds hasRequired to all Java schema classes (#8962)
* Adds getHasRequiredVars + setHasRequiredVars to IJsonSchemaValidationProperties

* CHanges to getHasRequired and setHasRequired and implements in CodegenModel

* Updates CodegenProperty

* Updates codegenparameter

* Updates codegenresponse

* Uses setHasRequired in model/prop/parameter/response

* Adds issue spec 8906

* Adds testHasRequiredInModel

* Adds testHasRequiredInProperties

* Fixes issue spec errors

* Adds sample endpoint with schemas in patch parameter

* Adds testHasRequiredInParameters

* Adds response schemas in issue spec

* Samples and docs regenerated
2021-03-18 20:42:42 -07:00
William Cheng
95c775b694 update samples 2021-03-18 08:59:33 +08:00
Ajith Kumar
9ea852d4df
[JAVA] [Spring] Conditionally importing spring pageable (#8915)
* [JAVA][SPRING] Making spring pageable import optional

* [JAVA][SPRING] Regenerating samples

* [JAVA][SPRING] Regenerating samples again
2021-03-18 00:03:31 +08:00
Oleh Kurpiak
cfe86d9594
[Java][Server] fix default value (#8577)
* [Java][Server] fix default value

* [Java][Server] fix default value
2021-03-15 21:25:48 +08:00
Rüdiger Keller
a8c56fb26a
[jaxrs-cxf][jaxrs-spec] Add missing @NotNull annotation for required body parameters when using BeanValidation, fixes #4280 (#6494)
* [jaxrs-spec] Add missing @NotNull annotation for required body parameters when using BeanValidation.

* [jaxrs-cxf] Add missing @NotNull annotation for required body parameters when using BeanValidation (#4280).

* [jaxrs-cxf] Add @NotNull annotation only for body parameters that are required and not nullable.

* [jaxrs-spec] Add @NotNull annotation only for body parameters that are required and not nullable.

* [jaxrs-cxf] Updated sample files after adding missing @NotNull annotation for required body parameters when using BeanValidation.

* [jaxrs-spec] Updated sample files after adding missing @NotNull annotation for required body parameters when using BeanValidation.
2021-03-15 09:47:29 +08:00
William Cheng
3909505c5b Merge remote-tracking branch 'origin/master' into 6.0.x 2021-03-13 23:26:43 +08:00
Blackclaws
e16ee8c6b8
Add version to csproj, fix target framework, update samples (#8956) 2021-03-12 10:34:06 +08:00
morphlne
38ef0e1f3a
[JaxRS] Fix ambiguous dependency (#8922) (#8923) 2021-03-10 17:03:30 +08:00
Justin Black
786c71f339
Adds hasVars (#8928)
* Adds getHasVars and setHasVars to IJsonSchemaValidationProperties

* Updates CodegenModel

* Updates CodegenProperty

* Updates codegenparameter

* Updates codegenresponse

* Adds testHasVarsInModel

* Adds testHasVarsInProperty

* Updates testHasVarsInProperty

* Adds testHasVarsInParameter

* Adds testHasVarsInResponse

* Samples update
2021-03-09 12:14:02 -08:00
Mehmet YUCE
86e418d57b
Fix not processing enums in cpp-pistache-server (#8886)
* Fix not processing enums in cpp-pistache-server

Defining a reusable enum as a component schema results in an empty
class. Following changes are made:

- activate 'postProcessModelsEnum' in 'AbstractCppCodegen'
- modify model templates for the 'cpp-pistache-server' project

As 'postProcessModelsEnum' is now available in the 'AbstactCppCodegen'
the 'enumVars' variables are now available in mustache templates for all
cpp based code generators.

As the 'AbstractCppCodegen' was touched all cpp based
samples were updated.

* fixes encountered on real world

* PR fixes

Co-authored-by: mfyuce <mfyuce@netas.com.tr>
2021-03-09 15:17:25 +08:00
Jiri Kuncar
8cb4741248
[go][client] Fix example value for non string enums (#8900)
* [go][client] Fix example value for non string enums

* regenerated samples
2021-03-08 18:11:50 +08:00
Justin Black
101da6e434
Adds getAdditionalPropertiesIsAnyType to java schema classes (#8908)
* Adds getter and setter for AdditionalPropertiesIsAnyType in IJsonSchemaValidationProperties

* Removes venv

* Implements getter and setter in CodegenModel

* Implements getter and setter in CodegenProperty

* Implements getter and setter in CodegenParameter

* Adds getter and setter in CodegenResponse

* Creates setAddProps

* Removes comment

* Adds setAdditionalPropertiesIsAnyType invocations

* Updates samples

* Updates tests in testAdditionalPropertiesPresentInResponses

* Updates tests in testAdditionalPropertiesPresentInParameters

* Updates testAdditionalPropertiesPresentInModelProperties to check getAdditionalPropertiesIsAnyType

* Updates testAdditionalPropertiesPresentInModels
2021-03-07 09:42:47 -08:00
Internaional Network Support & Service - Glas
041d908963
Changed virtualan version from 1.0.0 to 2.1.7. Update readme.md and d… (#8910)
* Changed virtualan version from 1.0.0 to 2.1.7. Update readme.md and description in springboot generator.

* Updated virtualan link in spring.md.

* update samples

Co-authored-by: networkinss <oliver.glas@inss.ch>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-03-07 09:38:31 +08:00
William Cheng
ddc38b27bb Merge remote-tracking branch 'origin/master' into 6.0.x 2021-03-05 00:06:38 +08:00
Oleh Kurpiak
976b4aa757
[Java] Additional enum type annotations (#8389)
* [Java] Additional enum type annotations

* [Java] Additional enum type annotations
2021-03-04 23:33:00 +08:00
William Cheng
2b3b5a71cf update samples 2021-03-03 16:29:52 +08:00
William Cheng
d96197bcbd Merge remote-tracking branch 'origin/master' into 6.0.x 2021-03-03 16:19:20 +08:00
William Cheng
07f8bde6c1
Test go-gin-server sample with go test -v (#8855)
* test go gin sample with `go test -v`

* install via go get

* update main.mustache
2021-03-02 11:07:25 +08:00
William Cheng
2c0991dabe
better test for go-server (#8852) 2021-02-27 18:21:28 +08:00
Yannick Schutz
85b2b3c2e4
Add mime/multipart missing import in go server (#8790) 2021-02-27 14:50:16 +08:00
Blackclaws
f8770d7c33
C# Aspnetcore Generator. Fix Parameters missing (Name = ) Property (#8826)
* Fix parameter Name= missing.

* Update samples

* Fix wrong name in template

* Update samples again
2021-02-25 23:36:35 +08:00