diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.1/TextAnalytics.json index 48a031ea725b..c0c4342dee75 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.1/TextAnalytics.json @@ -824,18 +824,6 @@ } } }, - "TextAnalyticsTask": { - "type": "object", - "required": [ - "enable" - ], - "properties": { - "enable": { - "default": false, - "type": "boolean" - } - } - }, "TextAnalyticsWarning": { "type": "object", "required": [ @@ -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", @@ -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": { @@ -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": [ @@ -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", diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/readme.md b/specification/cognitiveservices/data-plane/TextAnalytics/readme.md index 4a04a0204ce7..e94713144337 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/readme.md +++ b/specification/cognitiveservices/data-plane/TextAnalytics/readme.md @@ -132,33 +132,8 @@ csharp: ``` ## Python - -These settings apply only when `--python` is specified on the command line. -Please also specify `--python-sdks-folder=`. -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 @@ -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 ``` \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/readme.python.md b/specification/cognitiveservices/data-plane/TextAnalytics/readme.python.md new file mode 100644 index 000000000000..4a63a1d1c41b --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/readme.python.md @@ -0,0 +1,55 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. +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 +``` \ No newline at end of file