尚未实现的模拟打开API端点?
模拟端点开放的API规范文件定义并不那么困难。
但是,我试图仅模拟 尚未实现的端点。
例如,我有一个OAS文件,该文件定义get /dogs < /code>和
get /cats < /code> endpoint。 现在,当我在A中实现
get /dogs < /code> - 例如-Nest.js应用程序并且该应用程序正在运行时,我想拥有一个仅模拟
get /cats < /cats < /cats的模拟服务器代码>端点。
这样可以将模拟服务器和应用程序捆绑在一起并将它们部署在一起,以便始终返回某种形式的响应(实现或模拟)。
是否有某种具有这种能力的工具/模拟服务器?这样的事情甚至有意义吗?
Mocking endpoints an Open API Specification file defines isn't all that difficult.
However I am trying to mock only the endpoints that don't have an implementation yet.
For example I have an OAS file that defines an GET /dogs
and an GET /cats
endpoint.
Now when I implement GET /dogs
in a - for example - Nest.js application and that application is running, I would want to have a mock server that only mocks the GET /cats
endpoint.
That would make it possible to bundle the mock server and the application and to deploy them together, so that some form of response (either the implementation or the mocked) is always returned for every endpoint.
Is there some sort of tool/mock-server that has this kind of ability? Would doing something like that even make sense?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论