/* tslint:disable */
/* eslint-disable */
import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { filter, map } from 'rxjs/operators';
import { StrictHttpResponse } from '../../strict-http-response';
import { RequestBuilder } from '../../request-builder';
import { ClientCredentialClientResponse } from '../../models/client-credential-client-response';
import { UpdateClientCredentialClientRequest } from '../../models/update-client-credential-client-request';
export interface UpdateClientCredentialClient$Params {
accountId: string;
id: string;
accountId: string;
id: string;
body: UpdateClientCredentialClientRequest;
}
export function updateClientCredentialClient(
http: HttpClient,
rootUrl: string,
params: UpdateClientCredentialClient$Params,
context?: HttpContext,
): Observable<StrictHttpResponse<ClientCredentialClientResponse>> {
const rb = new RequestBuilder(rootUrl, updateClientCredentialClient.PATH, 'put');
if (params) {
rb.path('accountId', params.accountId, {});
rb.path('id', params.id, {});
rb.path('accountId', params.accountId, { style: 'simple' });
rb.path('id', params.id, { style: 'simple' });
rb.body(params.body, 'application/json');
}
return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
map((r: HttpResponse<any>) => {
return r as StrictHttpResponse<ClientCredentialClientResponse>;
}),
);
}
updateClientCredentialClient.PATH = '/api/account/{accountId}/identity/v1/Clients/{id}';
Notice that accountId and id params duplicated, I suspect this is due to presence of parameters under root entry /api/account/{accountId}/identity/v1/Clients/{id} and under get and put as well.
Other tools I've tried were able to deal with this case:
Specific path-level parameters can be overridden on the operation level, but cannot be removed.
Since params in above case have same name they should not be stacked by overrided instead.
Here's my openapi: 3.0.1 JSON (it's rather big so only small portion shown below)
Client generated:
Notice that
accountId
andid
params duplicated, I suspect this is due to presence ofparameters
under root entry/api/account/{accountId}/identity/v1/Clients/{id}
and underget
andput
as well.Other tools I've tried were able to deal with this case:
I trust provided JSON schema is correct, according to https://swagger.io/docs/specification/describing-parameters/#common-for-path