code-8
code-8

Reputation: 58810

How can I slice main swagger.js and include them back?

swagger.js

enter image description here

I have swagger.js it contain 100,000 lines of codes. It contain about 50 sections of routes.

Yep, 100,000 lines 😓

You guys can imagine how brutal it is to even look at it.

Example.

enter image description here

I’m thinking

to slice my main file into peaces and include them back. I would prefer crate a : swagger/ inside that, I will place section1.js , section2.js ,... section50.js .

Benifits

Can someone please show me to get start on that ?

Upvotes: 1

Views: 102

Answers (1)

You can try yamlinc to split the file into multiple files referencing them with $include properties and compile back again.

Upvotes: 1

Related Questions