C
C#7mo ago
PixxelKick

Normalizing OpenApi Spec File

Effectively speaking I have 2 OpenApi Spec json files. The first is one my team maintains by hand, to define api behavior. The second is the one swagger generates for my aspnet app. However the latter, due to its behavior, does generate a totally different looking file as it chooses different points to use $refs, doesn't make use of $allOf, etc etc, so I end up with 2 different spec files that should resolve to the same api in practice. Is there a tool anyone knows of to normalize these json files though in a deterministic way, to make them easier to compare A to B and different them to sus out deficiencies? Examples would include: 1. Collapsing all allOfs to just be the things. 2. Collapsing refs to also just be the thing declared 3. Normalizing property declared orders to be consistent, I assume alphabetically or whatever. So on and so forth, I'd expect the output to no longer have the schema section now as a result as everything is now directly declared. Anyone know of such a tool?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server