- This topic has 5 replies, 2 voices, and was last updated 1 year, 11 months ago by .
Viewing 4 reply threads
Viewing 4 reply threads
- You must be logged in to reply to this topic.
Tagged: REST easy
Hello
I tried run this thing on Demo\SimpleInvocation\Server
I removed the “strict” directive but url http://127.0.0.1:888/myserver/api/index.html?url=/myserver/api doesn’t call OpenApi function and Swagger shows default api (Pet Store)
How can I fix it?
Thanks
Have you installed the Swagger GUI and the index.html file mentioned in the blog post?
/Kim
Yes.
I installed Swager UI. Server doesn’t call a function OpenAi (?url=/myserver/api)
In the URL, http://127.0.0.1:888/xxx/yyy/index.html?url=/xxx/yyy
xxx must be the same on both sides, and similarly with yyy.
It is a “feature” of the index.html file and/or Swagger itself from what I can tell.
So if you want to have another Swagger entry into a different side of your server, you will need to add another OpenAPI method on that additional service, and make sure it responds to another xxx path.
Eg. http://127.0.0.1:888/myotherentry/api/index.html?url=/myotherentry/api
Then your additional service should have a kbmMW_REST attribute that names it to be called as myotherentry, in same syntax style as the first REST’able service.
/Kim
I tried this url
http://127.0.0.1:888/myserver/api/index.html?url=/myserver/api
/myserver/api = /myserver/api
I didn’t change your server description
[kbmMW_Rest(‘path:/myserver’)]
…
[kbmMW_Rest(‘method:get, path: “api”, responseMimeType:”application/x-yaml”‘)]
function OpenAPI:string;
The OpenAPI function is not called and Server shows Swagger Pet Store
Thanks
Vadim
This may be an issue in Swaggers scripts.