version to 2.6.0, better documentation

This commit is contained in:
Daniel Rodríguez 2021-07-28 16:25:09 +00:00 коммит произвёл GitHub
Родитель 9f57b8ded3
Коммит 557e53794a
5 изменённых файлов: 22 добавлений и 8 удалений

Просмотреть файл

@ -1,6 +1,6 @@
# Changelog
## 2.5.4 - (2021-07-29)
## 2.6.0 - (2021-07-29)
- Added a new property `baseUri` on the `ServiceClientOptions`, so that when a `TokenCredential` is sent to `ServiceClient`, it now automatically sets the scope of future token requests based on the `options.baseUri` property.

Просмотреть файл

@ -735,7 +735,11 @@ function deserializeCompositeType(
// paging
if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") {
propertyInstance = responseBody[key];
const arrayInstance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName);
const arrayInstance = serializer.deserialize(
propertyMapper,
propertyInstance,
propertyObjectName
);
// Copy over any properties that have already been added into the instance, where they do
// not exist on the newly de-serialized array
for (const [key, value] of Object.entries(instance)) {

Просмотреть файл

@ -144,8 +144,13 @@ export interface ServiceClientOptions {
*/
agentSettings?: AgentSettings;
/**
* If specified, this is the base URI that requests will be made against for this ServiceClient.
* If it is not specified, then all OperationSpecs must contain a baseUrl property.
* If specified:
* - This `baseUri` becomes the base URI that requests will be made against for this ServiceClient.
* - If a `TokenCredential` was passed through the constructor, this `baseUri` defines the `getToken` scope to be `${options.baseUri}/.default`.
*
* If it is not specified:
* - All OperationSpecs must contain a baseUrl property.
* - If a `TokenCredential` was passed through the constructor, the `getToken` scope is set to be "https://management.azure.com/.default".
*/
baseUri?: string;
}
@ -156,8 +161,13 @@ export interface ServiceClientOptions {
*/
export class ServiceClient {
/**
* If specified, this is the base URI that requests will be made against for this ServiceClient.
* If it is not specified, then all OperationSpecs must contain a baseUrl property.
* If specified:
* - This `baseUri` becomes the base URI that requests will be made against for this ServiceClient.
* - If a `TokenCredential` was passed through the constructor, this `baseUri` defines the `getToken` scope to be `${options.baseUri}/.default`.
*
* If it is not specified:
* - All OperationSpecs must contain a baseUrl property.
* - If a `TokenCredential` was passed through the constructor, the `getToken` scope is set to be "https://management.azure.com/.default".
*/
protected baseUri?: string;

Просмотреть файл

@ -7,7 +7,7 @@ export const Constants = {
* @const
* @type {string}
*/
msRestVersion: "2.5.4",
msRestVersion: "2.6.0",
/**
* Specifies HTTP.

Просмотреть файл

@ -5,7 +5,7 @@
"email": "azsdkteam@microsoft.com",
"url": "https://github.com/Azure/ms-rest-js"
},
"version": "2.5.4",
"version": "2.6.0",
"description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest",
"tags": [
"isomorphic",