Skip to content

Remote method does not show up in swagger #67

Closed

Description

@superkhau
  1. If you create a remote method in a boot (server/boot/your-script.js) script, it does not show up in the explorer.
  2. If you create a remote method in server/server.js, it does not show up in explorer.

For point 1, @raymondfeng suggested you can get around it by make sure your script loads first (like changing your-script.js to a.js to make sure it loads first). I confirmed the workaround and it does work, but there needs to be a better solution than naming your scripts to load first.

Activity

  1. raymondfeng commented on Oct 17, 2014

    @raymondfeng
    Member

    There are two issues in play:

    1. How to order the boot scripts?
    2. How to make sure loopback-explorer can pick up remote methods added after the explorer is initiated.

    For 1, there are a few options:

    • loopback-boot sort the scripts by file name
    • allow boot scripts to express their orders (for example, module.exports.order = 100)
    • have a boot/boot-config.json file to control the ordering

    For 2, we have #22. The other option is to reload specs upon refresh.

  2. bajtos commented on Oct 20, 2014

    @bajtos
    Member

    IMO this should be closed as a duplicate of #22

  3. superkhau commented on Oct 21, 2014

    @superkhau
    ContributorAuthor

    See #22 as per @bajtos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions