Change appending api key to url in swagger ui
MODIFY
CHANGELOG.md
CHANGELOG.md
### Patch
+- GW-427: Change appending api key to url in swagger ui
+- Hotfix: correct about logo path
- GW-421: Status tooltip is displayed in the left upper corner
- GW-339: Beautify "Add Developer" button
- GW-406: First commit delivers no test result files

MODIFY
src/app/components/swagger/swagger.component.ts
src/app/components/swagger/swagger.component.ts
@@ -82,8 +82,10 @@ export class SwaggerComponent implements OnInit {
// set bearer token for authentication to get swagger file
request.headers.Authorization = 'Bearer ' + sessionStorage.getItem('api_mgmt_keycloak_token');
} else if (!isPublicApi) {
+ const url = new URL(request.url);
// set api key to authorize all api requests also for option requests
- request.url += '?apiKey=' + apiKey;
+ url.searchParams.append('apiKey', apiKey);
+ request.url = url.toString();
}
return request;
},

GW-427: Change appending api key to url in swagger ui