* [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>
* Fix [jaxrs-jersey][java][jersey] multipart/form-data file array issue on generating jaxrs-jersey.
This commit aims to fix https://github.com/OpenAPITools/openapi-generator/issues/7330 with described solution 'choice C'.
* add test code [jaxrs-jersey][java][jersey] for multipart/form-data file on generating
* update test code [jaxrs-jersey][java][jersey] for multipart/form-data file on generating
followed latest master branch of OpenAPITools/openapi-generator
* update samples/* by executing ./bin/generate-samples.sh
* update mustaches for JavaJaxxRS/libraries/jersey1/* and samples/* to resolve failure of CI test on PR.
* Adds "useTags" option to all jaxrs code generators (AbstractJAXRSServerCodegen):
- jaxrs-jersey
- jaxrs-spec
- jaxrs-cxf-cdi
- jaxrs-resteasy
- jaxrs-cxf
- jaxrs-cxf-extended
- java-msf4j
- jaxrs-resteasy-eap
* jaxrs-spec
- Changed handling of root paths: e.g "/:", "/{id}:" to simplify code and create a more consistent behaviour
-- old: use tag for classname
-- new: use tag only if useTags is enabled, use "DefaultApi" if not
* @path class level annotation
- for all generators above and the microprofile generator (uses same jaxrs postprocessing)
- extended the "commonPath" to contain more than only the root path if possible
- e.g. "/group1/subgroup1/op1" -> "/group1/subgroup1" is moved to class level annotation
* [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>
* 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>
* [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>
* 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>