Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styling issues for OAS 3.1 #10316

Open
whoareyoukid opened this issue Feb 25, 2025 · 1 comment
Open

Styling issues for OAS 3.1 #10316

whoareyoukid opened this issue Feb 25, 2025 · 1 comment

Comments

@whoareyoukid
Copy link

whoareyoukid commented Feb 25, 2025

Q&A (please complete the following information)

  • OS: macOS
  • Browser: chrome
  • Version: 133
  • Method of installation: npm
  • Swagger-UI version: 5.19.0
  • Swagger/OpenAPI version: OpenAPI 3.1

Content & configuration

Example Swagger/OpenAPI definition:

{
    "openapi": "3.1.0",
    "info": {
        "title": "Upload JSON object API",
        "summary": "A brief summary of the Sample API.",
        "version": "1.0.0"
    },
    "paths": {
        "/example": {
            "head": {
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "exampleField": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response"
                    }
                }
            }
        }
    }
}

Swagger-UI configuration options:

SwaggerUI({
        spec: apiSpec,
        defaultModelsExpandDepth: -1,
        dom_id: '#api-ui-container',
        defaultModelRendering: 'model',
        showExtensions: true,
        deepLinking: true,
        plugins: [DisableTryItOutPlugin],
        onComplete(): void {
          setTimeout(() => that.swaggerUiOnComplete(that), 1000);
        },
      })

Describe the bug you're encountering

There are styling issues observed in the response schema section.

Image

Expected behavior

Image
@mazen-isstech
Copy link

I'm experiencing the same bug on v5.20.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants