Skip to content

Commit

Permalink
Merge pull request #431 from kairu-ms/fix-class-name-with-dot
Browse files Browse the repository at this point in the history
Fix bugs for class name with dot
  • Loading branch information
necusjz authored Nov 21, 2024
2 parents f815d54 + 364949f commit aebebf7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/aaz_dev/command/controller/workspace_cfg_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,12 @@ def build_identity_subresource(self, resource_id, temp_generic_update_cmd=None):
update_cmd.name = ' '.join(update_cmd_names)
elif update_by != "GenericOnly":
return
update_op, _, identity_schema, identity_schema_idx = self.find_identity_schema_in_command(update_cmd)

identity_schema_info = self.find_identity_schema_in_command(update_cmd)
if not identity_schema_info:
return

update_op, _, identity_schema, identity_schema_idx = identity_schema_info

subresource_idx = self.schema_idx_to_subresource_idx(identity_schema_idx)
assert subresource_idx
Expand Down
2 changes: 1 addition & 1 deletion src/aaz_dev/swagger/model/schema/cmd_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def build_schema(self, schema):

def _get_cls_definition_name(self, schema):
assert isinstance(schema, ReferenceSchema)
schema_cls_name = f"{to_camel_case(schema.ref.split('/')[-1])}_{self.mutability}"
schema_cls_name = f"{to_camel_case(schema.ref.split('/')[-1].replace('.', ' '))}_{self.mutability}"
if self.mutability != MutabilityEnum.Read:
if self.read_only:
schema_cls_name += "_read"
Expand Down

0 comments on commit aebebf7

Please sign in to comment.