Repository navigation
[pull] master from OpenAPITools:master - #817
Merged
Merged
Conversation
Currently the Python client generator generates a "flat layout", where the generated Python module is directly below the project root. This is a problem for editable installs as tools like `uv` have to generate a complicated "finder" to load the modules. Several tools like `mypy` and `ty` fail to use it as they implement their own "import mechanism" incompatible with the generated finder. This can be mitigated by switching to the "src layout", where all files live in the sub-directory "src". Tools like `uv` then only have to place the absolute path in a `.pth` file, which also works with `mypy` and `ty`. Similar to #12119 but in the reverse add a new configuration option "sourceFolder" to make the base folder configurable. For backward compatibility it is unset by default, which generates the previous "flat layout". Set it to "src" to generate the "src layout". Link: https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/ Signed-off-by: Philipp Hahn <p.hahn@avm.de> Co-authored-by: Philipp Hahn <p.hahn@avm.de>
…ative Blob intact, tokenizes Content-Disposition (#24974) * [typescript-fetch] BlobApiResponse returns a NamedBlob, keeps a non-native Blob intact, tokenizes Content-Disposition Follow-up to #24957 (#24956). - `BlobApiResponse.value()` wrapped whatever `raw.blob()` returned in `new File([blob])`: a Blob that is not the native one, as returned by an injected fetch implementation such as node-fetch, was stringified into a 13-byte "[object Blob]" body. The File is now built only from a native Blob where File exists and can be constructed; otherwise the Blob itself is given the name. - `value()` is typed `Promise<NamedBlob>` (`Blob & { name: string }`) instead of `Promise<File>`, which the fallback branches did not honour. Operations with a file response are typed `runtime.NamedBlob` through the new `apisReturnType.mustache` partial, so callers reach `.name` without a cast. - Content-Disposition parameters are tokenized by a single global regex that consumes one `name=value` at a time, replacing the character loop: a quoted-string is taken whole, junk after a closing quote and a trailing backslash are tolerated. - Unit tests for the injected-fetch Blob, a non-constructible File and malformed quoted-strings. * [typescript-fetch] name the file response type HttpFile, as the typescript generator does Same name and shape (`Blob & { readonly name: string }`) as the browser HttpFile of the `typescript` generator, so the two TypeScript generators agree on what a file response is. * [typescript-fetch] drop the tautological instanceOf assertions from the BlobApiResponse fallback tests * [typescript-fetch] align the codegen test with the HttpFile response type * [typescript-fetch] HttpFile doc comment: the equivalence with the typescript generator holds for its browser variant * [typescript-fetch] BlobApiResponse: guard only the File construction with the try
…n a HashMap) (#24896) * [rust] fix: map-typed query parameters called .to_string() on a HashMap HashMap implements neither Display nor ToString, so the generated client did not compile (E0599) wherever a map-typed query parameter fell through to the scalar path: a required non-nullable map in both reqwest and reqwest-trait, and the nullable/optional non-deepObject fallthroughs in reqwest-trait. Serialize the map as one json-encoded parameter with serde_json::to_string, exactly how reqwest's optional branch already handles non-primitive parameters. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GcwZ1arjLZNpetHz2a3TJz * [rust] test: pin the required map-query assertion to its parameter `serde_json::to_string(&` matched any call in the file; match on the `labels` key instead, which both libraries emit. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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 : )