WSO2 APIM: How to implement "Design first" pattern? (Developers cannot test)

时间:2018-06-04 17:38:46

标签: design-patterns wso2 wso2-am user-roles

We are using WSO2 API 2.1.0 to deploy our business APIs.

Until now, we can follow, without problems, the pattern "Code first" for existing APIs. For example, we have an existing API REST in C#/NetFramework. In this case: - Developer install a plugin, generate the Swagger file, and import ("Have an existing API") in API Publisher. - Administrator deploy this new API, configuring the right backends (remember, the API already exists)

But now, we are going to deploy new APIs, and we want to follow "Design first" pattern. I mean, we want to describe the APIs using "Design a new Rest API" in publisher.

Our problem is that, in this case, the developer can generate code skeletons, but cannot test them, because they have the role "creator" only, and then, cannot deploy "prototype" or "test code" in any way (either in local PCs). Obviously, as API is in development stage, we cannot ask Publisher to publish it.

We cannot add publisher role for the developers, because, then, they can deploy directly in production environments.

NOTE: Initially we thought we have a security flaw, and we have confirmed with WSO2 staff that this is the intended behaviour for security. Developers cannot deploy event in prototype!

Suggestions?

1 个答案:

答案 0 :(得分:0)

在创建或测试创建者功能之后的测试就不存在了。因为就WSO2而言,创作者总是只是创作者所以没有权利进行测试。此外,在当前发布API的wso2过程中,在发布之前无法对其进行测试。

您可以做的最好的事情是创建另一个WSO2实例,开发人员可以通过WSO2测试API。 (这就是我们目前所做的)。我希望这会对你有所帮助。