Skip to content
代码片段 群组 项目
提交 6c50f911 编辑于 作者: Jacques's avatar Jacques
浏览文件

Show operation id's by default (SwaggerUI)

Passes displayOperationId: true in the swagger config

Changelog: fixed
上级 7360d29f
No related branches found
No related tags found
无相关合并请求
...@@ -11,6 +11,7 @@ export default () => { ...@@ -11,6 +11,7 @@ export default () => {
url: el.dataset.endpoint, url: el.dataset.endpoint,
dom_id: '#js-openapi-viewer', dom_id: '#js-openapi-viewer',
deepLinking: true, deepLinking: true,
displayOperationId: true,
}); });
}) })
.catch((error) => { .catch((error) => {
......
import { SwaggerUIBundle } from 'swagger-ui-dist';
import renderOpenApi from '~/blob/openapi';
jest.mock('swagger-ui-dist');
describe('OpenAPI blob viewer', () => {
const id = 'js-openapi-viewer';
const mockEndpoint = 'some/endpoint';
beforeEach(() => {
setFixtures(`<div id="${id}" data-endpoint="${mockEndpoint}"></div>`);
renderOpenApi();
});
it('initializes SwaggerUI with the correct configuration', () => {
expect(SwaggerUIBundle).toHaveBeenCalledWith({
url: mockEndpoint,
dom_id: `#${id}`,
deepLinking: true,
displayOperationId: true,
});
});
});
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册