swagger-ts-generator | json file , generates a number of TypeScript files | JSON Processing library
kandi X-RAY | swagger-ts-generator Summary
kandi X-RAY | swagger-ts-generator Summary
Given a swagger.json file, generates a number of TypeScript files which can be used as models and model-driven forms in Angular (2 and above)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of swagger-ts-generator
swagger-ts-generator Key Features
swagger-ts-generator Examples and Code Snippets
Community Discussions
Trending Discussions on swagger-ts-generator
QUESTION
I'm currently working on a project of my own, and I'm having problems when handling "large" JSON files. I get the data from a MongoDB online (Mongo Atlas), then I access that data through a simple node JavaScript REST API. Given that the complexity of the JSON is large, I'm not sure how to proceed. I normally create a model of the JSON to handle it. But in this case, I don't really know how to do it. The schema is this:
As you can see it has a lot of nested arrays. My question is, should I use classes or maybe interfaces? For every array do I need to make a new class?
Currently, this is the model that I was working with: (this was working on JavaScript, but of course does not work in TypeScript because the object is not truly defined)
...ANSWER
Answered 2020-May-04 at 17:30To be frank, when a JSON exceeds a specific length, I really don't use models to handle it (Java side), in fact I'm not using them at all in Angular. It has advantages and also disadvantages, especially when talking about a typescript context, it's not really the recommended thing, but it does the job.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install swagger-ts-generator
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page