Skip to content

Servers settings in Swagger UI prevent use on a server #188

@cristalp

Description

@cristalp

First of all: I love veraPDF, thank you very much!

I'm introducing it in my company as a standard validation tool. Since it will be used interactively and as a REST endpoint, I'm deploying the verapdf/rest image on one of our servers.

The web GUI of course works like a charm. However, the Swagger UI can't be used. The problem is that the openapi.json only contains the following servers:

  "servers" : [ {
    "url" : "https://demo.verapdf.org",
    "description" : "default",
    "variables" : { }
  }, {
    "url" : "https://dev.verapdf-rest.duallab.com",
    "description" : "dev",
    "variables" : { }
  }, {
    "url" : "http://localhost:8080",
    "description" : "local",
    "variables" : { }
  } ]

So, this works when I start the container on my local machine, but it doesn't work if I deploy it on, say, foobar.mycompany.com. It probably also wouldn't work in my local machine if I did some port mapping, say to port 9090.

When we generate the OpenAPI definitions for our own software, we never include any server information, which shows up in Swagger UI as drop-down only with /in it, and that works.

Would you consider adding / to your servers definition in OpenAPI? I think that should solve my problem.

Thanks!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions