Question about article “REST easy with kbmMW #20”

Home Forums kbmMW Question about article “REST easy with kbmMW #20”

Tagged: 

Viewing 4 reply threads
  • Author
    Posts
    • #57402
      VadimMest
      Participant

      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

      • This topic was modified 2 years ago by VadimMest.
    • #57419
      kimbomadsen
      Keymaster

      Have you installed the Swagger GUI and the index.html file mentioned in the blog post?

      /Kim

    • #57440
      VadimMest
      Participant

      Yes.
      I installed Swager UI. Server doesn’t call a function OpenAi (?url=/myserver/api)

      • #57445
        kimbomadsen
        Keymaster

        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

    • #57468
      VadimMest
      Participant

      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

    • #57469
      VadimMest
      Participant

      This may be an issue in Swaggers scripts.

Viewing 4 reply threads
  • You must be logged in to reply to this topic.