365 Commits

Author SHA1 Message Date
saulgillEST
c14c7a0421
Enhancement: Allow MergedSpecBuilder title, version and description to be configured #20822 (#20839) 2025-04-25 16:44:41 +08:00
martin-mfg
a018c10c70
fix Maven plugin tests (#20782)
* fix maven test

* fix another maven test
2025-03-04 10:42:44 +08:00
Ron Reynolds
2cff152e2a
adding Intellij style xml and applied to all java code (#20734)
* added intellij-codestyle.xml and sample of it being applied to some java code-gen classes

* code-format changes ONLY

* few more format changes since last merge with master

* applied code-style to all java one last time
2025-03-04 01:44:48 +08:00
Han van Venrooij
ecdd8b5442
Upgrade plexus-build-api (#20759) 2025-03-03 10:33:18 +08:00
Simone Dalcastagné
70df1170cc
fix: authorization values in Java modules (#20644) 2025-03-02 23:39:37 +08:00
William Cheng
a79aad8420
Prepare 7.13.0 (#20758)
* Revert "v7.12.0 release"

This reverts commit 073723cb4d41187f839fbb46565d109293fa22d7.

* set version to v7.13.0-SNAPSHOT

* update samples

* update doc
2025-02-28 13:48:36 +08:00
William Cheng
afc27ef4bc
v7.12.0 release (#20757) 2025-02-28 12:12:26 +08:00
William Cheng
1fa07bf46c
Prepare 7.12.0 (#20512)
* Revert "v7.11.0 release (#20508)"

This reverts commit a7240eeefeedeefe7fc80ef22747dfc67e126324.

* prepare 7.12.0 snapshot version

* update samples

* update readme
2025-01-21 00:10:09 +08:00
William Cheng
a7240eeefe
v7.11.0 release (#20508) 2025-01-20 21:35:30 +08:00
William Cheng
c5ac7d485f
Various enhancements, bug fixes to default codegen and maven plugin (#20388)
* fix typos in docs

* minor fix in default codegen

* fix more typos
2024-12-30 16:42:26 +08:00
William Cheng
654f62ce3c
Prepare 7.11.0 (#20130)
* Revert "prepare 7.10.0 release (#20128)"

This reverts commit 12dfe8fe74a1515d1e69e00df9abe4128aa44160.

* update to 7.11.0-SNAPSHOT, update samples

* update docs
2024-11-18 20:15:29 +08:00
William Cheng
12dfe8fe74
prepare 7.10.0 release (#20128) 2024-11-18 18:59:21 +08:00
William Cheng
e2c458b9ea
Prepare 7.10.0 (#19809)
* Revert "prepare 7.9.0 release (#19808)"

This reverts commit 4145000dfebe7a9edea4555c8515383da7602458.

* prepare 7.10.0 snapshot

* update doc

* update samples
2024-10-08 11:21:54 +08:00
William Cheng
4145000dfe
prepare 7.9.0 release (#19808) 2024-10-08 10:30:09 +08:00
William Cheng
c2472b03b6 update doc to v7.8.0 2024-08-19 16:19:49 +08:00
William Cheng
91da2fd240
Prepare 7.9.0 snapshot (#19386)
* Revert "v7.8.0 release (#19385)"

This reverts commit 6bdc452f92d49dcac7ac21dfe8751c8cc4267b98.

* update samples for v7.9.0-snapshot
2024-08-19 16:14:51 +08:00
William Cheng
6bdc452f92
v7.8.0 release (#19385) 2024-08-19 14:01:58 +08:00
martin-mfg
05c10934ce
docs: update versions, fix links, remove broken camel.xml, update download counts (#19356)
* manually update version in documentation, remove camel.xml

... because it has the wrong generator version, it has the wrong generator name (should be "java-camel"), the generated code doesn't compile - and then I didn't check further

* improve automatic version updating

* fix one more Readme link

* update docker stats again
2024-08-15 17:02:34 +08:00
Paul Parenko
5612852fb6
Remove dependency scan for inputSpec (actually not required) (#19084)
* added test with external-ref ("external dependency" installed before actual usage)

* fixed test with resource on classpath

added test with resource on classpath with external-ref.

Test with profile 'resource' was wrong as it took JAR into account, but there was no 'petstore.yaml' on classpath.

* Remove dependency scan and do not modify inputSpec provided by user

It is still possible to provide JARs as inputSpec, however the user has to provide it by hand.

Providing dependencies in plugin section still allows correct inputSpec resolution on classpath.
2024-07-09 16:37:54 +08:00
William Cheng
20cfce0b4a
Prepare v7.8.0 (#19048)
* Revert "v7.7.0 release"

This reverts commit f3dd32385e02065ad298801ca11b8871bcb3a92a.

* prepare v7.8.0

* update readme

* update doc

* update samples
2024-07-02 16:45:53 +08:00
William Cheng
4eaac3d152
v7.7.0 release (#19046) 2024-07-02 15:44:37 +08:00
Philzen
880df7a7a4
[maven-plugin] Generate hash from actual resolved spec rather than inputSpec file (#18849)
* Ensure temp directories are deleted after test execution

* Implement test that external $ref changes are reflected in checksum

* Generate hash checksum from actual resolved spec instead of inputSpec file

Otherwise regeneration will not happen when skipIfSpecIsUnchanged is enabled,
although formally the spec content has changed.

Fixes #4512 and #16489

* Use try-with-resources to ensure stream is closed properly on exit

* Fix deprecation warning on SimpleLocalRepositoryManagerFactory no-arg constructor

* Apply minor code cleanup

- use fluent setters where possible
- remove undocumented @throws from JavaDoc
- use List.of() instead of Arrays.asList() for single-element-collection
  (more memory efficient)
- fix some grammar issues in comments and JavaDoc

* Use non-blocking java.nio API for file existence checks
2024-06-05 17:19:22 +08:00
Philzen
aef4d75fd5
Refactoring: Use lombok for simple getters & setters (#18559)
* Add missing @Override annotation

* Fix JavaDoc unresolved symbol

* Fix JavaDoc method link

* Remove unnecessary semicolon

* Remove method identical to super implementations

* Replace repetitive getter code with Lombok @Getter

See https://projectlombok.org/features/GetterSetter

* Replace repetitive setter code with Lombok @Setter

See https://projectlombok.org/features/GetterSetter

* Generate no-args constructor with Lombok

* Generate all-args constructor with Lombok

* Fix parameter naming

* Replace stubbed abstract class implementations with Mockito mocks

* Remove unused import(s)
2024-06-05 04:43:05 +02:00
Philzen
66126a8ae4
Remove unused test dependencies org.reflections & maven-rewrite (#18798)
* Specify exact relative path to parent pom.xml

* Remove org.reflections from the test stack

* Remove unused parameter

* Remove unused method

* Fix raw use of parameterized variable warning

* Use Files.readString instead of converting raw bytes

* Add test coverage for TestUtils.validatePomXmlFiles(List)

* Reimplement TestUtils.validatePomXmlFiles(List) with Jackson XML mapper

* Remove maven-rewrite dependency
2024-06-01 16:42:26 +08:00
Philzen
6a6f39d6f4
Change/reintroduce junit5 (#18790)
* Revert "Revert back to junit4 (#18786)"

This reverts commit 2471ba2d2e96261941d21eb10648f3d70e969423.

* Make junit engine execute TestNG test cases

* Fix failing test and use tempDir's for test code generation

* Make test fail with helpful info in case generator throws exception

* Suppress error output from TestUtils

* Remove transitive junit4 dependency

* Sync guava-testlib version with guava version

* Add hint regarding alternative for guava-testlib's FakeTicker
2024-06-01 16:40:40 +08:00
William Cheng
2471ba2d2e
Revert back to junit4 (#18786)
* revert junit5 upgrade

* revert upgrade to junit5

* fix kotlin-wiremock template folder

* fix/comment tests

* update
2024-05-29 18:58:44 +08:00
Philzen
9c999b6559
[General] Remove defunct global property withXml from generator, docs, maven & gradle plugin (#18568)
* Mention that Golang generator also supports XML annotations

Looking at src/main/resources/go/model_simple.mustache and
src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java
the GoLang seems to cater for withXml=true

* Fix maven plugin config description for `withXml`

* Add basic test for global withXml setting

* Use global withXml setting if not configured in ConfigOptions

Resolves #3839 and #5764

* Don't generate metadata or other files when only Models are tested

* Reformat table for readability

* Remove global property `withXml` from generator and docs

* Move WITH_XML constant out of system constants block

Currently there is only a single reference to this value in the whole
codebase (GoClientOptionsProvider). Maybe we should re-think how this
file is organised (i.e. provide a clearer split / mapping / understanding
what are system properties vs. global properties vs. configOptions and
where to put them).

* Remove global option `withXml` from Maven plugin (Breaking change)

This is a "soft" breaking change: Plugin will no longer execute if
user have this option – which is good, b/c it never worked as expected.
We may want to hint this in the 8.0 release notes.

* Remove global property `withXml` from Gradle plugin (Breaking change)

This is a "soft" breaking change: Plugin will no longer execute if
user have this option – which is good, b/c it never worked as expected.
We may want to hint this in the 8.0 release notes, so they can add it
to the `configOptions` map if required, or simply delete it

* Update samples to reflect removed `withXml` property

* Move `withXml` option into ConfigOptions for Java Microprofile sample

* Remove unused local vars and parameters

* Avoid repetition using fluent assertions

* Remove extraneous debug output
2024-05-27 14:35:32 +08:00
Paul Parenko
9a35914f0c
PR for openapi-generator-maven-plugin inputSpec -- Allow jar: URLs (#18576)
* Added support for <inputSpec/> arguments of JAR URLs.
E.g., jar:jar-specific-uri!/spec.yml.

* Resolve and search COMPILE dependencies for inputSpec resource.

* Added test cases for openapi-generator-maven-plugin:generate input
specifications:

* URLs of the form jar:jar-specific-uri!/spec.yaml

* Resources on the compilation classpath

in addition to the existing FILE test case.

* Check for inputSpecFile existence

else it is a remote URL && url is not empty

* replaced deprecated usage

* use Unix separators when on win-os

* example with jar inputSpec

* Comment not required anymore

Was introduced with #7587 could be removed with #10544

* referenced same maven version

these artifacts are referenced by same ${project.version} in https://github.com/apache/maven/blob/master/pom.xml

* updating maven dependencies to 3.9.6

---------

Co-authored-by: Allen D. Ball <ball@hcf.dev>
2024-05-21 13:51:52 +08:00
William Cheng
741bf0c035
Prepare 7.7.0-SNAPSHOT (#18709)
* Revert "7.6.0 release"

This reverts commit d76f9d32d11a03be2b40ebff728ef0ff86332fcb.

* prepare 7.7.0 snapshot in master

* update samples
2024-05-20 17:27:17 +08:00
William Cheng
ab7d0cb74f
7.6.0 release (#18708) 2024-05-20 15:26:08 +08:00
Pavel Miller
33617ee867
Improve generation of selected models with dependent models (#18462)
* Issue-18444: recursively trace variables and support of new option

* Issue-18444: suppoting inheritance, but interfaces

* Issue-18444: build project instructions executed

* code review from wing328: tab-spaces removed

* code review by wing328: added a line of comment for the private method
2024-05-19 17:46:50 +08:00
Thorsten Hirsch
5614eef995
upgrade openapi poms and codegen tests to junit5 (#18619) 2024-05-09 12:19:56 +08:00
William Cheng
807250a430
Prepare 7.6.0 (#18412)
* Revert "v7.5.0 release"

This reverts commit 1eafe2aebf33b13bee0ead66d62a6436e7db059d.

* update master to v7.6.0 snapshot

* update readme

* update samples
2024-04-17 19:05:37 +08:00
William Cheng
cce4139af6
v7.5.0 release (#18411) 2024-04-17 16:24:01 +08:00
William Cheng
ef36ea410e
Fix method naming for openapi normalzier, openapi ignore list option (#18348)
* fix openapi normalizer naming issue in config

* update openapi generator ignore list setting

* update

* fix

* update sample config

* update doc
2024-04-10 17:09:48 +08:00
William Cheng
4ff7e0ec3f
Prepare 7.5.0 snapshot (#18068)
* Revert "7.4.0 release"

This reverts commit eda049348425171df772a7b9087cc97db718cfda.

* prepare 7.5.0 snapshot version

* update samples

* update doc
2024-03-11 11:10:52 +08:00
William Cheng
2abcb4f7f0
7.4.0 release (#18067) 2024-03-11 10:11:15 +08:00
Ross Bender
cf2435f335
Add support for controlling output of OpenAPI Generator version in generated files (#17952)
* add initial openapi config and java generated files

* add java implementation for adding generator version

* regenerate sample client files

* remove tabs

* only show generated version if build info exists

* set build info for batch generation

* update generator doc for new global flag

* use existing property for generator version

* update templates to include generator version

* update templates for better generator version syntax

* revert undesired changes

* regenerate samples for openapi client

* update templates to correct formatting/newlines

* correct description text and add to usage doc

* add generator cli option for all codegen types

* use more concise version info; update existing codegens to support new prop

* correct wrong prop reference

* add initial test coverage for new prop

* update last (scala) templates with new prop

* update samples after upstream merge

* use consistent version output

* use better sample project id/name

* revert using option for generator version in templates
2024-03-09 15:52:08 +08:00
andreas-wirth
c87ad561f1
inputSpec should not be mandatory when inputSpecRootDirectory is set (#18000)
* Fix inputSpec to not be mandatory in maven plugin

* Add unit tests
2024-03-09 15:34:13 +08:00
Dipesh Chauhan (Twilio Work Account)
cedf170454
Adds Collapse Spec Options to Maven Plugin (#17714)
* Adds Collapse Spec Optionss to Maven Plugin

* Adds a collapsedSpec option to the maven plugin that produces a single-file representation of the spec in the output directory.
* Adds a includeCollapsedSpecInArtifacts option to the maven plugin that adds the collapsed spec file to the maven artifacts.

* Address Feedback Round 1

* Adds the new options to the maven plugin README.md.

* Fixes Unit Tests

* Corrects the casing of one of the schema files that was causing the tests to fail.
2024-02-15 17:02:25 +08:00
William Cheng
783e68c7ac
7.4.0 snapshot (#17818)
* Revert "7.3.0-release (#17817)"

This reverts commit d617b46c86b9075c5e0d63fe3798e2982f5259ac.

* update samples, docs, readme
2024-02-08 16:07:22 +08:00
William Cheng
d617b46c86
7.3.0-release (#17817) 2024-02-08 14:15:11 +08:00
William Cheng
7c7634dda9
add operation id option (#17750) 2024-02-01 17:21:49 +08:00
William Cheng
5eab3cef19
Prepare 7.3.0-SNAPSHOT (#17456)
* Revert "v7.2.0 release (#17455)"

This reverts commit fe638d009363c142c246ff089032f243e0b4ee01.

* set version to 7.3.0-SNAPSHOT

* update doc
2023-12-22 16:55:58 +08:00
William Cheng
fe638d0093
v7.2.0 release (#17455) 2023-12-22 14:52:51 +08:00
William Cheng
0dbc108d62
Add openapiGeneratorIgnoreList option to pre-populate .openapi-generator-ignore (#17164)
* add openapiGeneratorIgnoreList option to pre-populate .openapi-generator-ignore

* minor fix

* better code format

* add tests
2023-11-23 11:10:29 +08:00
William Cheng
53289263d9
Prepare v7.2.0 (#17050)
* update version to 7.2.0-SNAPSHOT

* update samples

* update doc
2023-11-13 18:53:20 +08:00
William Cheng
e2a62ace74
7.1.0 release (#17049) 2023-11-13 17:25:18 +08:00
William Cheng
ec3c484ce9
Add enum name mapping to Java generators (#17018)
* add enum name mapping to java generators

* update doc

* update description
2023-11-13 10:53:50 +08:00
martin-mfg
39347ec37b
maven plugin: log global settings, minor improvements (#16961) 2023-11-02 22:13:03 +08:00