Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JS Bundle fetch URL is not Context-path aware #3108

Open
@JayShankar-Vetlyf

Description

Describe the bug

In a Spring-boot application , if the server is running with context path /context, then the JS Bundle URL path is malformed i.e. it doesn't include the context path & hence it doesn't load properly.

To Reproduce
Steps to reproduce the behavior:

  • What version of spring-boot you are using? - JAVA : 17 , spring-boot : 3.5.6
  • What modules and versions of springdoc-openapi are you using? - springdoc-openapi-starter-webmvc-scalar : 2.8.13
  • What is the actual and the expected result using OpenAPI Description (yml or json)? - The Scalar API URL doesn;t load due to incorrect JS fetch path
  • Provide with a sample code (HelloController) or Test that reproduces the problem - My configuration is:
# Documentation configuration
springdoc:
 api-docs:
 path: /api-docs
 swagger-ui:
 path: /swagger-ui.html
 operationsSorter: method
 tagsSorter: alpha
 show-actuator: false
scalar:
 enabled: ${SCALAR_DOCS_ENABLED:true}
 url: /api-docs
 path: /docs

Expected behavior

  • The JS Path URL should be resolved correctly (i.e. it should include /context in the URL

Screenshots

Image

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

        AltStyle によって変換されたページ (->オリジナル) /