-
Notifications
You must be signed in to change notification settings - Fork 301
Closed
Labels
bugSomething isn't workingSomething isn't workingneeds-areaneeds-infoMark an issue that needs reply from the author or it will be closed automaticallyMark an issue that needs reply from the author or it will be closed automatically
Description
Describe the bug
Given a model A
with read-only properties, I would expect the openapi emitter to emit a dedicated AUpdate
type to use for the requestBody
of an op
decorated with @parameterVisibility(Lifecycle.Update)
but in some cases it will use the A
model as-is.
The correct types are emitted if one of the model properties is decorated with @visibility(Lifecycle.Update)
(i.e. a visibility that includes Update
and excludes Read
)
At face value this appears to be similar to #6917 but the issues are not exactly the same:
- In [Bug]: Create and Update transforms emit original models in OpenAPI when specified in op parameters #6917 the
XUpdate
type is emitted and used for therequestBody
but the emitted type incorrectly include fields that should not be visible for update - Here the
XUpdate
type is not emitted and it incorrectly usesX
as the type forrequestBody
Reproduction
Checklist
- Follow our Code of Conduct
- Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds-areaneeds-infoMark an issue that needs reply from the author or it will be closed automaticallyMark an issue that needs reply from the author or it will be closed automatically