You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a bunch of filtering, excluding and transforming, only parts of the original paths would be preserved and some schema definitions become irrelevant and stale after the referencing paths have been filtered out.
What were you expecting to happen?
There should be a configurable property in the output section of the config to specify whether or not to remove unused schemas.
If set to true, unused schemas will not be generated to the output file.
Note that the resolution should be traced exhaustively.
Any logs, error output, etc?
None.
Any other comments?
For now, this can probably be implemented in input.override.transformer, but it's not efficient if every time a user wants the feature, they would need to implement it by themselves. On second thought, it's actually not practical because it might have conflicts with other filtering features of the tool.
On top of that, if you think it's a desirable feature to add, I can help open a PR for it.
What versions are you using?
7.3.0
The text was updated successfully, but these errors were encountered:
The directory src/types/complete is a pet store swagger output without any filters, and the directory src/types/partial is one with an input transformer and some filters.
In src/types/partial, only 2 APIs get generated and based on the import trace, only these schemas are used in the resolution paths of these 2 APIs:
On the contrary, all other schemas in components have been generated.
On top of that, I also specifically excluded a schema Customer which references another schema Address. After it's filtered out, Address has essentially no reference anywhere else so it becomes a dangling definition.
The ideal behavior is that all the unused schemas should be left out.
What happens?
After a bunch of filtering, excluding and transforming, only parts of the original
paths
would be preserved and some schema definitions become irrelevant and stale after the referencingpaths
have been filtered out.What were you expecting to happen?
output
section of the config to specify whether or not to remove unused schemas.true
, unused schemas will not be generated to the output file.Any logs, error output, etc?
None.
Any other comments?
For now, this can probably be implemented inOn second thought, it's actually not practical because it might have conflicts with other filtering features of the tool.input.override.transformer
, but it's not efficient if every time a user wants the feature, they would need to implement it by themselves.On top of that, if you think it's a desirable feature to add, I can help open a PR for it.
What versions are you using?
7.3.0
The text was updated successfully, but these errors were encountered: