Skip to content

Commit

Permalink
Speaker Recognition V3.0 GA swagger files (Azure#15685)
Browse files Browse the repository at this point in the history
* Create identification-swagger.yaml

* Create verification-swagger.yaml

* Update identification-swagger.yaml

* Update verification-swagger.yaml

* Update and rename identification-swagger.yaml to identification-swagger.json

* Update and rename verification-swagger.yaml to verification-swagger.json

* Added new files

kept json for the move

* Update based on review

* typo

* cspell

* cspell

* fix examples

* pretty

* Fix model semantic issues

* pretty

* Apply review comments

* Update Identification.json

* linter issues

* Linter issues

* api version required

* Fix model issues

* pretty checks

* Update readme add go

* fix required

* update go readme

* Clean autorest warnings

* Fixes

* fix regression

* python

* go

* python trial2

* fix typescript

* Remove typescipt not required

* Attempt to fix last failing test

Co-authored-by: Youssef Shahin <[email protected]>
Co-authored-by: Youssef Shahin <[email protected]>
Co-authored-by: Youssef Shahin <[email protected]>
  • Loading branch information
4 people authored and Milan Zolota committed Sep 27, 2021
1 parent 234a694 commit 49e2ad1
Show file tree
Hide file tree
Showing 32 changed files with 2,943 additions and 62 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Go

These settings apply only when `--go` is specified on the command line.

``` yaml $(go)
go:
license-header: MICROSOFT_MIT_NO_VERSION
namespace: speakeridentification
clear-output-folder: true
```
### Go multi-api
``` yaml $(go) && $(multiapi)
batch:
- tag: release_2021-09-05
```
### Tag: release_2021-09-05 and go
These settings apply only when `--tag=release_2021-09-05 --go` is specified on the command line.
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.

``` yaml $(tag) == 'release_2021-09-05' && $(go)
output-folder: $(go-sdk-folder)/services/cognitiveservices/2021-09-05/$(namespace)
```

### Tag: identification_2_0_preview and go

These settings apply only when `--tag=identification_2_0_preview --go` is specified on the command line.
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.

``` yaml $(tag) == 'identification_2_0_preview' && $(go)
output-folder: $(go-sdk-folder)/services/cognitiveservices/v2.0-preview/$(namespace)
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,44 @@

> see https://aka.ms/autorest
Configuration for generating Speaker Verification SDK.
Configuration for generating Speaker Identification SDK.

The current release is `release_2021-09-05`.

``` yaml
tag: identification_2_0_preview
tag: release_2021-09-05
add-credentials: true
openapi-type: data-plane
```
The current release for the Authoring Endpoint is `identification_2_0_preview`.
``` yaml
tag: identification_2_0_preview
add-credentials: true
openapi-type: data-plane
```
# Releases
## Identification 2.0
## Identification 2021-09-05
These settings apply only when `--tag=release_2021-09-05` is specified on the command line.

``` yaml $(tag) == 'release_2021-09-05'
input-file: stable/2021-09-05/Identification.json
```

## Identification 2.0 Preview
These settings apply only when `--tag=identification_2_0_preview` is specified on the command line.

``` yaml $(tag) == 'identification_2_0_preview'
input-file: preview/v2.0/Identification.json
```

``` yaml $(multiapi)
batch:
- tag: release_2021-09-05
- tag: identification_2_0_preview
```

---

# Code Generation
Expand All @@ -33,14 +52,24 @@ This is not used by Autorest itself.

``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-go
- repo: azure-sdk-for-python
- repo: azure-sdk-for-js
- repo: azure-sdk-for-node
```

### CSharp Settings
These settings apply only when `--csharp` is specified on the command line.
``` yaml $(csharp)
``` yaml $(csharp) && $(tag) == 'release_2021-09-05'
csharp:
sync-methods: None
license-header: MICROSOFT_MIT_NO_VERSION
azure-arm: false
namespace: Microsoft.Azure.CognitiveServices.speech.speaker.identification
output-folder: $(csharp-sdks-folder)/CognitiveServices/speech.speaker.identification/src/Generated
clear-output-folder: true
```

``` yaml $(csharp) && $(tag) == 'identification_2_0_preview'
csharp:
sync-methods: None
license-header: MICROSOFT_MIT_NO_VERSION
Expand All @@ -55,7 +84,7 @@ csharp:
These settings apply only when `--java` is specified on the command line.
Please also specify `--azure-libraries-for-java-folder=<path to the root directory of your azure-libraries-for-java clone>`.

``` yaml $(java)
``` yaml $(java) && $(tag) == 'release_2021-09-05'
java:
azure-arm: true
namespace: com.microsoft.azure.cognitiveservices.speech.speaker.identification
Expand All @@ -66,7 +95,26 @@ java:
with-single-async-method: true
```

## Multi-API/Profile support for AutoRest v3 generators
``` yaml $(java) && $(tag) == 'identification_2_0_preview'
java:
azure-arm: true
namespace: com.microsoft.azure.cognitiveservices.speech.speaker.identification
license-header: MICROSOFT_MIT_NO_CODEGEN
payload-flattening-threshold: 1
output-folder: $(azure-libraries-for-java-folder)/cognitiveservices/data-plane/speech/speaker/identification
with-optional-parameters: true
with-single-async-method: true
```

## Python

See configuration in [readme.python.md](./readme.python.md)

## Go

See configuration in [readme.go.md](./readme.go.md)

## Multi-API/Profile support for AutoRest v3 generators

AutoRest V3 generators require the use of `--tag=all-api-versions` to select api files.

Expand All @@ -78,15 +126,16 @@ require: $(this-folder)/../../../../../profiles/readme.md
# all the input files across all versions
input-file:
- $(this-folder)/stable/2021-09-05/Identification.json
- $(this-folder)/preview/v2.0/Identification.json
```

If there are files that should not be in the `all-api-versions` set,
If there are files that should not be in the `all-api-versions` set,
uncomment the `exclude-file` section below and add the file paths.

``` yaml $(tag) == 'all-api-versions'
#exclude-file:
#exclude-file:
# - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json
```

Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@ Use `--python-mode=update` if you already have a setup.py and just want to updat
python-mode: create
python:
license-header: MICROSOFT_MIT_NO_VERSION
add-credentials: true
payload-flattening-threshold: 2
namespace: azure.cognitiveservices.speech.speaker.identification
package-name: azure-cognitiveservices-speech-speaker
package-name: azure-cognitiveservices-speech-speaker-identification
clear-output-folder: true
no-namespace-folders: true

```
``` yaml $(python) && $(python-mode) == 'update'
python:
no-namespace-folders: true
output-folder: $(python-sdks-folder)/cognitiveservices/speech/speaker/identification

``` yaml $(tag) == 'release_2021-09-05'
namespace: azure.cognitiveservices.speech.speaker.identification
output-folder: $(python-sdks-folder)/cognitiveservices/speech/speaker/identification
```
``` yaml $(python) && $(python-mode) == 'create'
python:
basic-setup-py: true
output-folder: $(python-sdks-folder)/cognitiveservices/azure-cognitiveservices-speech-speaker
``` yaml $(tag) == 'identification_v2_0_preview'
namespace: azure.cognitiveservices.speech.speaker.identification
output-folder: $(python-sdks-folder)/cognitiveservices/speech/speaker/identification
```

This file was deleted.

Loading

0 comments on commit 49e2ad1

Please sign in to comment.