typeapi
typeapi copied to clipboard
Readonly/Writeonly properties
At a TypeAPI spec it is often the case that we describe a complete type returned by a GET operation. Most times the same type is also used to create a new entity. In most cases the POST operation does not need all properties defined by the type i.e. an id property which is generated by the backend. In this case it would be convenient if we could mark such properties as readonly or in the other case also as writeonly if the property is only needed for write operations.