You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browser and version: tested in Firefox 127.0.2 and Chrome 109.0.5414.74
Method of installation: npm install swagger-ui-express
Swagger-UI version: Tested in 4.1.2 and 5.0.1
Swagger/OpenAPI version: OpenAPI 3.0.2
Example Swagger/OpenAPI definition:
openapi: 3.0.2info:
title: Minimal exampleversion: 1.0.0paths:
/projects:
get:
$ref: '#/components/schemas/ProjectsQuery'post:
$ref: '#/components/schemas/ProjectsQuery'components:
schemas:
ProjectsQuery:
summary: Get a list of projectstags:
- projectsparameters:
- name: limitdescription: number of projectsschema:
type: integerdefault: 10maximum: 100responses:
200:
content:
application/json:
schema:
type: objectproperties:
projects:
type: arraydescription: an array of projects
Swagger-UI configuration options:
// Library to read yaml filesconstyaml=require('yamljs');// Import the swagger logicconstswaggerUI=require('swagger-ui-express');// Read the specificationconstspecification=yaml.load(`${__dirname}/description.yml`);// Set some swagger configuration parametersconstswaggerConfig={customCss: `.swagger-ui .topbar { display: none }`,customSiteTitle: `Minimal example`,swaggerOptions: {supportedSubmitMethods: []// Disable all 'Try it out' buttons}};// Parse it with the Swagger logicconstswaggerSpec=swaggerUI.setup(specification,swaggerConfig);module.exports=swaggerSpec;
Describe the bug you're encountering
When using $ref to define a path the swagger display is buggy.
It is ignoring the summary and the tags (at least) until we click on the endpoint.
Once clicked, it starts to work perfectly.
To reproduce...
Steps to reproduce the behavior:
Just open it
Click on the endpoint to fix de bug until we reload the page
Expected behavior
Works properly from the beginning
Screenshots
Before:
After:
The text was updated successfully, but these errors were encountered:
Example Swagger/OpenAPI definition:
Swagger-UI configuration options:
Describe the bug you're encountering
When using $ref to define a path the swagger display is buggy.
It is ignoring the summary and the tags (at least) until we click on the endpoint.
Once clicked, it starts to work perfectly.
To reproduce...
Steps to reproduce the behavior:
Expected behavior
Works properly from the beginning
Screenshots
Before:
After:
The text was updated successfully, but these errors were encountered: