Skip to content

[Bug] Models in mgmt plane would generate "required+readonly" properties into its public ctor #5423

@ArcturusZhang

Description

@ArcturusZhang

if we have this model:

model Foo
{
  a: string;
  b?: string;
  @visibility(Lifecycle.Read)
  c: string;
  @visibility(Lifecycle.Read)
  d?: string;
}

the correct behavior is that, we generate this csharp class:

public partial class Foo
{
    public Foo(string a) {}
}

but in fact, this generates the following:

public partial class Foo
{
    public Foo(string a, string c) {}
}

which is incorrect.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions