39 Commits

Author SHA1 Message Date
Lucas Reeh
f656afcde3
Add original enumPropertyNamingType config for java enum generation (#20824) 2025-04-27 15:00:51 +08:00
DielN
b9f6fe6b1f
[Java] [Microprofile] Add Json-B polymorphism type info annotations (#20164)
* [Microprofile] Add Json-B polymorphism annotations

* [Microprofile] Set openApiNullable in configs to false

* [Microprofile] Bump JSON Bind version to 3.0

* [Microprofile] Only apply JSON-B polymorphism for MP 3.0

* Update samples

* [Microprofile] Update documentation/configs for openApiNullable

* Update docs
2024-12-03 12:02:54 +08:00
William Cheng
711e53a90c
[Java] Add option to fallback to legacy enum naming (#20172)
* add option to fallback legacy enum naming (java)

* fix tests
2024-11-29 17:12:12 +08:00
altro3
cdafa5a0cc
Deprecate micronaut openapi generator (#20107)
* Deprecate micronaut openapi generator

* update get help message

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-11-24 23:26:37 +08:00
Rodrigo de Almeida - RMA3
21d3cfe924
Fix Issue 18224 - Load x-field-extra-annotation in the operation parameter (#18967)
* fix issue 18959

* fix issue 18224

* fix issue 18224

* fix spaces

---------

Co-authored-by: Rodrigo Maciel de Almeida <rodrigo.almeida@wefin.com.br>
2024-06-30 16:27:14 +08:00
William Cheng
51ef8683fb
[java] implement #18032 add builder pattern to java client and spring generator (#18650)
* add builder pattern to java client and spring generator

* regenerate samples

* update doc

---------

Co-authored-by: jpfinne <jeanpaul@finne.be>
2024-05-14 11:38:30 +08:00
William Cheng
2a1b4f90df
Add new option allArgConstructor for java client, spring generators (#18538)
* allArgConstructor for java

* Remove leftover from builder pattern branch

* Rename generateConstructorWithAllArgs and use x- in vendorExtensions

* Test issue #18340

* Add evidences for allVars issue (#18340)

* remove eol

* update doc

---------

Co-authored-by: jpfinne <jeanpaul@finne.be>
2024-05-01 18:10:35 +08:00
William Cheng
b2a7f435c8
"==" enum value generates "_" in Java which is invalid since Java 9 (#18338)
* #17276 "==" enum value generates "_" in Java which is invalid since Java 9

* update doc

---------

Co-authored-by: Julien BÉTI <jbeti@cosium.com>
2024-04-09 12:21:54 +08:00
martin-mfg
aad345f0bd
expand documentation for option "artifactVersion" (#17845)
* update documentation strings

* re-generate docs
2024-02-13 16:18:05 +08:00
Tiffany Marrel
42f72192ca
add security feature AWSV4Signature to documentation (#15603) 2023-12-13 15:07:18 +08:00
William Cheng
70bffffc5a
remove option, update doc (#16592) 2023-09-15 15:01:21 +08:00
prashant-pant
4b87606665
Autoset constants (Required fields having single valid enum value) Java (OkHttp) Implementation of #16547 (#16550)
* Autosets the parameters with the only value specified as enum if the parameter is also marked as required

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.

* Autosets the parameters with the only value specified as enum if the parameter is also marked as required for Java default client.
2023-09-15 14:41:17 +08:00
William Cheng
6a8039c672 update doc 2023-08-09 14:38:56 +08:00
martin-mfg
ad5cc827f0
remove fullJavaUtil (#15033) 2023-05-22 14:40:35 +08:00
Tiffany Marrel
00676870a3
add HTTP signature to SecurityFeature (#15542) 2023-05-17 00:48:58 +08:00
Robbert van Waveren
8a426b2f4a
allow to specify the useOneOfInterfaces option for java (#15042) 2023-04-12 15:21:34 +03:00
William Cheng
88da3649b2
[csharp-netcore] Add option skip generating getter for sub-schemas (#15007)
* add option skip generating getter for sub-schemas

* fix openapi-yaml

* update samples

* update samples
2023-03-21 22:41:29 +08:00
William Cheng
fd45b74128
[Java] better default value handling (#14130)
* add test for array default value

* update null return

* minor fixes

* move default value tests to echo api spec

* add new files

* remove unused files

* fix enum array default, add tests

* better array init

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java

Co-authored-by: Leonard Brünings <lord_damokles@gmx.net>

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java

Co-authored-by: Leonard Brünings <lord_damokles@gmx.net>

* revert the fix

* improve default value handling

* update native samples, add tests

* update samples

* fix tests

* use conditional test for timezone

* add tests to apache http client echo api

* add option to default container to null

* fix map default value

* minor refactoring

* update samples

* fix javadoc

* fix pom.xml

* add tests in java native echo client

* add java apache client echo tests

* fix test

* fix test

---------

Co-authored-by: Leonard Brünings <lord_damokles@gmx.net>
2023-01-30 20:19:00 +08:00
Paul Parenko
456cca1a28
[Java] Fix #14276 Java Templates uses jakarta or javax package if useJakartaEe is enabled (#14343)
* Fix #14276 Java Templates uses jakarta or javax package if useJakartaEe
is true

* generated samples after useJakartaEe changes

* generated docs after useJakartaEe changes
2023-01-02 16:28:44 +08:00
DmitryKubahov
f9d4d28f48
[Micronaut] Improving micronaut-model and micronaut-client generation (#14065)
* fix documentation

* improve build.gradle.mustache and pom.xml.mustache to assume different serialization libs jackson or micronaut-serde-jackson

* improve pojo.mustache to skip generating @JsonDeserialize as for micronaut-serde-jackson

* improve model generating by removing visible flag from @JsonTypeInfo as it is not supported by micronaut-serde-jackson

Co-authored-by: dmitry.kubakhov <dmitry.kubakhov@check24.de>
2022-11-25 15:28:18 +08:00
Oleh Kurpiak
95b566a3a9
[Java] fix additional annotations for oneOf interfaces (#13958) 2022-11-20 12:44:47 +08:00
Thibault Duperron
574a70c315
[JAVA] Handle camlCase with $ as first char (#13292)
* Lowercase first char and not first letter for variable names

* Samples

* Limit caml case fix impact with cli a property
2022-10-28 21:36:04 +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
Auke Schrijnen
a57509695a
[java-micronaut] Return HTTP 501 in default implementation (#12365)
The default controller implementation returns an empty response. This
might result in unexpected behavior when an operation isn't implemented,
as a consumer of the API there is no way to notice the difference
between an unimplemented method and an actual empty response.

By changing the default behavior to return HTTP 501 Not Implemented the
user will be made aware of unimplemented methods. The former default
behavior, returning an empty response by default, can be activated with
a configuration option.
2022-05-18 14:17:22 +08:00
Auke Schrijnen
85170ee314
[java-micronaut] Generate visitor for subtypes with a discriminator (#12192)
* [java-micronaut] Generate visitor for subtypes with a discriminator

When types which extend a common type and are distinguished based on a
discriminator are consumed they are often cast to their specific Java
type which results in error prone boilerplate code.

By generating a visitor for those kind of types the various subtypes can
be consumed in a type safe manner.

* [java-micronaut] Remove redundant public access modifiers
2022-04-25 10:54:06 +08:00
Andriy Dmytruk
52d8a969ce
[Micronaut] Add option to describe response wrappers (#12186)
* Minor refactor for Micronaut generators

* Add support for security roles in micronaut server generator

* Micronaut Server Generator refactor the x-roles String variable

* Add support for Micronaut HttpResponse wrapper

* Generate samples

* Optimize the usage of context-path for Micronaut server
2022-04-24 16:10:33 +08:00
Auke Schrijnen
a8d4c00662
[java-micronaut] Support Optional for non-required properties (#12144)
The Micronaut generator by default adds the @Nullable annotation to
non-required properties and allows using the Jackson JsonNullable
wrapper but it is not possible to use java.util.Optional as a wrapper
for optional properties.

This change adds support for using the Optional wrapper for non-required
properties.
2022-04-21 10:53:56 +08:00
Justin Black
e2e7609bac
Adds not to CodegenComposedSchemas and uses it in python-exp (#12146)
Updates docs
2022-04-17 09:36:09 -07:00
Justin Black
eef7cddd6f
Adds UUID to python-experimental (#12153)
* Adds UUID to python-exp, allows uuid models to be generated

* Adds test_UUIDString uuid model test

* Fixes uuid properties in python-exp, changes maps to object data type, adds uuid data type

* Adds maps data type back in

* Adds missing Null and AnyType definitions and adds them to python-experimental

* Generator docs updated, added missing uuid, null, anytype, and object

* Adds uuid support description

* Docs updated
2022-04-16 14:55:49 -07:00
William Cheng
5d8b80a5cd
[Java] rename x-contentType to x-content-type (#11895)
* rename x-contentType to x-content-type

* undo changes
2022-03-18 09:50:42 +08:00
Oleh Kurpiak
860b6340a8
[Java] update list of vendor extensions (#11891) 2022-03-17 09:31:45 +08:00
Andriy Dmytruk
47f07158a3
[Micronaut] Add support for OffsetDateTime for Micronaut generators (#11871)
* Fix test output folder error for MicronautServerGenerator

* Add java8 OffsetDateTime support for Micronaut Codegens
2022-03-16 00:05:55 +08:00
Oleh Kurpiak
fb2c41c720
[Java] implicit headers regex (#11819) 2022-03-10 10:49:52 +08:00
Oleh Kurpiak
382e2a22a8
Document all used vendor extensions in specific generator (#11797) 2022-03-06 23:21:55 +08:00
Sergio del Amo
fbf4e56281
update micronaut to 3.3.1 (#11569) 2022-02-12 14:51:20 +08:00
William Cheng
8455c1cd23
Remove the option to support JDK7 from Java generator and templates (#11547)
* remove java8 from java client generator and templates

* update tests

* remove threetenbp

* update spring templates to remove java8

* remove java8 from jaxrs template

* fix jaxrs spec

* fix feign

* remove CustomInstantDeserializer.java

* fix jersey1

* fix undertow

* various update

* fix jaxrs jersey1

* fix java inflector

* fix jaxrs cxf

* add new files

* update doc
2022-02-10 10:35:29 +08:00
William Cheng
9f02759ae4 update doc 2022-01-26 16:37:39 +08:00
William Cheng
209f08e4a4 update doc 2022-01-26 14:54:11 +08:00
Andriy Dmytruk
a0dd025c82
Add Micronaut server generator (#10270)
* Add micronaut server implementation

* Add micronaut server tests and imporovements

* Generate samples, docs and verify that tests pass

* Update micronaut docs and samples after merging with master

* Update micronaut dev server samples

* Add micronuat server docs

* Update micronaut version

* Minor changes to micronaut server and client

* Fix documentation generation in samples

Co-authored-by: Andriy Dmytruk <andriy.dmytruk@andriy.dmytruk.ca.oracle.com>
2022-01-26 13:51:19 +08:00