Skip to content

Latest commit

 

History

History
140 lines (106 loc) · 4.24 KB

File metadata and controls

140 lines (106 loc) · 4.24 KB

communicationservices

see https://aka.ms/autorest

This is the AutoRest configuration file for communicationservices.

Getting Started

To build the SDKs for My API, simply install AutoRest via npm (npm install -g autorest) and then run:

autorest readme.md

To see additional help and options, run:

autorest --help

For other options on installation see Installing AutoRest on the AutoRest github page.


Configuration

Basic Information

These are the global settings for the communicationservices.

openapi-type: data-plane
tag: package-jobrouter-2023-11-01

Suppression

suppressions:
  - code: ValidFormats
    where: $.definitions["Azure.Core.eTag"].format
    reason: eTag should be an allowed format
directive:
  - suppress: INVALID_TYPE

Tag: package-jobrouter-2023-11-01

These settings apply only when --tag=package-jobrouter-2023-11-01 is specified on the command line.

input-file:
  - stable/2023-11-01/communicationservicejobrouter.json

Tag: package-jobrouter-2022-07-18-preview

These settings apply only when --tag=package-jobrouter-2022-07-18-preview is specified on the command line.

input-file:
  - preview/2022-07-18-preview/communicationservicejobrouter.json
title:
  Azure Communication Services
directive:
# Set reference to WorkerSelectorAttachment in ClassificationPolicy
  - from: swagger-document
    where: "$.definitions.ClassificationPolicy.properties.workerSelectors.items"
    transform: >
      $["$ref"] = "#/definitions/WorkerSelectorAttachment";
# Set reference to QueueSelectorAttachment in ClassificationPolicy  
  - from: swagger-document
    where: "$.definitions.ClassificationPolicy.properties.queueSelectors.items"
    transform: >
      $["$ref"] = "#/definitions/QueueSelectorAttachment";
# Set reference to ExceptionAction in ExceptionRule
  - from: swagger-document
    where: "$.definitions.ExceptionRule.properties.actions"
    transform: >
      $.type = "object";
      $.additionalProperties["$ref"] = "#/definitions/ExceptionAction";

Tag: package-jobrouter-2021-10-20-preview2

These settings apply only when --tag=package-jobrouter-2021-10-20-preview2 is specified on the command line.

input-file:
  - preview/2021-10-20-preview2/communicationservicejobrouter.json
title:
  Azure Communication Services
directive:
# Set reference to WorkerSelectorAttachment in ClassificationPolicy
  - from: swagger-document
    where: "$.definitions.ClassificationPolicy.properties.workerSelectors.items"
    transform: >
      $["$ref"] = "#/definitions/WorkerSelectorAttachment";
# Set reference to QueueSelectorAttachment in ClassificationPolicy  
  - from: swagger-document
    where: "$.definitions.ClassificationPolicy.properties.queueSelectors.items"
    transform: >
      $["$ref"] = "#/definitions/QueueSelectorAttachment";
# Set reference to WorkerSelectorAttachment in PagedClassificationPolicy  
  - from: swagger-document
    where: "$.definitions.PagedClassificationPolicy.properties.workerSelectors.items"
    transform: >
      $["$ref"] = "#/definitions/WorkerSelectorAttachment";
# Set reference to QueueSelectorAttachment in PagedClassificationPolicy
  - from: swagger-document
    where: "$.definitions.PagedClassificationPolicy.properties.queueSelectors.items"
    transform: >
      $["$ref"] = "#/definitions/QueueSelectorAttachment";

# Set reference to ExceptionAction in ExceptionRule
  - from: swagger-document
    where: "$.definitions.ExceptionRule.properties.actions"
    transform: >
      $.type = "object";
      $.additionalProperties["$ref"] = "#/definitions/ExceptionAction";

# Rename CommunicationError to JobRouterError
  - from: swagger-document
    where: '$.definitions.CommunicationError'
    transform: >
      $["x-ms-client-name"] = "JobRouterError";

Code Generation

Swagger to SDK

This section describes what SDK should be generated by the automatic system. This is not used by Autorest itself.

CSharp

See configuration in readme.csharp.md

TypeScript

See configuration in readme.typescript.md