prismatic-io / spectral

Prismatic's typescript library for custom components
https://prismatic.io/docs/spectral/custom-component-library
35 stars 2 forks source link

Do not template inputs for readOnly properties in OpenAPI-generated components #151

Closed taylorreece closed 1 year ago

taylorreece commented 1 year ago

An object can be defined in an OpenAPI spec with properties that are readOnly. It's handy to be able to reference that same object for a requestBody and for a return value (to prevent having to maintain two versions of the same object). But, we're currently templating out inputs for readOnly properties. We should filter out the readOnly properties as we generate inputs.