简体   繁体   English

如何从WADL文件生成所有REST端点的列表?

[英]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.

相关问题 有没有更好的方法从python中的输入文件生成rest api端点? - Is there a better way to generate rest api endpoints from an input file in python? 如何为使用 fastapi python 编写的 rest 服务生成 WADL? - How to generate WADL for rest service written with fastapi python? 如何生成列表的所有排列? - How do I generate all permutations of a list? 如何为REST客户端生成WSDL文件? - How do I generate a WSDL file for my REST client? 如何从列表中生成表格 - How do I generate a table from a list 如何生成带有规则的列表的所有可能组合? - How do I generate all possible combinations of a list with rules? 如何从一对中的单个元素,从嵌套在父列表中的众多对中生成所有可能组合的列表? - How do I generate a list of all possible combinations from a single element in a pair, from numerous pairs nested within a parent list? 如何使用matplotlib从值列表生成直方图? - How do I generate a histogram from a list of values using matplotlib? 如何从关键字列表中生成所有组合? - How to generate all combinations from a list of keywords? 如何从包含所有链接列表的文本文件下载 1 次运行? - How do I download from a text file that has a list with links all in 1 run?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM