feat: Changes from adapted codegenerator templates#1879
Merged
Conversation
For SDK, TUI and CLI bindings, api_ver/microversion was only populated from request body schema's x-openstack.min-ver, causing list/get operations to miss version info set at the operation level. Now falls back to operation-level spec x-openstack when body has no min-ver. For body operations, the module name suffix _<version> is preserved. For operations without a body, only the version info is set without modifying the module name. Fix min-ver for BS attachment and resource_filters operations For array items where DictInput.value_type is String (e.g., node_taints), the CLI generates JSON objects with serde_json::Value items. The SDK expects BTreeMap<Cow<'a, str>, Cow<'a, str>> values. The fix now checks the DictInput value type and converts JSON values to the appropriate SDK type: - String/SecretString → to_string().into() produces Into<Cow<'_, str>> - Integer/Number/Boolean → serde_json::from_value directly - Complex (dict/array) → serde_json::from_value into the SDK type This resolves the trait bound error where Vec<BTreeMap<_, serde_json::Value>> doesn't implement Into<Vec<BTreeMap<Cow<'_, str>, Cow<'_, str>>>>. Changes are triggered by https://review.opendev.org/c/openstack/codegenerator/+/997486 Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
gtema
force-pushed
the
codegenerator_997486
branch
from
July 21, 2026 13:08
1993cbc to
7c311f3
Compare
Open
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
For SDK, TUI and CLI bindings, api_ver/microversion was only populated
from request body schema's x-openstack.min-ver, causing list/get
operations to miss version info set at the operation level. Now falls
back to operation-level spec x-openstack when body has no min-ver.
For body operations, the module name suffix _ is preserved.
For operations without a body, only the version info is set without
modifying the module name.
Fix min-ver for BS attachment and resource_filters operations
For array items where DictInput.value_type is String (e.g.,
node_taints), the CLI generates JSON objects with serde_json::Value
items. The SDK expects BTreeMap<Cow<'a, str>, Cow<'a, str>> values. The
fix now checks the DictInput value type and converts JSON values to the
appropriate SDK type:
This resolves the trait bound error where Vec<BTreeMap<,
serde_json::Value>> doesn't implement Into<Vec<BTreeMap<Cow<', str>,
Cow<'_, str>>>>.
Changes are triggered by https://review.opendev.org/c/openstack/codegenerator/+/997486
Signed-off-by: Artem Goncharov artem.goncharov@gmail.com