Commit 07e0eab
fix(cli): fix datetime types compilation in separate -types crate (#16289)
* fix(cli): fix datetime types compilation in types crate
Parameterize coreModulePath in the Rust model generator and copy core
serde helper modules into the CLI-generated types crate so that
#[serde(with = "crate::core::...")] attributes resolve at compile time.
- Add coreModulePath config option to BaseRustConfigSchema
- Add getCoreModulePath() to AbstractRustGeneratorContext
- Replace all hardcoded crate::core:: paths with dynamic paths in
structUtils, UnionGenerator, UndiscriminatedUnionGenerator, AliasGenerator
- Copy flexible_datetime.rs, base64_bytes.rs, bigint_string.rs,
number_serializers.rs into types crate src/core/
- Add chrono, base64, num-bigint, ordered-float deps to types crate
- Add chrono/ordered_float re-exports to types crate prelude
- Update Cargo.lock patching to include new deps
Closes FER-11024
* fix: add chrono/num-bigint/ordered-float to CLI SDK deps for Cargo.lock resolution
The types crate lists these as dependencies, but without [[package]]
entries in the shipped Cargo.lock, cargo build --locked would reject
the inconsistent lock file. Adding them to the SDK's own Cargo.toml
ensures they are resolved in the lock file naturally.
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent a5a00f1 commit 07e0eab
115 files changed
Lines changed: 14228 additions & 834 deletions
File tree
- generators
- cli
- changes/unreleased
- sdk
- src
- rust
- base/src/context
- codegen/src/custom-config
- model/src
- alias
- union
- utils
- sdk/changes/unreleased
- seed/cli
- allof-inline
- allof-composition-types
- src
- core
- src
- graphql
- openapi
- allof
- allof-composition-types
- src
- core
- src
- graphql
- openapi
- query-parameters-openapi
- github-npm
- query-parameters-api-types
- src
- core
- src
- graphql
- openapi
- no-custom-config
- query-parameters-api-types
- src
- core
- src
- graphql
- openapi
- server-sent-events-openapi
- server-sent-events-openapi-types
- src
- core
- src
- graphql
- openapi
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| 69 | + | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| |||
0 commit comments