Skip to content
Snippets Groups Projects
Commit 9374d119 authored by Charly Maeder's avatar Charly Maeder
Browse files

Merge branch 'describe_repository_api' into feature/use_parameters_and_launch_request

parents 93fa05de d9527c34
No related branches found
No related tags found
1 merge request!6Fix bug : use identifiant in localstorage for get catalog. Disable next button...
......@@ -84,8 +84,16 @@ export class OpenApi {
this.paths = [];
}
cleanServers(serverUrl: string) {
if (serverUrl == null || serverUrl.length === 0) {
return;
}
this._servers = [{ url: serverUrl }];
}
addServers(serverUrl: string) {
if (serverUrl == null || serverUrl.length === 0 || typeof(serverUrl !== 'string')) {
if (serverUrl == null || serverUrl.length === 0) {
return;
}
......
......@@ -218,7 +218,12 @@ export class PublishApiComponent implements OnInit {
reader.onload = () => {
console.log(reader.result as string);
const servers = this.openApi.servers;
const catId = this.openApi.info['x-catalog-id'];
this.openApi = this.openApiService.getFromString(reader.result as string);
this.openApi.cleanServers(servers[0].url);
this.openApi.info['x-catalog-id'] = catId;
};
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