Skip to content

OpenAPI applies read visibility to unreachable types #2517

Closed

Description

The docs for @withVisibility show this example

model Dog {
  @visibility("read") id: int32;
  @visibility("create", "update") secretName: string;
  name: string;
}

// The spread operator will copy all the properties of Dog into DogRead,
// and @withVisibility will then remove those that are not visible with
// create or update visibility.
//
// In this case, the id property is removed, and the name and secretName
// properties are kept.
@withVisibility("create", "update")
model DogCreateOrUpdate {
  ...Dog;
}

but the actual behavior as shown in the playground does not match the description in the doc.

Playground Link

Note that secretName does not appear in either Dog or DogCreateOrUpdate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions