Skip to content

[Bug]: Create and Update transforms emit original models in OpenAPI when specified in op parameters #6917

Open
@abes-xpv

Description

@abes-xpv

Describe the bug

In the example below, Update<A> emits the expected OpenAPI schema for UpA but emits the full model as UpdateA when used inline as a parameter value.

model A {
  a: string;
  @visibility(Lifecycle.Create, Lifecycle.Read)
  b: string;
}

// UpA is correctly emitted with only the updateable properties of A
model UpA is Update<A>;

// UpdateA is incorrectly emitted with the all the properties of A
op updateOp(param: Update<A>): A;

Reproduction

See this Playground example

Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions