Skip to content

Don't list localhost as the development server in the registered OpenAPI document #54

Open

Description

@gaurav

src/nodenorm/webapp/openapi.json lists http://localhost:8000/ as its development server (added in #42). Once the document is registered at SmartAPI (#34), that entry is published to every Translator client.

The Translator SmartAPI registration requirements map x-maturity: development to a non-ITRB deployment. A client that picks the development server from the registry would send its requests to localhost on its own machine.

The entry was kept in #42 because it may be what lets the Swagger UI of a locally run instance send its requests to that instance rather than to production, which is servers[0]. We should find out whether that's true, and then do one of these:

  • remove the entry, if local runs work without it;
  • have the server rewrite servers when it serves /webapp/openapi.json, so a local run lists itself while the registered document leaves localhost out;
  • replace it with a real non-ITRB deployment, if one exists.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions