You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The OpenAPI3 emitter will put readOnly properties into the PATCH request schema, provided all properties are optional as in this playground
However, it does create separate schema omitting the read-only property as expected, if this (or any) property is marked required as in this playground
markcowl
changed the title
[Bug]: TypeSpec does not generate update request schema for PATCH properties that are readOnly and optional (but does if they are required)
[Bug]: TypeSpec does not generate update request schema for PATCH properties that are readOnly and optional (but does if there is any required property))
May 30, 2024
markcowl
changed the title
[Bug]: TypeSpec does not generate update request schema for PATCH properties that are readOnly and optional (but does if there is any required property))
[Bug]: Incorrect PATCH request schema
May 30, 2024
This is by design - readOnly properties can be safely shared between input and output schema, and we correctly treat "create", "read" visibility in this case.
Describe the bug
The OpenAPI3 emitter will put readOnly properties into the PATCH request schema, provided all properties are optional as in this playground
However, it does create separate schema omitting the read-only property as expected, if this (or any) property is marked required as in this playground
Reproduction
Playground showing read-only property in patch input schema
Playground showing a required property creatign a new schema removing the read-only property
Checklist
The text was updated successfully, but these errors were encountered: