Skip to content

Use relative path to oas-3.0.0.json #100

@rozmansi

Description

@rozmansi

I am running Oat++ server behind a reverse proxy. The public URL is like https://www.example.com/myservice/ while internally it gets the content from my Oat++ server at http://host.local:8080/.
Mind the external path /myservice/swagger/ui maps to internal path /swagger/ui.

Now, the Swagger UI is using absolute path to load OAS from /api-docs/oas-3.0.0.json. And this path is hardcoded. This makes it fail to load when the external root is different from the Oat++ server one.

I suggest like loading CSS using relative path, oas-3.0.0.json could also be changed to load using a relative path like ../api-docs/oas-3.0.0.json. This should allow client to load the right OAS regardless the path the service is exported to the public.

This might be related to #90. Solving this would also solve #77.

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