ajmera_dhruva
2 months agoNew Member
Description alongside $refs
Why does swagger specification discourage putting descriptions alongside the refs? If I have a simple type like a string I can describe the field. However if the type of the field is a ref to other object then as per the spec I should not add a description.
The idea of adding a description is to be able to add verbose explanation of a field. It is not clear why the behavior needs to change based on whether the field type is a basic type or an object. For example, if I have 2 fields taxAmount and taxIncludedAmount of type Money object then why I cannot describe these fields? What changes if I decide to use a float/integer to represent the same fields (just remove the currency for example)?