Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CognitiveService ComputerVision API to V2 #3236

Merged
merged 8 commits into from
Jun 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@

Configuration for generating Computer Vision SDK.

The current release is `release_1_0`.
The current release is `release_2_0`.

``` yaml

tag: release_1_0
tag: release_2_0
add-credentials: true
openapi-type: data-plane
```
# Releases

### Release 1.0
These settings apply only when `--tag=release_1_0` is specified on the command line.
### Release 2.0
These settings apply only when `--tag=release_2_0` is specified on the command line.

``` yaml $(tag) == 'release_1_0'
input-file: stable/v1.0/ComputerVision.json
``` yaml $(tag) == 'release_2_0'
input-file: stable/v2.0/ComputerVision.json
```

## Swagger to SDK
Expand Down Expand Up @@ -48,6 +48,13 @@ csharp:
namespace: Microsoft.Azure.CognitiveServices.Vision.ComputerVision
output-folder: $(csharp-sdks-folder)/CognitiveServices/dataPlane/Vision/ComputerVision/ComputerVision/Generated
clear-output-folder: true

directive:
from: source-file-csharp
where: $
transform: >
$ = $.replace( /TextRecognitionMode mode, string url,/g, "string url, TextRecognitionMode mode," );
$ = $.replace( /mode, url,/g, "url, mode," );
```

## Python
Expand All @@ -65,6 +72,12 @@ python:
namespace: azure.cognitiveservices.vision.computervision
package-name: azure-cognitiveservices-vision-computervision
clear-output-folder: true

directive:
from: source-file-python
where: $
transform: >
$ = $.replace( /self, mode, url,/g, "self, url, mode," );
```
``` yaml $(python) && $(python-mode) == 'update'
python:
Expand Down Expand Up @@ -92,16 +105,16 @@ go:

``` yaml $(go) && $(multiapi)
batch:
- tag: release_1_0
- tag: release_2_0
```

### Tag: release_1_0 and go
### Tag: release_2_0 and go

These settings apply only when `--tag=release_1_0 --go` is specified on the command line.
These settings apply only when `--tag=release_2_0 --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_1_0' && $(go)
output-folder: $(go-sdk-folder)/services/cognitiveservices/v1.0/computervision
``` yaml $(tag) == 'release_2_0' && $(go)
output-folder: $(go-sdk-folder)/services/cognitiveservices/v2.0/computervision
```


Expand All @@ -119,4 +132,11 @@ java:
output-folder: $(azure-libraries-for-java-folder)/azure-cognitiveservices/vision/computervision
with-optional-parameters: true
with-single-async-method: true

directive:
from: source-file-java
where: $
transform: >
$ = $.replace( /TextRecognitionMode mode, String url/g, "String url, TextRecognitionMode mode" );
$ = $.replace( /recognizeTextWithServiceResponseAsync\(mode, url\)/g, "recognizeTextWithServiceResponseAsync(url, mode)" )
```
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ Please also specify `--node-sdks-folder=<path to root folder of your azure-sdk-f
``` yaml $(nodejs)
nodejs:
package-name: azure-cognitiveservices-computervision
package-version: 1.0.0-preview
package-version: 2.0.0-preview
output-folder: $(node-sdks-folder)/lib/services/computerVision
override-client-name: ComputerVisionAPIClient
azure-arm: false
generate-license-txt: true
generate-package-json: true
generate-readme-md: false

directive:
from: source-file-nodejs
where: $
transform: >
$ = $.replace( /mode: string, url: string/g, "url: string, mode: string" );
$ = $.replace( /mode, url/g, "url, mode" );
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,28 @@ ruby:
package-name: azure_cognitiveservices_computervision
package-version: "0.16.0"
azure-arm: true

directive:
from: source-file-ruby
where: $
transform: >
$ = $.replace( /mode, url/g, "url, mode" );
```

### Ruby multi-api

``` yaml $(ruby) && $(multiapi)
batch:
- tag: release_1_0
- tag: release_2_0
```

### Tag: release_1_0 and ruby
### Tag: release_2_0 and ruby

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

``` yaml $(tag) == 'release_1_0' && $(ruby)
namespace: "Azure::CognitiveServices::ComputerVision::V1_0"
``` yaml $(tag) == 'release_2_0' && $(ruby)
namespace: "Azure::CognitiveServices::ComputerVision::V2_0"
output-folder: $(ruby-sdks-folder)/data/azure_cognitiveservices_computervision/lib
title: "ComputerVisionClient"
```
Loading