Skip to content

swagger-initializer.js is sent endcoded in the JVM's default charset #2207

Closed
@roded

Description

@roded

Describe the bug

The swagger-initializer.js file being accepted by the browser is in the the JVM's default charset.
So on systems in which the default charset isn't UTF*, the browser seems to be getting a file which is unreadable.
Downloading the file and opening it up in the system's default encoding shows the correct contents.

To Reproduce
You'll have to load the JVM with a non-default charset.

  • What version of spring-boot you are using?
    2.7.10

  • What modules and versions of springdoc-openapi are you using?
    springdoc-openapiUi = "org.springdoc:springdoc-openapi-ui:1.7.0"

  • What is the actual and the expected result using OpenAPI Description (yml or json)?
    N/A, the OpenAPI JSON loads fine

  • Provide with a sample code (HelloController) or Test that reproduces the problem
    N/A

Expected behavior

  • A clear and concise description of what you expected to happen.
    The swagger-initializer.js file accepted by the browser should be readable.

  • What is the expected result using OpenAPI Description (yml or json)?
    N/A

Screenshots
image
image

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    incompleteincomplete description: Make sure you Provide a Minimal, Reproducible Example - with HelloController

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions