[英]How do I generate a list of all REST endpoints from a WADL file?
I have several wadl files from a web application, and I need to generate a list of all valid REST endpoint URLS from that wadl file. 我有一个Web应用程序中的几个wadl文件,我需要从该wadl文件中生成所有有效REST端点URL的列表。 I have tried using packages like wadlib, wadl2py and wadl2swagger, but they all give me errors saying the wadl file is not valid.
我曾尝试使用像wadlib,wadl2py和wadl2swagger之类的软件包,但它们都给我错误,指出wadl文件无效。
The file is being generated by jasper 2. 该文件由jasper 2生成。
I need a list of all endpoint URLS and the valid methods/parameters for each endpoint. 我需要所有端点URL的列表以及每个端点的有效方法/参数。
Any tips would be appreciated. 任何提示将不胜感激。
Basicly these files are XML files. 这些文件基本上是XML文件。
So if the libraries didn't help you, you can try use Python XML modules to handle as XML and you can check the specification here or see the Wikipedia . 因此,如果这些库对您没有帮助,则可以尝试使用Python XML模块作为XML进行处理,并且可以在此处查看规范或查看Wikipedia 。
I think that extracting the Resources names from theses files can be pretty simple if you have a good experience with Python. 我认为,如果您对Python有良好的经验,那么从这些文件中提取资源名称可能非常简单。
Here is an example: 这是一个例子:
https://gist.github.com/klassmann/1e75d4a640bfbc766f8058f728267553 https://gist.github.com/klassmann/1e75d4a640bfbc766f8058f728267553
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.