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
Radek Postołowicz
c22997b9b8
Cleanup Jackson type info mess fixes ( #9441 ) ( #11691 )
...
* Cleanup Jackson type info mess fixes (#9441 )
* fixup! add import mapping for JsonIgnoreProperties
2022-03-07 09:36:05 +08:00
Chris White
d153134dec
Fixed RFC3999DateFormat clone NPE ( #11705 )
2022-02-24 12:29:23 +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
cachescrubber
194b3fda26
[Bug][Java/Spring] OAS3 related bugfixes and enhancements ( #11526 )
...
* Content mediatype is hardcoded in api.mustache #11511
* Generate Samples
* OAS3 incorrect data type when providing a default value #11367
* Generate Samples
* Fix JsonTypeName annotation handling in Java and JavaSpring
* Generate Samples
* getIsClassnameSanitized: use null safe equals
2022-02-05 17:29:58 +08:00
William Cheng
c8b84c4d03
Merge remote-tracking branch 'origin/master' into 6.0.x
2022-01-30 18:01:35 +08:00
William Cheng
b7c8de9425
update samples
2022-01-21 17:45:53 +08:00
William Cheng
33bce99b8e
Avoid using import mapping in model generation ( #11217 )
...
* remove import mapping logic in model generation, better handle of file, list
* add new files for file, list
* fix some tests
* update tests, doc
* skip file as reserved word in feign client
* add new files
* remove file from reserved word list in spring generator
2022-01-16 23:57:53 +08:00
William Cheng
d17a472b89
Merge remote-tracking branch 'origin/master' into 6.0.x
2022-01-03 18:03:00 +08:00
William Cheng
238639a500
update java sampes
2022-01-02 17:28:17 +08:00
William Cheng
12e03b1937
Merge remote-tracking branch 'origin/master' into 6.0.x
2022-01-02 15:41:37 +08:00
William Cheng
b72eba90cd
[java][okhttp-gson-nextgen] better oneOf implementation ( #11146 )
...
* add validJsonObject method
* add check for null
* fix list model generation
* fix optional fields validation
* add tests
* fix variable naming
* update tests
* add fromJson in oneOf, add tests
* convert JSON to static
* remove trailing space
* add fromString methods to all models
* add toJson, fix anyOf template
* remove workarounds
* undo changes to tests
* skip file schema test
* add new file
2021-12-18 23:22:55 +08:00
Justin Black
cee5f75912
Feat adds content and header properties to CodegenResponse ( #11046 )
...
* Adds responseHeaders to codegenResponse
* Sets response headers in codegenResponse
* Samples updated
* Adds test of response headers
* Adds content to CodegenResponse
* Sets codegenResponse content
* Tests added, test content-data.yaml spec update
* Adds mediaTypeSchemaSuffix input to getContent
* Tests updated
* Updates how response content schema names are set
* Adds missing Locale to String.format invocations
2021-12-10 13:49:29 -08:00
WILLIAM CHENG
eb75515715
Merge branch '5.4.x' into 6.0.x
2021-11-21 09:50:47 +08:00
Oleh Kurpiak
e7c3bdacc2
[Java] fix deserialization of readonly properties ( #10113 )
...
* [Java] fix deserialization of readonly properties
* [Java] fix deserialization of readonly properties
* [Java] fix deserialization of readonly properties
* [Java] fix deserialization of readonly properties
2021-11-14 22:05:25 +08:00
Oleh Kurpiak
3bdbf0339a
[Java] deserialize to LinkedHashSet when unique items ( #10241 )
...
* [Java] deserialize to LinkedHashSet when unique items
* [Java] fix deserialization of readonly properties
* [Java] deserialize to LinkedHashSet when unique items
2021-11-14 22:03:02 +08:00
William Cheng
48f81eef45
use IllegalArgumentException instead ( #10745 )
2021-11-02 12:47:15 +08:00
William Cheng
7b7d7db0c7
[Java][okhttp] rename enum ( #10642 )
...
* rename java enum with uppercase
* add tests for snake case lambda
* update file header
* update feign templates with new enum names
* update okhttp template wth lambda
* fix tests
2021-10-23 10:15:30 +08:00
William Cheng
150e304b4c
update samples
2021-09-25 13:56:00 +08:00
Nathan Baulch
5d68bd6a03
Fix thousands of spelling typos ( #10272 )
2021-08-28 22:58:24 +08:00
William Cheng
0204bf4ae2
Squashed commit of the following:
...
commit c5a0d0f7394aa742fa336fff7e7c1d3049761868
Merge: 8c4991ba3ed f8ff8c87609
Author: William Cheng <wing328hk@gmail.com>
Date: Tue Aug 17 18:28:12 2021 +0800
Merge branch 'mustache-linting' of https://github.com/NathanBaulch/openapi-generator into NathanBaulch-mustache-linting
commit f8ff8c87609b1ca36fa26fb8474806999638195e
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 14:12:47 2021 +1000
Reorder tags that handle missing values
commit f5d8a33709d6a3f846a9fe4520b78c3d637051d9
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 14:08:59 2021 +1000
Use dot notation where possible
commit 493d14921e2333f3ae19ef6fc89318b7e263a80c
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 14:10:49 2021 +1000
Remove empty tags
commit 32480dc53f48227d55531b94e307d72671373737
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 10:41:58 2021 +1000
Remove redundant sections
commit a8edabd722c34aa094b4aeb11c22664529c3a219
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Wed Aug 4 22:02:22 2021 +1000
Trim extra EOF new lines
commit e89bd7458e3594bf0d30e580bc9408e45b018a57
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Wed Aug 4 21:59:26 2021 +1000
Trim trailing whitespace
2021-08-17 18:37:51 +08:00
Marcel Stör
c5f5d3dd6a
[Java] Add @javax.annotation.Nonnull to required getters ( #9593 )
...
* Add @javax.annotation.Nonnull to required getters
* Add updated samples
* Consider the nullable constraint
2021-07-19 10:48:58 +08:00
William Cheng
cce0d0a222
update resteasy dependencies ( #9729 )
2021-06-09 15:43:55 +08:00
Jakob
0af45b3823
[Java] add jackson annotations to setters ( #9041 )
...
* [Java] add jackson annotations to setters
Closes #6856
* [Java] fix conflictiong setter with JsonNullable
2021-03-30 11:17:15 +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
William Cheng
1b6cabb97d
[Java] use Files.createTempFile instead ( #8787 )
...
* use Files.createTempFile
* fix import
* add missing import
2021-02-23 11:40:37 +08:00
Oleh Kurpiak
f0b9e21b6b
[Java] fix generation for JavaTimeFormatter ( #8348 )
...
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
* [Java] fix generation for JavaTimeFormatter
2021-01-29 11:22:37 +08:00
William Cheng
84813be309
remove supportJava6 option ( #8514 )
2021-01-26 10:27:09 +08:00
Hugo Alves
ede2a2316c
[JAVA][Feign] Replace Apache oltu with scribejava ( #8318 )
...
* - Replace apache oltu with scribejava
- Implement the following authentication methods
- ApiKey header
- HTTP basic authentication
- Oauth client credentials flow
- Oauth Implicit flow
- Oauth Pasword (deprecated)
* Create class hierarchy for Oauth flows implementation
* Add instructions of how to use the ApiClient to Readme.md
* Update samples
* Remove support for java 6 and 7
* Remove java 6 and 7 support from gradle
* Format pom.xml
* Remove empty line
* Update samples
* Remove oltu dependency from build.gradle and build.sbt.
Replace oltu with ScribeJava
Update samples
* Update samples
* Update samples
2021-01-19 12:41:25 +08:00
William Cheng
26c17c5774
[Java] remove deprecated jackson classes ( #7304 )
...
* [java/resttemplate] Generate valid code if no Authentication implementations present
Take the logic used to decide which instances to add to the authentications map and re-use to not import classes or offer non-functional util methods
* parameterize formParams
fixes #5782
* replace use of ISO8601DateFormat and ISO8601Utils with StdDateFormat
fixes #5779
* add constructor to intialise calendar
* Revert "[java/resttemplate] Generate valid code if no Authentication implementations present"
This reverts commit 6e450907bae1d831a4a8c9b66f6b707424f0a39a.
* Revert "parameterize formParams"
This reverts commit 7a26ce5dd21ce147ed33728cd0091a29175367a4.
* also override single arg parse method to avoid throwing exception
* also override single arg parse method to avoid throwing exception
* update samples
* update samples
* fix jersey1 tests
* fix jersey2 test
* update resteasy dependencies
* fix java jersey2 oas3 tests
* use java8 in springboot-beanvalidation
Co-authored-by: Jon Freedman <jon.freedman@zoho.com>
2020-08-27 23:13:56 +08:00
Niels Pardon
d868fd6dc8
[Java][clients] remove java.lang prefix from Object ( #6806 )
2020-08-24 22:06:19 -04:00
William Cheng
2ab35e0386
add JsonTypeName ( #6995 )
2020-07-21 14:21:10 +08:00
William Cheng
44d3f717f8
update java samples
2020-07-18 22:02:16 +08:00
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
835dab4b50
Fix typescript generator for parameter collectionFormat for pipes ssv ( #6553 )
...
Co-authored-by: David Biesack <David.Biesack@apiture.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Vikrant Balyan <vvb@users.noreply.github.com>
Co-authored-by: Michele Albano <michele.albano@gmail.com>
Co-authored-by: Esteban Gehring <esteban.gehring@bithost.ch>
2020-06-05 19:32:32 -04:00
Januson
c49d8fda8e
[M][REQ][JAVA]: Add option to generate arrays with "uniqueItems" true as Sets rather than Lists ( #5466 )
...
* [REQ][JAVA]: Add option to generate arrays with "uniqueItems" true as Sets rather than Lists
- Update Java code generation to use sets instead of lists when uniqueItems is set to true
- Add import resolution for sets
- Add tests and fix broke tests
resolve #5254
* Update Javascript, Perl, Python and Ruby to preserve current functionality.
* Switch set implementation to LinkedHashSet
* Fix missing import for uniqueItems used on param.
* Fix missing import and return type for responses with uniqueItems
* Fix default values for array of enum
* Update generated samples
* fix merge issue
* Update generated samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-05-21 13:27:57 +08:00
Sebastien Rosset
6c5621d97e
[Java] Enable discriminator recursive lookup ( #5895 )
...
* Adds addComposedMappedModels and testComposedSchemaOneOfDiscriminatorMap
* Requires that discriminators be required properties
* Strengthens discriminaotr validation, adds better error messages, adds schema oneof samples
* Adds oneOf and anyOf invalidDiscriminator tests
* Updates incorrect addOneOfInterfaceModel invocation
* Runs ensure-up-to-date
* Adds updates from Sebastien Rosset
* Removes newlines
* Uses df.isString
* Fixes tests be correctly setting df.isString
* Updates discriminatorExplicitMappingVerbose description per PR feedback
* Adds description of how mappedModels is populated
* enable discriminator lookup
* Adds the suggestion exception raising when a MappedModel mappingName is null
* Actually resolves merge conflicts
* Adds addComposedMappedModels and testComposedSchemaOneOfDiscriminatorMap
* Requires that discriminators be required properties
* Strengthens discriminaotr validation, adds better error messages, adds schema oneof samples
* Adds oneOf and anyOf invalidDiscriminator tests
* Updates incorrect addOneOfInterfaceModel invocation
* Runs ensure-up-to-date
* Adds updates from Sebastien Rosset
* Removes newlines
* Uses df.isString
* Fixes tests be correctly setting df.isString
* Updates discriminatorExplicitMappingVerbose description per PR feedback
* Adds description of how mappedModels is populated
* Adds the suggestion exception raising when a MappedModel mappingName is null
* Actually resolves merge conflicts
* Switches two methods to package private because they are needed for testing
* Allow nulls in MappedModel.getMappingName
* Address Jim Schubert review comments
* Updates CLI flag name to legacyDiscriminatorBehavior, default=true
* Change discriminator CLI option. Remove exception when mappingName is null value
* resolve merge conflicts
* Execute scripts under bin directory
Co-authored-by: Justin Black <justin.a.black@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-05-13 01:02:55 +08:00
Christophe Bornet
779b176648
Add full OAuth2 support to jersey2-experimental codegen ( #6183 )
...
* Add full Oauth2 support to Jersey client
* Regenerate jersey2-experimental sample
* Regenerate all java clients
2020-05-11 15:18:47 +08:00
Justin Black
8e8471c1fd
[CORE] Fixes composed schema discriminator map ( #4906 )
...
* Adds addComposedMappedModels and testComposedSchemaOneOfDiscriminatorMap
* Requires that discriminators be required properties
* Strengthens discriminaotr validation, adds better error messages, adds schema oneof samples
* Adds oneOf and anyOf invalidDiscriminator tests
* Updates incorrect addOneOfInterfaceModel invocation
* Runs ensure-up-to-date
* Adds updates from Sebastien Rosset
* Removes newlines
* Uses df.isString
* Fixes tests be correctly setting df.isString
* Updates discriminatorExplicitMappingVerbose description per PR feedback
* Adds description of how mappedModels is populated
* Adds the suggestion exception raising when a MappedModel mappingName is null
* Actually resolves merge conflicts
* Switches two methods to package private because they are needed for testing
* Allow nulls in MappedModel.getMappingName
* Updates CLI flag name to legacyDiscriminatorBehavior, default=true
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-04-25 00:01:02 +08:00
Jiri Kuncar
a09271e76d
[java] Support templated servers ( #4998 )
...
* [java] Support templated servers
* Deprecate old signature of invokeAPI method
* throw ArrayIndexOutOfBoundsException
* Update modules/openapi-generator/src/main/resources/Java/ServerConfiguration.mustache
* [java] Regenerate samples
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
2020-02-19 09:27:45 -05:00
Slavek Kabrda
a42ff37a42
[java][client] oneOf support for jackson clients ( #5120 )
2020-01-27 08:23:20 -05:00
Jim Schubert
78bf3adc4a
[core] Initial FeatureSet structures and definitions ( #3614 )
...
[core] Initial FeatureSet structures and definitions
Add default feature set to DefaultCodegen
Initial FeatureSet definitions for:
* ada
* android
* apache2
* asciidoc
* aspnetcore
* avro
* bash
* c
* clojure
* cpp-pistache-server
* cpp-qt5-client
* cpp-qt5-qhttpengine-server
* cpp-restbed-server
* cpp-restsdk
* cpp-tizen
* csharp
* csharp-nancyfx
* csharp-netcore
* cwiki
* dart
* eiffel
* elixir
* elm
* erlang
* flash
* fsharp-functions
* go Client/Server
* graphql-nodejs-express-server
* graphql-schema
* groovy
* haskell
* haskell-http-client
* java
* jmeter
* kotlin
* kotlin vertx
* kotlin-server
* kotlin-spring
* lua
* mysql
* nim
* nodejs
* nodejs-express
* objc
* ocaml
* openapi
* openapi-yaml
* perl
* php
* php-laravel
* php-lumen
* php-silex
* php-slim
* php-symfony
* php-ze-ph
* powershell
* protobuf
* protobuf-schema
* python
* python-aiohttp
* python-blueplanet
* python-experimental
* r
* ror
* ruby
* ruby
* ruby-sinatra
* rust
* scala-akka
* scala-finch
* scala-gatling
* scala-http-client
* scala-lagom
* scala-play
* scalatra
* scalaz
* spring
* static docs
* swift
* typescript
2020-01-11 16:20:47 -05:00
Jim Schubert
376e419d0b
Support models with multi-level hierarchy (via roxspring) ( #4503 )
...
* Example of broken multi-level hierarchy
* Support for multiple levels of hierarchy in model objects
* Support for multiple levels of hierarchy in generators
* Regenerated samples
* Temporarily skip scalaz sample verification, which is having issue with Java version in CI container
* Re-enable scalaz in verify samples
Co-authored-by: Rob Oxspring <roxspring@imapmail.org>
2019-12-27 15:42:32 +08:00
Slavek Kabrda
cf58a427b6
[java][client] Don't include nullable attributes twice in serialized JSON ( #3923 )
...
* [java][client] Don't include nullable attributes twice in serialized JSON
* Get rid of the extra added whitespace
* Regenerate samples
2019-10-22 16:17:27 +08:00
atsharp
d75d089bc9
[Java] Support cookie-based security schemas in Java clients ( #4155 )
...
* Adding cookie support and cookie-based AuthKeys to Java clients
* Fix indentation
* Revert accidental change
* Updating samples
* Fixing tests and regenerating samples
2019-10-19 18:05:02 +08:00
Jochen Schalanda
ab0b3d9795
Update to jackson-datatype-threetenbp 2.9.10 ( #4176 )
...
* Update to jackson-datatype-threetenbp 2.9.10
* Update to ThreeTen BP 1.4.0
* Fix import and usage of org.threeten.bp.DateTimeUtils
* Refresh samples
2019-10-19 15:08:56 +08:00
William Cheng
7dbda049f0
Better tests for string (number) ( #3953 )
...
* beter test for string (number)
* fix mapping
* fix mapping in csharp generators
2019-09-30 15:22:44 +08:00
Benjamin Simpson
239d68df36
[Java][okhttp-gson] fix failure to deserialize floats ( #3846 )
...
* fixed bug where nullApi.java would be generated. Instead, generated DefaultApi.java to match the default path /{pathParam}
* fix to bug #3157
* update samples
2019-09-07 12:36:19 +08:00
Jérémie Bresson
87727de079
[java-client][java-jaxrs-server][jackson] Add @JsonPropertyOrder to models ( #3778 )
2019-08-29 10:40:34 +02:00