Skip to content

[pull] master from OpenAPITools:master - #814

Merged
pull[bot] merged 4 commits into
transparencies:masterfrom
OpenAPITools:master
Sep 27, 2026
Merged

pull[bot] merged 4 commits into
transparencies:masterfrom
OpenAPITools:master

Conversation

@pull

@pull pull Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

rvlasveld and others added 4 commits September 28, 2026 01:45
)

A schema that both inherits via allOf and is itself inherited from was
rendered as a `data class`, which Kotlin cannot subclass, so the
generated code did not compile.

Such a mid-level model is now rendered as an `open class`: its own
properties are marked `open`, and its children emit a parent constructor
call. Because `open class` gives up the compiler-generated data class
members, the template generates equals/hashCode/toString/copy from
allVars. Destructuring (componentN) is not generated and is a known
limitation of this rendering.

Adds the allOf-multilevel sample (Animal <- Dog <- BigDog) to the
kotlin-server sample workflows so the generated code is compiled in CI.


Claude-Session: https://claude.ai/code/session_01VBn7VWUxZL6mTUbg21xNjm

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
… for endpoints without `sort` (#24863)

* Allow autoXSpringPaginated for endpoints without sort

Change autoXSpringPaginated from a boolean switch into a string-enum option
with three canonical values:

- none: disable auto-detection (default)
- page-size-sort: require page, size, and sort query parameters (identical
  to the previous true behavior)
- page-size: require only page and size; sort may be absent (new)

The legacy true/false values are still accepted as deprecated aliases for
page-size-sort/none respectively. A deprecation warning is logged once via
the generator logger only when the option is explicitly set to true/false;
leaving the option unset keeps the silent none default with no warning.

- Add SpringPageableScanUtils.AutoPaginationMode enum and
  resolveAutoPaginationMode() to centralize parsing/validation/deprecation
  warnings shared by SpringCodegen and KotlinSpringServerCodegen.
- Update willBePageable, applyAutoXSpringPaginatedIfNeeded, and the
  scanSortValidationEnums/scanPageableDefaults/scanPageableConstraints/
  scanAll methods to take AutoPaginationMode instead of boolean.
- Replace the boolean CLI switch with a documented string-enum CLI option
  in SpringCodegen and KotlinSpringServerCodegen (JavaCamelServerCodegen
  inherits the behavior since it extends SpringCodegen).
- Update existing tests to use the new enum where internal signatures
  changed; add new tests for page-size mode detection, deprecation
  warnings (once when explicit, never when unset), and invalid values.
- Regenerate docs/generators/{spring,kotlin-spring,java-camel}.md.

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

* Restore autoXSpringPaginated setter compatibility

Preserve public string and deprecated boolean setter APIs for Spring and Kotlin Spring generators. Keep Kotlin autoXSpringPaginated absent from additionalProperties when it is unset, matching Spring behavior. Replace binding-dependent logback test capture with direct setter and option-state assertions.

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

* Centralize autoXSpringPaginated option values

Share the immutable auto-pagination CLI enum map from SpringPageableScanUtils so Spring and Kotlin Spring generators cannot diverge.

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

* Fix pageable scanAll Javadoc reference

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

* remove sample file

* Revert "remove sample file"

This reverts commit c6bcdb2.

* Fix PR review findings in SpringPageableScanUtils

- Filter resolved parameters to in:query before checking required
  names in willBePageable(), so non-query parameters named 'page'/
  'size' no longer cause PAGE_SIZE auto-detection false positives.
- Guard the legacy true/false deprecation warning in
  SpringCodegen/KotlinSpringServerCodegen's setAutoXSpringPaginated
  setters with a per-instance flag, so repeated setter/option-
  processing calls only log the warning once.
- Add regression test for path/header parameters named page/size
  not triggering PAGE_SIZE auto-detection.

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

* Restore deprecation-warning tests and add missing regression coverage

- Restore logback ListAppender tests in SpringCodegenTest and
  KotlinSpringServerCodegenTest asserting the legacy true/false
  deprecation warning is logged exactly once when explicitly set and
  not at all when unset, plus a new test proving the setter's
  once-only guard suppresses a second warning when invoked twice with
  the same legacy value.
- Add willBePageable_pageSizeSortMode_doesNotDetectPathParamNamedSort
  to lock in the query-location filter for PAGE_SIZE_SORT (previously
  only regression-tested for PAGE_SIZE).
- Add .in("query") to the page/size params in
  applyAutoXSpringPaginatedIfNeeded_autoDisabled_doesNotSetExtension
  and applyAutoXSpringPaginatedIfNeeded_explicitlyFalse_returnsFalseAndIsNotOverridden
  so they exercise real auto-detection instead of passing trivially.

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

* Filter ListAppender events by thread in deprecation-warning tests

Surefire runs test classes in parallel (parallel=classes,
threadCountClasses=3), and SpringCodegen/KotlinSpringServerCodegen log
through a shared per-class-name logback Logger inherited by all
subclasses. A ListAppender attached to that logger during these tests
could capture log events emitted by concurrently-running test classes
on other threads, causing flaky/incorrect exactly-once and no-warning
assertions. Filter captured events to the current test thread before
asserting.

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

* Snapshot ListAppender events under the appender lock in deprecation-warning tests

ListAppender.list is a plain ArrayList that concurrently-running test
classes may still append to. Copy it while holding the appender monitor
(the same lock AppenderBase.doAppend uses) before filtering by thread.

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

* update samples

* Validate autoXSpringPaginated for all libraries and dedupe warn-once logic

- Resolve and validate an explicitly supplied autoXSpringPaginated value
  in SpringCodegen and KotlinSpringServerCodegen regardless of library,
  so invalid values are no longer silently ignored for
  spring-http-interface / spring-declarative-http-interface. Write-back
  and usage remain gated by isPageableSupported().
- Move the once-only deprecation-warning guard into
  SpringPageableScanUtils.warnOnce(Consumer) shared by both generators.
- Extract a countDeprecationWarnings(Runnable) helper in the Spring and
  Kotlin Spring codegen tests, and add regression tests for validation
  on unsupported libraries and for warnOnce.

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

* Extract shared log-capture helper into TestUtils

Move the ListAppender attach/detach, monitor-guarded snapshot and
current-thread filtering duplicated in SpringCodegenTest and
KotlinSpringServerCodegenTest into TestUtils.captureLogMessages, leaving
a thin per-class countDeprecationWarnings wrapper.

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

* Simplify autoXSpringPaginated deprecation warning

The setter is only called once per generation (from processOpts), so the
warn-once machinery guarded a case that never occurs in practice.

- Make SpringPageableScanUtils.resolveAutoPaginationMode(String) pure.
- Add package-private warnIfDeprecatedAutoPaginationValue, called once
  from processOpts in SpringCodegen and KotlinSpringServerCodegen; it
  shares value normalization with resolve.
- Remove warnOnce and the per-generator guard fields.
- Adapt tests and drop the ones made redundant by the
  processOpts-logs-exactly-once tests.

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

* fix archunit violation

* Fix static-context compile error by making warnIfDeprecatedAutoPaginationValue instance method

LOGGER in SpringPageableScanUtils is intentionally a non-static instance
field (enforced by ArchUnitRulesTest to limit memory use across
generator instances), so it cannot be referenced from a static method.

Change warnIfDeprecatedAutoPaginationValue from static to instance
scope and call it via the existing pageableUtils instance in
SpringCodegen and KotlinSpringServerCodegen. Update the corresponding
unit tests to invoke it on a SpringPageableScanUtils instance.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bumps [sbt/setup-sbt](https://github.com/sbt/setup-sbt) from 1.5.9 to 1.5.10.
- [Release notes](https://github.com/sbt/setup-sbt/releases)
- [Commits](sbt/setup-sbt@v1.5.9...v1.5.10)

---
updated-dependencies:
- dependency-name: sbt/setup-sbt
  dependency-version: 1.5.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* fix: [rust] type free-form object parameters as serde_json::Value, not models::serde_json::Value

A free-form object parameter (type: object with no properties) maps to
serde_json::Value, but the api templates qualify every non-primitive,
non-container parameter type with models:: - and models re-exports no
serde_json, so the generated crate fails with E0433. Free-form body
parameters already avoid this because updateRequestBodyForObject marks
them primitive; give non-body free-form parameters the same treatment.
Free-form schemas with additionalProperties stay containers (HashMap)
and keep their JSON serialization.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CxDNCjqJycKTfzVWg2SeTJ

* ci: retrigger after ubuntu mirror outage

* [rust] tidy: shorten the free-form parameter comment

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* [rust] test: cover free-form object parameters in all four libraries

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* [rust] test: cover free-form object path and header parameters

The fix marks every free-form entry in allParams, so the fixture now
also carries a free-form path parameter and a free-form header
parameter, and the test asserts both are typed serde_json::Value.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Sep 27, 2026
@pull pull Bot added the ⤵️ pull label Sep 27, 2026
@pull
pull Bot merged commit eac731b into transparencies:master Sep 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants