Forum Discussion

ajmera_dhruva's avatar
ajmera_dhruva
New Member
19 days ago

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)?

No RepliesBe the first to reply