The swagger file that I have created for my demo end point is valid according to the swagger validator. Unfortunately, when I attempt to import the API into GREG via the swagger json I'm told there is an error. The failure occurs whether I'm importing the file or accessing it via the URL. The message is nearly useless and the stack trace is pasted below:
Caused by: org.wso2.carbon.registry.core.exceptions.RegistryException: Failed to add resource /_system/governance/apimgt/applicationdata/api-docs/0.0.1/api-docs.json. An exception occurred while executing handler chain. Some or all of the arguments may be null. Cannot add the endpoint to registry.
at org.wso2.carbon.registry.resource.services.utils.AddResourceUtil.addResource(AddResourceUtil.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
What is GREG expecting that isn't part of the swagger definition I have created? Why is it throwing an error?
It is currently a limitation with GReg-5.1.0.
https://wso2.org/jira/browse/REGISTRY-3195
Has a workaround, and this will be properly fixed in a later version of the product.