Skip to content

Conversation

@kingofdisasterr
Copy link

@kingofdisasterr kingofdisasterr commented Jan 23, 2026

fixes #22784

@cachescrubber @welshm @MelleD @atextor @manedev79 @javisst @borsch @banlevente @Zomzog @martin-mfg

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • File the PR against the correct branch: master (upcoming 7.x.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR solves a reported issue, reference it using GitHub's linking syntax (e.g., having "fixes #123" present in the PR description)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Summary by cubic

Fixes #22784 by generating optional arrays with minItems > 0 in Java/Spring as nullable (default null) instead of initialized empty lists. This avoids invalid defaults and aligns with validation rules.

  • Bug Fixes
    • Updated AbstractJavaCodegen.toDefaultValue to return null for optional arrays with minItems > 0.
    • Added test to ensure FooBarRequestDto.barList is nullable and not initialized.
    • Included OpenAPI sample (issue_22784.yaml) covering this scenario.

Written for commit 93dece7. Summary will update on new commits.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

@wing328
Copy link
Member

wing328 commented Jan 27, 2026

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

kingofdisasterr and others added 27 commits January 27, 2026 21:11
* Fix HTML generator to display array types for body parameters

The HTML generator (htmlDocs) was not properly displaying array types
for request body parameters. When an endpoint accepted an array of
objects as input, only the base type was shown (e.g., "User") instead
of the full array type (e.g., "array[User]").

This fix updates the bodyParam.mustache template to include container
type information (array, map, etc.) when present, matching the format
already used for return types.

Before: User
After: array[User]

The fix wraps the baseType with containerType[...] when isContainer
is true, ensuring consistent type display across both input and output
types in the generated HTML documentation.

* Add html.yaml config and document testing requirements

Due to network limitations in the automated build environment, the
following steps could not be completed but are required per
contribution guidelines:

1. Build project: ./mvnw clean install -DskipTests
2. Regenerate samples: ./bin/generate-samples.sh bin/configs/html.yaml
3. Commit updated samples: git add samples/documentation/html/

Added:
- bin/configs/html.yaml: Configuration for html generator samples
- TESTING_STEPS.md: Detailed instructions for completing the PR

The template fix in bodyParam.mustache is complete and correct.
Sample regeneration is needed to verify the fix visually in the
generated HTML documentation.

* Add concrete example showing the bug location in current HTML sample

* Update HTML samples to verify array type fix

Regenerated samples/documentation/html/index.html to verify the array
type fix in bodyParam.mustache is working correctly.

Verified fix:
- Before: <div class="param">User <a href="#User">User</a> (required)</div>
- After:  <div class="param">User array[<a href="#User">User</a>] (required)</div>

The createUsersWithArrayInput endpoint (and all array body parameters)
now correctly displays "array[Type]" instead of just "Type".

Also removed TESTING_STEPS.md as testing is now complete.

* Update VERSION to 7.20.0-SNAPSHOT to match project version

The samples were regenerated using npm's openapi-generator-cli (v7.4.0),
but the CI expects the VERSION to match the current development version
(7.20.0-SNAPSHOT). Updated to prevent CI failures.

---------

Co-authored-by: Claude <noreply@anthropic.com>
* [swift6][client] make api calls concurrent

* [swift6][client] improve swift 6 thread safety

* [swift6][client] improve swift 6 thread safety
…concurrency (OpenAPITools#22802)

* [swift6][client] Increase minimum supported SDK to accommodate swift concurrency

* [swift6][client] Increase minimum supported SDK to accommodate swift concurrency
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…21708 (OpenAPITools#21709)

* feat(types): Add request configuration method to {{classname}}Interface

* update docs and samples

* refactor: change naming to better mirror openapi context

* docs: update typescript-fetch
…penAPITools#22775)

* [BUG][typescript-angular] apiKeys cause service compilation errors

Updated TypeScript Angular `configuration.mustache` to properly handle
apiKeys in query parameters by using `OpenApiHttpParams` instead of
`HttpHeaders` to avoid compilation errors.

Fixes OpenAPITools#22774

* add generated samples
* Add create requestOpts method to {{classname}}Interface OpenAPITools#21708 (OpenAPITools#21709)

* feat(types): Add request configuration method to {{classname}}Interface

* update docs and samples

* refactor: change naming to better mirror openapi context

* docs: update typescript-fetch

* feat(types): Add request configuration method to {{classname}}Interface
…penAPITools#22118)

* Add HTTP client name to fix client duplicity

* Fix samples
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.23.1 to 3.27.7.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](assertj/assertj@assertj-core-3.23.1...assertj-build-3.27.7)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.7
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ools#22816)

* [Rust] Update reqwest dependency to 0.13 with query and form features

Update the Rust client generator template to use reqwest 0.13 instead
of 0.12, as requested in issue OpenAPITools#22621.

In reqwest 0.13, the `query()` and `form()` methods have been moved
behind feature flags and are disabled by default. Since the generated
Rust clients extensively use both methods, these features must be
explicitly enabled.

Changes:
- Updated all reqwest dependencies from ^0.12 to ^0.13
- Added "query" and "form" to reqwest feature flags for all variants:
  - Blocking client configuration
  - Async client with file stream support
  - Async client without file stream
  - Reqwest-trait variant
- Updated reqwest-middleware features for consistency

This maintains full backward compatibility as only the dependency
version and features change. The API surface of generated code
remains identical.

Fixes OpenAPITools#22621

* [Rust] Updated samples

* [Rust] Rename rustls-tls feature to rustls to match reqwest 0.13

In reqwest 0.13, the rustls-tls feature was renamed to rustls.
This updates the Cargo.mustache template and all generated samples
to use the new feature name, fixing CI build failures when using
--all-features flag.

* [Rust] Upgrade reqwest-middleware to 0.5 for reqwest 0.13 compatibility

The previous reqwest-middleware 0.4 depends on reqwest 0.12, which caused
type conflicts when upgrading to reqwest 0.13:
- reqwest::Error (from reqwest 0.13)
- reqwest_middleware::reqwest::Error (from reqwest 0.12 via middleware)

These are different types from different versions of reqwest.

reqwest-middleware 0.5 is compatible with reqwest 0.13, resolving the
version conflict. With both using the same reqwest version, the re-exported
types are now correctly aligned.

* [Rust] Use query and form features from reqwest-middleware

It adds "query" and "form" features for reqwest-middleware crate in petstore-async-middleware example and Cargo.mustache template.

---------

Co-authored-by: Emil Bonne Kristiansen <emilbonnek@gmail.com>
* update python mltipart to newer version

* update python version in workflow

* update

* update version

* update
* set python version to 3.10

* update doc
…ossible (OpenAPITools#22827)

* [php][php-nextgen] Fix nullability when multiple response types are possible

* [php][php-nextgen] Fix test
…streaming (OpenAPITools#22673)

* Update isomorphic-fetch file to allow for response streaming (#1)

* Update samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update samples/client/echo_api/typescript/build/http/http.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update samples

* fix tests

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 4 files (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="samples/server/petstore/python-fastapi/Dockerfile">

<violation number="1">
P2: Dockerfile now uses Python 3.7 (EOL, no security updates) for all stages; this introduces a security/maintainability risk for generated sample containers.</violation>
</file>

<file name="docs/generators/python-fastapi.md">

<violation number="1">
P2: Documentation now lists Python 3.7 for python-fastapi, but the generator metadata still reports 3.10, so the docs are inconsistent with the actual supported version.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][Java][Spring][SpringBoot] optional array with 'minItems' set, fails validation