英文:
Swagger: how to use the generated json files?
问题
我有通过Swashbuckle生成的JSON文件,用于我应该使用的REST API,我想知道是否有工具可以将这些文件作为输入并允许更容易地浏览公开方法、请求负载、响应负载、标头等。此外,在.NET中工作时,是否有一种方法或工具可以生成与WSDL文档一样的负载类?
英文:
I've been provided with the json files generated by swashbuckle for a rest api I should be consuming and I was wondering if there are tools that can take those files as input and allow an easier navigation of exposes methods, request payloads, response payloads, headers, etc. Also when working in .NET is there a way or tool to generate payload classes as with wsdl documents?
答案1
得分: 4
你可以使用Swagger编辑器:
这将允许您查看和浏览方法。只需粘贴您收到的JSON内容。
然后,页面顶部还有不同语言的“生成客户端”选项。这将为您生成C#(或其他)语言文件。
英文:
You can use the swagger editor
This will allow you to view and browse the methods. Simply paste the contents of your received JSON.
Then also, at the top of the page you have "generate client" options for different languages. Which will generate C# (or other) langauge files for you.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论