Currently, include all schema's parents into calculation. Yet to see whether this is an overkill...
Previous schema clean up logic:
Rough calculate unused schemas set
Properties of schemas are in use, remove them from unused schemas set
Schemas in operation requests are in use, remove them from unused schemas set
Schemas in operation responses are in use, remove them from unused schemas set
Schemas in Exceptions are in use, remove them from unused schemas set
This PR adds an extra schema in use:
For schema in schemasInUse, its collection parents(Dictionary, Array)'s element schemas are in use, remove them from unused schemas set.
fix https://github.com/Azure/autorest.java/pull/2698#discussion_r1596521990
Currently, include all schema's parents into calculation. Yet to see whether this is an overkill...Previous schema clean up logic:
This PR adds an extra schema in use: For schema in schemasInUse, its collection parents(Dictionary, Array)'s element schemas are in use, remove them from unused schemas set.