Repository navigation
[pull] master from OpenAPITools:master - #753
Merged
Merged
Conversation
* fix: resolve ShellCheck issues mentioned in #24675 Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> * chore: run `./bin/generate-samples.sh ./bin/configs/*.yaml` Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> --------- Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
#24683) The no-match branch of the generated UnmarshalJSON was wrapped in a {{#oneOf}} section, so the error return introduced by #24349 was rendered once per oneOf member. Only the first copy is reachable; the rest is dead code that grows with the number of members. Render the block once, outside the section. err is declared unconditionally at the top of UnmarshalJSON, so the {{^oneOf}} fallback is no longer needed. Behaviour is unchanged: the first copy is what executed before. Regenerate the affected go samples. fix #24661
A schema named `Request` produces `import <modelPackage>.Request` in every generated API. An explicit import outranks a wildcard import regardless of order, so it shadows `sttp.client4.Request` from `import sttp.client4._` and the operation's return type resolves to the model: error: org.openapitools.client.model.Request does not take type parameters Qualify the return type as `sttp.client4.Request[...]`, matching what the scala-sttp generator already emits.
…es (#24681) The circe branch of scala-sttp4 derives codecs with io.circe.generic.semiauto, which keys JSON members off the Scala field names. Any property whose name is not already camelCase - snake_case, kebab-case, PascalCase - is silently renamed on the wire. Replace the derived codecs with explicit Encoder/Decoder instances keyed on baseName, the original property name from the spec, following the pattern already used by scala-http4s and adopted for scala-sttp in #23465. This also fixes the discriminated oneOf encoder. deriveConfiguredEncoder only applies withDiscriminator when each member's implicit encoder is an Encoder.AsObject; .mapJson(_.dropNullValues) downgraded them to plain Encoder, so the encoder silently emitted a wrapper object while the decoder expected the flat form, making discriminated oneOf impossible to round-trip. Two related codegen fixes: the discriminator property was matched by getPropertyName() (the escaped Scala identifier) against a property's baseName, so it was only stripped from members when the two happened to coincide; and the property name is now exposed to the template so the sealed trait's encoder emits it. Optional fields set to None remain omitted rather than serialized as null, preserving #24362.
* update go chi server deps * update workflow * test with go 1.25 * update tests
* [rust-server] Generate the auth scheme precedence tests The auth scheme precedence tests added in #24607 were hand-written and duplicated across two samples. Because they are not emitted by the templates, they only cover the specs someone remembered to write them for, and they have to be maintained by hand as new samples are added. Emit them from a new `tests-auth-scheme-precedence.mustache` supporting file instead. `RustServerCodegen` publishes a small description of the spec's security schemes (which schemes are declared, the apiKey parameter names, and whether Basic/Bearer are dispatched before the apiKey block); the template selects the test cases and expected outcomes from those flags. This drops the hand-written files and covers four samples instead of two. Reintroducing the untyped `from_headers` bug that #24607 fixed now fails in all four, where the hand-written tests caught it in two. * [rust-server] Track auth precedence per apiKey location Address review feedback on the generated auth scheme precedence tests. The header and query apiKey blocks are shadowed independently: each matches a different part of the request, so a preceding block that fails to claim one may still claim the other. Tracking a single "precedes the first apiKey block" flag got this wrong for specs that declare a query apiKey before an HTTP scheme, e.g. `[queryApiKey, bearer, headerApiKey]`, where the generated test expected `ApiKey` but the runtime resolves `Bearer`. Track precedence separately for each location. Also add the query-side counterparts of the header precedence tests, so a query apiKey declared after Basic or Bearer is checked for reachability too, and make the sole-credential test names reflect what they assert when the scheme is not declared. This takes the suite from 19 to 21 tests.
… generators (#24665) * refactor: replace getEnumVarsAsString with getEnumVars for improved type handling * refactor: introduce EnumVarMap for improved enum handling across code generators
… stop overriding global ObjectMapper (#24428) * feat(json-include): introduce configurable JsonInclude policy for optional non-nullable properties * update samples and documentation * update documentation * feat(json-include): add support for configurable @JsonSetter(nulls) annotations on optional non-nullable properties * docs(migration-guide): update migration guide for Jackson annotations changes in 7.25.0 * Revert "update documentation" This reverts commit ed876b9. * Revert "update samples and documentation" This reverts commit 6408e37. * feat(json-include): enhance manual per-property JSON include policy handling * feat(json-include): refactor JSON include policy handling with utility class * feat(json-include): update JSON include policy constants to use VendorExtension and CodegenConstants * refactor(json-include): replace constants with CodegenConstants in JSON include policy handling * feat(json-include): add @JsonSetter(nulls = Nulls.SKIP) for fields with Lombok setters * feat(json-include): add options for generating @JsonInclude and @JsonSetter annotations * feat(json-include): introduce JsonIncludePolicy and TriStateBoolean for improved JSON annotation handling * update samples * update samples * add whitespace to trigger cicd * Revert "add whitespace to trigger cicd" This reverts commit 3da24e0. * feat(json-include): refactor JSON annotation handling with JsonAnnotationPolicyUtils * update samples * Decouple JsonSetter nulls mode from openApiNullable for optional non-nullable fields Add optionalNonNullPropertyJsonSetterNulls option (SKIP/FAIL) and the per-property x-jackson-json-setter-nulls vendor extension (SKIP/FAIL/NONE) to the spring and kotlin-spring generators, mirroring the JsonInclude mechanism. When unset, behavior is byte-identical to today (openApiNullable-derived default), so this is fully backward compatible. Setting them enables previously-unreachable combinations such as openApiNullable=true with SKIP. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address review: guard test idx, fix setter-nulls NPE on null option, clarify migration note Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * update samples * updated samples * updated docs --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bumps [@hono/node-server](https://github.com/honojs/node-server) from 1.19.13 to 1.19.17. - [Release notes](https://github.com/honojs/node-server/releases) - [Commits](honojs/node-server@v1.19.13...v1.19.17) --- updated-dependencies: - dependency-name: "@hono/node-server" dependency-version: 1.19.17 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(typescript): add trailing commas to as const enums (#23275) Keep enum object diffs smaller across Angular, Fetch, and NestJS server generators. * remove eof * update * update * update samples --------- Co-authored-by: scarf <greenscarf005@gmail.com>
…ontent cannot currently be used by the generator (#24585)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )