[bug]: Cannot override Swagger UI public path via x-strapi-config.path in settings.json

Open
#93 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 6 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
api, documentation

Research direction

Start by tracing how documentation/settings.json and x-strapi-config.path are handled when the Swagger UI route is registered. Reproduce the issue with /cms/documentation and /documentation, then verify that changing the setting moves the working route and no longer leaves the UI only at /documentation.

Written by the indexing model from the issue text.

Description

issue: bug severity: medium source: sdk-plugin
What version of @strapi/sdk-plugin are you using?

Strapi version:
5.18.1

Plugin version:
@strapi/plugin-documentation 5.18.1

What's Wrong?

It is not possible to change the public path for the Swagger UI in Strapi via settings.json using:

{
  "x-strapi-config": {
    "path": "/cms/documentation"
  }
}

The Swagger UI remains accessible only at /documentation — the configuration has no effect.

To Reproduce

Steps to reproduce:

  1. Add the following to documentation/settings.json:
{
  "x-strapi-config": {
    "path": "/cms/documentation"
  }
}
  1. Restart Strapi.

  2. Open /cms/documentation — returns 404.

  3. The Swagger UI is still available only at /documentation.

Expected Behaviour

Expected behavior:
Setting "x-strapi-config.path" should change the public route of the Swagger UI.

Dominant language
TypeScript
Stars
24
Forks
13
Avg merge
5d 3h
Merged PRs (30d)
5

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from strapi/sdk-plugin

All issues in strapi/sdk-plugin

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.