2070 Commits

Author SHA1 Message Date
Justin Black
8cd0d38446
Adds $ref data to schema classes (#13163)
* Adds getRef/setRef

* Adds ref to CodegenModel

* Adds ref to CodegenProperty

* Adds ref to CodegenParameter

* Adds ref to CodegenResponse

* Sets ref on CodegenModel and CodegenProperty

* Samples regenerated
2022-08-11 12:57:00 -07:00
William Cheng
5662d6136f update samples 2022-08-11 10:39:34 +08:00
Justin Black
9610a81a13
Adds requiredVarsMap (#13117)
* Adds requiredVarsMap

* Fixes imports

* Adds requiredVarsMap to CodegenParameter

* Updates CodegenResponse

* Adds feature to codegenModel

* Fixes codegenProperty

* Switches to getRequiredVarsMap

* Uses curly braces for set definition

* Added blocked examples back n to test spec now that the required bug is fixed

* Sample regenerated

* Handles escaping required property names

* Fixes CI tests

* Samples regenerated

* Samples regnerated

* Fixes test
2022-08-08 09:47:43 -07:00
RomainPruvostMHH
032e1a42d6
[Spring] Fix generated api ignore basePath (#10573)
* remove @RequestMapping from the apiController.mustache file and add it
to the api.mustache file

* move the defaultBasePath.mustache file in src/main/resources/JavaSpring
so that it commun with all Spring server-side libraries (spring-boot,
spring-mvc). The value of default context path is the value of
contextPath variable.

* added a unit test to verify it

* update the outputDir variable to samples/server/petstore/spring-stubs in
the  bin/configs/spring-stubs.yaml file because it generates Spring
server-side classes. And not on the client-side as the output directory
seemed to suggest.

* Results of "generate-samples.sh bin/configs/spring*" command

* Remove default value of url in @FeignClient

* resolve conflicts with origin/master

* merge remote/master into branch

* fix samples after a merge with master

* delete the directory samples/client/petstore/spring-stubs because it
moved to samples/openapi3/...

* add samples/client/petstore/spring-stubs just for the CI build (normally
it is unnecessary))

* delete 3 kotlin class files commited by error in
samples/server/petstore/kotlin-springboot and
samples/server/petstore/kotlin-springboot-reactive

* Update the unit test SpringCodegenTest.doAnnotateDatesOnModelParameters
because one more annotation is generated (@RequestMapping)

Co-authored-by: rpruvost <rpruvost@ITEM-S78402.emea.msad.sopra>
Co-authored-by: rpruvost <rpruvost@ITEM-S78402>
Co-authored-by: rpruvost <rpruvost>
2022-08-08 15:43:23 +08:00
Max K
a4a89caf73
Added parameter to add models in seperate project (#13044)
Samples and build for seperate model projects
2022-08-05 13:46:58 +08:00
William Cheng
cdc9683331
[jaxrs-spec] to fix default values for array (#13076)
* fix 13025 with correct default values for array

* fix missing curly bracket
2022-08-05 00:13:22 +08:00
William Cheng
fe8fbaf923
[Rust Server] Generate operations where tags require sanitization (#12996)
* [Rust Server] Render operations for sanitized tags

* [Rust Server] Add test for sanitized tags

* Update samples

Co-authored-by: Richard Whitehouse <richard.whitehouse@metaswitch.com>
2022-07-23 14:25:05 +08:00
William Cheng
a87da6ad3c
update undertow to newer version (#12994) 2022-07-23 14:07:15 +08:00
Max K
08c4a35162
[aspnetcore] Added dotnet outdated to READMEs (#12981)
* Added dotnet outdated to READMEs

* Update samples
2022-07-23 08:37:17 +08:00
William Cheng
17ba8304b6
Update swashbuckle version to 6.4.0 (#12965)
* update swashbuckle to newer version

* use newer version of swashbuckle for all aspnet versions
2022-07-21 15:10:32 +08:00
William Cheng
c26e19cbc0 Revert "Add support for string response deserialization (#12910)"
This reverts commit b8524bee232a55e28693354ab543b91e3f65629a.
2022-07-21 12:58:46 +08:00
Emanuele Saccomandi
b8524bee23
Add support for string response deserialization (#12910)
* Add support for string response deserialization

* updated samples

* updated samples

* realigned to master

* fix: errors were not getting thrown

* updated samples

* fix: errors were not getting thrown

* updated samples
2022-07-21 12:45:50 +08:00
Max K
17c021df5b
Added support for inheritance in Swashbuckle in ASP.NET Core (#12856)
* Added support for inheritance in Swashbuckle

* Updated to new API
2022-07-21 11:44:46 +08:00
William Cheng
6d44f97d6c
Add tests for spring boot with implicit headers but no annotation library (#12943)
* add tests for spring boot with implicit headers but no annotation library

* test in workflow

* update samples
2022-07-20 14:11:45 +08:00
devhl-labs
92193f7159
Adds isInnerEnum to CodegenProperty (#12860)
* added nonNullableVars

* added return property to operation

* added return property to operation

* build samples

* added inner enum

* build samples

* added a comment
2022-07-20 01:41:17 +08:00
William Cheng
da28e12017 update samples 2022-07-17 23:08:08 +08:00
William Cheng
7216899fe6
Add tests for aspnet core 6.0 pocoModels (#12900)
* add tests for aspnet core 6.0 pocoModels

* update workflow
2022-07-17 16:07:41 +08:00
Sascha Peilicke
bf604a08ab
Java: Add toString method to ApiException (#12851)
Previously, only the class name appeared in stacktrace whereas now
relevant details are added. This applies to most Java-related
generators.
2022-07-16 17:20:30 +08:00
Oleh Kurpiak
2e2da7bc82
[Spring] fix deprecated generation (#12832) 2022-07-13 11:08:28 +08:00
William Cheng
244a459836 update samples 2022-07-12 00:15:58 +08:00
William Cheng
9d6b12591e
Fix set, map import (#12818)
* fix set, map import

* update samples

* update tests
2022-07-10 14:58:55 +08:00
William Cheng
f242b5e1dd
Skip import of allOf composition schema (#12798)
* skip import of allOf composition schema

* update samples

* allow python generator to keep old behaviour

* update js import
2022-07-10 14:58:22 +08:00
Tom Bärwinkel
728c80abea
Add option to use custom a monad (#12618) 2022-07-07 01:13:06 +08:00
William Cheng
1383be4a2e
Fix missing import in jaxrs pojo (#12766)
* fix missing import in jaxrs pojo

* trigger build failure

* Revert "trigger build failure"

This reverts commit 4eed12f850cbc008404b0dc2284245f3d3ce4a15.
2022-07-05 17:12:26 +08:00
William Cheng
6cae0fbb78 Merge remote-tracking branch 'origin/6.1.x' 2022-07-04 01:22:51 +08:00
William Cheng
9e412edb64
Prepare 6.0.1 release (#12762)
* update to v6.0.1

* update doc

* update samples
2022-07-03 23:36:46 +08:00
Daniel Metzner
3b15bb8a4e
[PHP] Enhance Symfony generator (#12532)
* Enhance Symfony generator

  - Add missing typehints
  - Add missing use statements
  - Simplify model ctor
  - Change fallthrough Exception to Throwable
  - prevent storing result of void methods
  - fix validate method
  - add default null values to model properties
  - simplify API interface return values
  - fix/rework default value implementation
  - fix optional params deprecation warnings
  - ..

For more details check out the PR: https://github.com/OpenAPITools/openapi-generator/pull/12532

* Enhance Symfony generator Tests

  - Skip risky tests
  - Fix type hint error
  - Fix class exists tests
  - Fix broken doc block
  - Enhance annotations
  - Update phpunit.xml.dist
  - Fix test config resource location
2022-06-25 20:53:21 +08:00
cachescrubber
a7db213c2d
Upgrade virtualan-plugin to 2.5.1 (#12429)
* Upgrade virtualan-plugin to 2.5.1

* Generate samples

* Upgrade virtualan sample to springdoc

* Generate Samples

* Add samples/server/petstore/springboot-virtualan to ci run

* Upgrade virtualan-plugin to 2.5.2

* Generate samples

* Add virtualan.version to spring-boot-3 pom.xml, upgrade to 2.5.2
2022-06-13 14:48:26 +08:00
William Cheng
6948f15514 update jaxrs cxf samples 2022-06-06 18:38:26 +08:00
DevFlorian
3b587201cd
[REQ] Add equals and hashcode to java-cxf pojo #12519 (#12520)
Co-authored-by: FWermelskirchen <fwermelskirchen@eitco.de>
2022-06-06 15:16:48 +08:00
JGRsystematic
daa95decda
Use Arrays.equals and Arrays.hashCode by built-in array types (#12502) 2022-06-06 12:01:37 +08:00
William Cheng
f52ee28215
Fix NPE when generating examples for parameter (object) (#12538)
* fix NPE when generating examples for parameter (object)

* add new files
2022-06-05 16:19:37 +08:00
Daniel Metzner
f30257d10a
Fix syntax error for $jsonDeserializationVisitor (#12521) 2022-06-04 18:35:33 +08:00
William Cheng
38018d8b94
Test PHP Symfony server sample in github action (#12533)
* test php symfony server sample in github action

* update php laravel samples

* add tests for php 7.x, 8.x
2022-06-04 18:23:28 +08:00
William Cheng
76eddeb713
php-laravel, enum models, nullable and default values (#12480)
* + support for enum models & separating mustache templates for enums and generics
+ extract property 'type' and 'default value' from a #ref to an enum model
+ support for `PascalCase` naming convention for PHP generators
+ use a default value for known basic types when they are not nullable
+ use 'null' as default value for nullable types when they do not specify the default value
+ use defined constant path as enum default value when found

* + sample output update

* + change model fields to be public and acessible from outside

* + sample output update

Co-authored-by: Mostafa Aghajani <mostafa.aghajani@virta.global>
2022-05-27 11:16:26 +08:00
Cubid
fb1706bd2b
[php-symfony] Allow non mandatory array value (#11618)
Co-authored-by: David CLEMENT <dclement@cfdp.fr>
2022-05-27 00:54:04 +08:00
William Cheng
210b43afe2 update graphql nodejs samples 2022-05-27 00:33:10 +08:00
Tom Bärwinkel
54dca39459
Add authentication for haskell-servant (#12470)
* Add authentication for haskell-servant

* Add BearerToken to HaskellServantCodegen.java
2022-05-26 23:44:13 +08:00
William Cheng
a39d86c1eb update graphql nodejs samples 2022-05-26 23:35:00 +08:00
William Cheng
5bd94b8fa0 prepare 6.1.x 2022-05-26 12:58:25 +08:00
William Cheng
36a9cf394d
update samples (#12466) 2022-05-26 12:13:59 +08:00
William Cheng
69f79fb789
Prepare 6.0.0 release (#12463)
* prepare 6.0.0 release

* update samples

* update meta codegen
2022-05-26 10:28:01 +08:00
Johan Sjöblom
770c1cb053
[Kotlin-spring] add springdoc config (#12377)
* Adding Springdoc config to Kotlin-Spring

* Updating relevant samples

* Updating unrelated samples
2022-05-26 09:56:46 +08:00
William Cheng
621f87b5e6
minor enhancements to php symfony 6 generator (#12455) 2022-05-25 16:12:22 +08:00
William Cheng
16365ac989 update php symfony samples 2022-05-25 15:39:56 +08:00
Benjamin Häublein
77fa028bb3
[php-symfony] Symfony6 support (#11810)
* support symfony6

* fix issues with StrictJsonDeserialization

* regenerate samples

* add suggestions

* update samples

* support php 7.4 and symfony 5

* allow versions based on semantic versioning

* regenerate sample

* change method of determining result types

* update samples

* describe usage of bundle in symfony app

* better documentation

* fix duplicate auth methods

* do not set namespace for default types

* fix UploadedFile type

* next try fixing auth

* regenerate samples

* fix: auth method shall not be duplicated

* Revert "fix duplicate auth methods"

This reverts commit 0dc418737b1379a30b7f22e7937819ba965c9ddb.

* chore: regenerate samples

* fix tests

* regenerate sample

* more fixes for tests

* update tests

* add kernel shutdown

Co-authored-by: Benjamin Haeublein <benjaminh@testing-vm.lan.benjaminh.de>
Co-authored-by: Renaud de Chivré <renaud@tahitiwebdesign.com>
2022-05-25 15:34:50 +08:00
William Cheng
ccd64ce203
update gson to newer version in kotlin templates (#12425) 2022-05-22 14:13:03 +08:00
cachescrubber
8be490d130
Upgrade Spring Boot to 2.5.14 / 2.7.0 (#12408)
* Upgrade Spring Boot to 2.5.14 / 2.7.0

* Generate Samples
2022-05-20 20:24:13 +08:00
Andriy Dmytruk
0ad970f4cf
[Micronaut] Improvements for Server and Client (#12297)
* Add the applicationName parameter to support generation of multiple clients

* Change indentation in application.yml to double-space

* Update swagger annotations version, and option to choose not to generate the annotations

* Generate operations only in the first defined tag class for micronaut server

* Improve micronaut client options by setting the correct default values in the JavaMicronautAbstractCodegen constructor

* Fix visitor pattern having abstract method in non-abstract class. Update samples

* Update server sample FILES

* Minor refactor

* Fix for context path
2022-05-19 02:03:45 +08:00
Mikko Maunu
3a102e0e5b
Added linefeed between @Generated-annotation and start of class declaration. fixes #10746 (#12181) 2022-05-18 15:45:34 +08:00