We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9756364 commit 33678e6Copy full SHA for 33678e6
src/services/models/ApiInfo.ts
@@ -21,12 +21,17 @@ export class ApiInfoModel implements OpenAPIInfo {
21
type: 'application/json',
22
});
23
return window.URL.createObjectURL(blob);
24
+ } else if (!isBrowser) {
25
+ return (
26
+ 'data:application/octet-stream;base64,' +
27
+ new Buffer(JSON.stringify(this.parser.spec, null, 2)).toString('base64')
28
+ );
29
}
30
return this.parser.specUrl;
31
32
33
get downloadFileName(): string | undefined {
- if (!this.parser.specUrl && isBrowser && window.Blob && window.URL) {
34
+ if (!this.parser.specUrl) {
35
return 'swagger.json';
36
37
return undefined;
0 commit comments