Changeset View
Changeset View
Standalone View
Standalone View
swh/web/assets/src/bundles/api/index.js
- This file was added.
/** | |||||
* Copyright (C) 2020 The Software Heritage developers | |||||
* See the AUTHORS file at the top-level directory of this distribution | |||||
* License: GNU Affero General Public License version 3, or any later version | |||||
* See top-level LICENSE file for more information | |||||
*/ | |||||
import SwaggerUI from 'swagger-ui'; | |||||
import 'swagger-ui/dist/swagger-ui.css'; | |||||
import './api.css'; | |||||
export function initSwaggerUI() { | |||||
$(document).ready(() => { | |||||
SwaggerUI({ | |||||
url: Urls.api_2_schema(), | |||||
dom_id: '#swh-api-v2-doc' | |||||
}); | |||||
}); | |||||
} |