swaggereditor.component.ts 640 Bytes
Newer Older
cazenave's avatar
cazenave committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { Component, OnInit } from '@angular/core';


declare const SwaggerEditorBundle: any;
declare const SwaggerEditorStandalonePreset: any;

@Component({
  selector: 'app-swaggereditor',
  templateUrl: './swaggereditor.component.html',
  styleUrls: ['./swaggereditor.component.scss']
})
export class SwaggereditorComponent implements OnInit {


  constructor() { }

ngOnInit(): void {
  const editor = SwaggerEditorBundle({
    dom_id: '#swagger-editor',
    layout: 'StandaloneLayout',
    presets: [
      SwaggerEditorStandalonePreset
    ],
    url: 'http://rackerlabs.github.io/wadl2swagger/openstack/swagger/dbaas.json'
  });
}

}