Skip to content
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 @@ -824,18 +824,6 @@
}
}
},
"TextAnalyticsTask": {
"type": "object",
"required": [
"enable"
],
"properties": {
"enable": {
"default": false,
"type": "boolean"
}
}
},
"TextAnalyticsWarning": {
"type": "object",
"required": [
Expand Down Expand Up @@ -866,60 +854,46 @@
}
},
"PiiTask": {
"allOf": [
{
"$ref": "#/definitions/TextAnalyticsTask"
},
{
"properties": {
"parameters": {
"properties": {
"parameters": {
"properties": {
"domain": {
"default": "none",
"enum": [
"phi",
"none"
],
"type": "string"
},
"model-version": {
"default": "latest",
"type": "string"
},
"stringIndexType": {
"$ref": "#/definitions/StringIndexType"
}
},
"type": "object"
"domain": {
"default": "none",
"enum": [
"phi",
"none"
],
"type": "string"
},
"model-version": {
"default": "latest",
"type": "string"
},
"stringIndexType": {
"$ref": "#/definitions/StringIndexType"
}
},
"type": "object"
}
]
},
"type": "object"
},
"EntitiesTask": {
"allOf": [
{
"$ref": "#/definitions/TextAnalyticsTask"
},
{
"properties": {
"parameters": {
"properties": {
"parameters": {
"properties": {
"model-version": {
"default": "latest",
"type": "string"
},
"stringIndexType": {
"$ref": "#/definitions/StringIndexType"
}
},
"type": "object"
"model-version": {
"default": "latest",
"type": "string"
},
"stringIndexType": {
"$ref": "#/definitions/StringIndexType"
}
},
"type": "object"
}
]
},
"type": "object"
},
"InnerError": {
"type": "object",
Expand Down Expand Up @@ -1048,32 +1022,25 @@
}
},
"SentimentTask": {
"allOf": [
{
"$ref": "#/definitions/TextAnalyticsTask"
},
{
"properties": {
"parameters": {
"properties": {
"parameters": {
"properties": {
"model-version": {
"default": "latest",
"type": "string"
},
"opinionMining": {
"default": false,
"type": "boolean"
},
"stringIndexType": {
"$ref": "#/definitions/StringIndexType"
}
},
"type": "object"
"model-version": {
"default": "latest",
"type": "string"
},
"opinionMining": {
"default": false,
"type": "boolean"
},
"stringIndexType": {
"$ref": "#/definitions/StringIndexType"
}
},
"type": "object"
}
]
},
"type": "object"
},
"TaskState": {
"properties": {
Expand Down Expand Up @@ -1766,28 +1733,21 @@
}
},
"EntityLinkingTask": {
"allOf": [
{
"$ref": "#/definitions/TextAnalyticsTask"
},
{
"properties": {
"parameters": {
"properties": {
"parameters": {
"properties": {
"model-version": {
"default": "latest",
"type": "string"
},
"stringIndexType": {
"$ref": "#/definitions/StringIndexType"
}
},
"type": "object"
"model-version": {
"default": "latest",
"type": "string"
},
"stringIndexType": {
"$ref": "#/definitions/StringIndexType"
}
},
"type": "object"
}
]
},
"type": "object"
},
"HealthcareJobState": {
"allOf": [
Expand Down Expand Up @@ -2139,25 +2099,18 @@
}
},
"KeyPhrasesTask": {
"allOf": [
{
"$ref": "#/definitions/TextAnalyticsTask"
},
{
"properties": {
"parameters": {
"properties": {
"parameters": {
"properties": {
"model-version": {
"default": "latest",
"type": "string"
}
},
"type": "object"
"model-version": {
"default": "latest",
"type": "string"
}
},
"type": "object"
}
]
},
"type": "object"
},
"LanguageBatchInput": {
"type": "object",
Expand Down
59 changes: 32 additions & 27 deletions specification/cognitiveservices/data-plane/TextAnalytics/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,33 +132,8 @@ csharp:
```

## Python

These settings apply only when `--python` is specified on the command line.
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
Use `--python-mode=update` if you already have a setup.py and just want to update the code itself.

``` yaml $(python)
python-mode: create
python:
license-header: MICROSOFT_MIT_NO_VERSION
add-credentials: true
payload-flattening-threshold: 2
namespace: azure.cognitiveservices.language.textanalytics
package-name: azure-cognitiveservices-language-textanalytics
clear-output-folder: true
```

``` yaml $(python) && $(python-mode) == 'update'
python:
no-namespace-folders: true
output-folder: $(python-sdks-folder)/cognitiveservices/azure-cognitiveservices-language-textanalytics/azure/cognitiveservices/language/textanalytics
```

``` yaml $(python) && $(python-mode) == 'create'
python:
basic-setup-py: true
output-folder: $(python-sdks-folder)/cognitiveservices/azure-cognitiveservices-language-textanalytics
```

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

## Go

Expand All @@ -178,4 +153,34 @@ java:
output-folder: $(azure-libraries-for-java-folder)/cognitiveservices/data-plane/language/textanalytics
with-optional-parameters: true
with-single-async-method: true
```

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

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

This block is updated by an automatic script. Edits may be lost!

``` yaml $(tag) == 'all-api-versions' /* autogenerated */
# include the azure profile definitions from the standard location
require: $(this-folder)/../../../../profiles/readme.md

# all the input files across all versions
input-file:
- $(this-folder)/stable/v2.0/TextAnalytics.json
- $(this-folder)/stable/v2.1/TextAnalytics.json
- $(this-folder)/preview/v2.1/TextAnalytics.json
- $(this-folder)/preview/v3.0-preview.1/TextAnalytics.json
- $(this-folder)/stable/v3.0/TextAnalytics.json
- $(this-folder)/preview/v3.1-preview.1/TextAnalytics.json
- $(this-folder)/preview/v3.1-preview.2/TextAnalytics.json
- $(this-folder)/preview/v3.2-preview.1/TextAnalytics.json
```

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:
# - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
## Python

These settings apply only when `--python` is specified on the command line.
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
Use `--python-mode=update` if you already have a setup.py and just want to update the code itself.

``` yaml
python-mode: create
license-header: MICROSOFT_MIT_NO_VERSION
add-credentials: true
payload-flattening-threshold: 2
package-name: azure-ai-textanalytics
clear-output-folder: true
credential-scopes: https://cognitiveservices.azure.com/.default
no-namespace-folders: true
```

```yaml $(multiapi)
batch:
- tag: release_3_0
- tag: release_3_1_preview.2
- tag: release_3_2_preview.1
- multiapiscript: true
```

``` yaml $(multiapiscript)
output-folder: $(python-sdks-folder)/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics
default-api: v3_0
clear-output-folder: false
perform-load: false
```

### Tag: release_3_0
``` yaml $(tag) == 'release_3_0'
namespace: azure.ai.textanalytics.v3_0
output-folder: $(python-sdks-folder)/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/v3_0
```

### Tag: release_3_1_preview_1
``` yaml $(tag) == 'release_3_1_preview.1'
namespace: azure.ai.textanalytics.v3_1_preview_1
output-folder: $(python-sdks-folder)/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/v3_1_preview_1
```

### Tag: release_3_1_preview_2
``` yaml $(tag) == 'release_3_1_preview.2'
namespace: azure.ai.textanalytics.v3_1_preview_2
output-folder: $(python-sdks-folder)/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/v3_1_preview_2
```

### Tag: release_3_2_preview_1
``` yaml $(tag) == 'release_3_2_preview.1'
namespace: azure.ai.textanalytics.v3_2_preview_1
output-folder: $(python-sdks-folder)/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/v3_2_preview_1
```