HenrikHL
2 years agoFrequent Contributor
Overwriting descriptions on reusable objects
I have a simple type defined in a Domain used in multiple APIs:
email:
type: string
maxLength: 100
description: `E-mail` address to be used
example: 'info@dcsa.org'
I refer to email type of this Domain using a $ref from the APIs
Problem:
In one of the APIs I want to change the description. How is this best done?
I don't want to define 2 identical simple types with different names (email and email2)!
Reason: If I in the future would like to modify the maxLength to 150 - I only want to modify this one place and not remember to modify it multiple places. I don't mind having 2 simple types defined - but one must somehow inherit the properties from the other simple type and "just" overwrite the description...