Skip to content
Snippets Groups Projects
Commit 7ef92023 authored by Baptiste Toulemonde's avatar Baptiste Toulemonde
Browse files

bug fix

parent 0a46030c
No related branches found
No related tags found
2 merge requests!33Feature/maaping decription to tsv,!30Feature/distribution
...@@ -114,7 +114,6 @@ export class PublishApiComponent implements OnInit { ...@@ -114,7 +114,6 @@ export class PublishApiComponent implements OnInit {
this.openApi.info['x-catalog-id'] = catId; this.openApi.info['x-catalog-id'] = catId;
this.catalogSelect.selected = catId; this.catalogSelect.selected = catId;
this.onChangeRepository(catId); this.onChangeRepository(catId);
this.type = this.getType(catId);
} }
getTitleFromFdpApi(fdpApiResponse: FdpApiResponseItem[]): string { getTitleFromFdpApi(fdpApiResponse: FdpApiResponseItem[]): string {
...@@ -175,9 +174,10 @@ export class PublishApiComponent implements OnInit { ...@@ -175,9 +174,10 @@ export class PublishApiComponent implements OnInit {
} }
downloadJson(): void { downloadJson(): void {
let windowVar: any = window.navigator;
const newBlob = new Blob([this.openApiService.getPrettyJson(this.openApi)], { type: 'application/json' }); const newBlob = new Blob([this.openApiService.getPrettyJson(this.openApi)], { type: 'application/json' });
if (window.navigator && window.navigator.msSaveOrOpenBlob) { if (windowVar && windowVar.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(newBlob); windowVar.msSaveOrOpenBlob(newBlob);
return; return;
} }
const data = window.URL.createObjectURL(newBlob); const data = window.URL.createObjectURL(newBlob);
...@@ -268,7 +268,6 @@ export class PublishApiComponent implements OnInit { ...@@ -268,7 +268,6 @@ export class PublishApiComponent implements OnInit {
this.openApi = this.openApiService.getFromString(reader.result as string); this.openApi = this.openApiService.getFromString(reader.result as string);
this.openApi.cleanServers(servers[0].url); this.openApi.cleanServers(servers[0].url);
this.openApi.info['x-catalog-id'] = catId; this.openApi.info['x-catalog-id'] = catId;
this.type = this.getType(catId)
}; };
reader.readAsText(jsonFile); reader.readAsText(jsonFile);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment