C# Class for Swagger.json
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2018
10:58 AM
12-14-2018
10:58 AM
C# Class for Swagger.json
I need to parse a swagger.json file to dynamically find out what paths are available and what parameters for instance a POST requires. I do not know the content of it beforehand. Currently I am using the Newtonsoft JSON library to deserialize the swagger.json into a C# object. However, the parsing is kind of cumbersome. It would be so much easier if there was a known class that I can deserialize to. I understand that items like "parameters" will vary from case to case. Anyhow, is there a way to accomplish this? If not, what is the best way to parse a swagger.json file.
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2019
12:41 AM
01-04-2019
12:41 AM
Hi Hala,
Are you familiar with Swager Parser? it looks like this tool is what you need.
https://github.com/swagger-api/swagger-parser
---------
Tanya Yatskovskaya
SmartBear Community and Education Manager
Tanya Yatskovskaya
SmartBear Community and Education Manager
