I have a service which is called by its basepath and its verb,there is no resource path.As in swagger path is a mandatory one,so i am unable to write the corresponding swagger for it.
Scenario i Tried :-
Suppose my basepath is abc/v1/xyz, i tried writting the swagger by giving the path as / it worked but when i hit the service in dev portal or soapUI it says unknown resource ,i think because of extra /
So,how should i write a swagger for such scenario?
@shubham singh It is failing probably due to the trailing /. Any specific reason why you do not have a resource path, as not having a resource path is not good design
We do have an example of this scenario working with the Mock Target API example. Though, in this example there is no basepath defined, so it defaults to / indicating all paths start at server root.
That doesn’t explain why your spec is not working. But I wanted to provide you with a sample that does work to validate the scenario and in case the example helps with troubleshooting.
We do have an example of this scenario working using the Apigee Mock Target API. Though, in this example, the basepath is not specified and defaults to / (indicating that all paths start with server root).
I realize that this does not explain why your spec is not working, but I wanted to provide you with a sample that validates the scenario you describe. (The call works in SmartDocs, even with the trailing slash.) Hoping it might help with troubleshooting.
If you define your path as /, I would expect that it would use the server root and basepath as the path for that resource. But it sounds like that’s not happening in your case. Would you be able to share a snippet of your spec that shows how the host, basepath, and resource are defined? Perhaps this may shed light. You can share privately to lizlynch@google.com if you prefer.