From 7b7e57e7d05fd8802f653244afb04ec218e2b03f Mon Sep 17 00:00:00 2001 From: laramume <34291241+laramume@users.noreply.github.com> Date: Wed, 18 Mar 2020 14:43:00 -0400 Subject: [PATCH] create a new stable API v3.0 (#8621) * updated model names in preview version to be consistent with stable version to avoid breaking changes in client side code * changed swagger files * added new API's * [SRP] Add blob service property for container soft delete (#8498) * Adds 'Offline' state to provisioning states. (#8509) * Fix x-ms-enum name conflict (#8465) * [Deployment Scripts] Deployment scripts error model update (#8481) * add package-subscriptions-2019-11 (#8503) * regenerated all-api-versions * Added redis cache publisher schema for azure event grid. (#8486) * Added redis cache Event Schema to Event Grid DP Repo * removed commented section * [Hub Generated] Review request for Microsoft.Attestation to add version preview/2018-09-01-preview (#8478) * Include Tags in GetSubscription and Deployment APIs (#8268) * changes to get subscription * tags for deployments * fixes from another fork * added extension * Remove readonly flag from microsoftSessionAddress properties in BgpSession; add an example for IxRs directPeeringType (#8517) * add cli.md for databricks (#8521) * [DiskRP] Swagger changes for API version 2019-11-01 (#8195) * initial commit with the 2019-07-01 version first * adding the properties from the private sdk from version 2019-07-01 * adding diskIOPSReadOnly and diskMBpsReadOnly * adding 202 response code for PUT of a DiskEncryptionSet * adding exmaples * updating the example for creating a disk encryption set to include the 202 response and updating the readme * removing the 201 response code from DiskEncryptionSet creation * updating the descrptions for the EncryptionTypes * type is no longer required in the Encryption field for Disk Properties * changing the readme package and description for diskmbpsreadonly and diskiopsreadonly descriptions in disk.json * making diskMBpsReadWrite an int64 * updating the exmaples and disk.json to use the 2019-11-01 version * removing encryptionwithcustomerkey * adding galleryImageRef * supressing the camelCase rule for IOPS * fixing syntax errors in readme.md * changing the supression file to be disk.json rather than disks.json * adding properties to the supression paths * updating the from field in the supression * updating supression * moving supression to the top * suppressing the lint errors for IOPS * removing diskencryptionset changes * putting encryption type back in the disk encryption object but type is now optional * removing encryption set type * regenerated all-api-versions * Update improper descriptions of Data Share put calls (#8518) * Update DataShare.json * Update DataShare.json * replace resource-manager * regenerated all-api-versions * Make 2019-05-01 stable (#8491) * Examples and swagger for APIs related to managed server operations (#8243) * New examples and swagger for all APIs related to managed server operations * Run prittier check * Update ListManagedInstanceOperations.json * regenerated all-api-versions * rest-api-specs-scripts 0.6.2 breaking change fix (#8541) * Add case and incident tactics (#8288) * Added case tactics * Added incident tactics * Removing redundant comma from incident additional data * Changed tabs to spaces to better match format in file * Rename tactics field (alertTactics=>tactics) * Rename unknown classification to undetermined classification * Undo last commmit * update test for healthcareapis (#8543) * Azure Media Services 2020-02-01-preview update (#8538) * 2020-02-01-preview for Media Services LVA Changes to MediaGraph model Changing PUT from sync to async Fixing some description * Prettier and model validations fix * Fixing validations * Fixing version in Common.json * Using common types.json * Updating new version * Adding old version * Revert "Adding old version" This reverts commit 6bf3a735ca31f072a4a329f2fc156a9e1914fb1e. * Using common types * Using 200 for operation locatio header. * Fixing validation errors * Trying to fix autorest * Reverting common.js to test if that matters for autorest. * Reverting default operation result to test if that matters for autorest * Fixing previous revert. * Fixing after merge from upstream * Testing default operation result * Testing description * Adding common json back * Testing empty description * Testing no default for operation result * Removing common.json * Updating common.json of AMS * Updating common.json * Updating common.json * Updating common.json * Rename unknown classification to undetermined classification (#8436) * Fixing the structure of RESTProxy documentation: Updating the OperationId (#8327) * Updating the OperationId Updating the OperationId because the grouping of operations isn't correct. * Updating the operationId spelling * Making prettier fixes as outputed * update lint doc, add the missed rules doc R2029,R2007 (#8502) * Linter tool document update: add R4004, modify R2016 ,R3006 (#8417) * Linter tool document update: add R4004. * Update linter doc : modify R2016 ,R3006 * change date format * Update description of R2016 * 2020 01 01 updates to rules engine caching behavior (#8455) * 2020 01 01 updates to rules engine caching behavior * add new cache settings fields to CacheConfiguration * cache settings fields will enable Rules Engine to allow cache override actions * fix typos in examples * renamed privateLinkResourceId to privateLinkAlias * fix x-nullable usage * Change cacheDuration to "format":"duration" Co-authored-by: Moustafa Eid * add cli.md for postgresql (#8492) * add cli.md for postgresql * remove and update description * Added minimalTlsVersion property for Managed Instance endpoint, API version 2018-06-01-preview (#8508) * [SRP] Add blob service property for container soft delete (#8498) * Adds 'Offline' state to provisioning states. (#8509) * Fix x-ms-enum name conflict (#8465) * [Deployment Scripts] Deployment scripts error model update (#8481) * add package-subscriptions-2019-11 (#8503) * regenerated all-api-versions * Added redis cache publisher schema for azure event grid. (#8486) * Added redis cache Event Schema to Event Grid DP Repo * removed commented section * [Hub Generated] Review request for Microsoft.Attestation to add version preview/2018-09-01-preview (#8478) * Include Tags in GetSubscription and Deployment APIs (#8268) * changes to get subscription * tags for deployments * fixes from another fork * added extension * Remove readonly flag from microsoftSessionAddress properties in BgpSession; add an example for IxRs directPeeringType (#8517) * add cli.md for databricks (#8521) * Reverting to local Common.json to satisify autorest against md file. * Fixing prettier Co-authored-by: dosegal <51155368+dosegal@users.noreply.github.com> Co-authored-by: anushreeringne Co-authored-by: JianyeXi <59603451+jianyexi@users.noreply.github.com> Co-authored-by: aramesh-msft <59899320+aramesh-msft@users.noreply.github.com> Co-authored-by: Moustafa Eid Co-authored-by: Kerwin Co-authored-by: Andrija Cicovic <60783126+cicovica@users.noreply.github.com> Co-authored-by: Zhenfeng Co-authored-by: Akashdeep Goel Co-authored-by: Lei Ni <7233663+leni-msft@users.noreply.github.com> Co-authored-by: Filiz Topatan Co-authored-by: Jiashuo Li Co-authored-by: abebts2000 <54288923+abebts2000@users.noreply.github.com> Co-authored-by: gkostal Co-authored-by: ramoka178 <57157576+ramoka178@users.noreply.github.com> Co-authored-by: Praneeth Sanapathi * async operation status for privatelink scopes - JEDI urgent (#8344) * async operation status * privatelinkscope operation * Delete operationStatuses.json * Update privateLinkScopes_API.json * Update privateLinkScopes_API.json * Update privateLinkScopes_API.json * MSI: Use common types. Fix definitions for proper .NET SDK generation. (#8352) * Use common types. Fix definitions for proper .NET SDK generation. * Use tracked and proxy resource types * Revert reference of IdentityPatch to Identity resource * Revert the previous revert * New Put API for updating vault security config (#8292) * Adding Swagger details for Put BackupResourceVaultConfigs call Adding Swagger details for Put BackupResourceVaultConfigs call * Setting feature state as Enabled * Fixing duplicate OperationId for new Put API * Adding default response Co-authored-by: gcs06 * Fix type conversion issue of property Version for ManagementPartner API (#8276) * Fix type conversion issue of property Version * fix model validation * Update code * add cli.md for msi and fix location parameter (#8520) * Add DELETE API to Microsoft.Security applicationWhitelistings (#8368) * adding DELETE API to applicationWhitelistings * adding NotFound to the response * fix whitespace * add 404 to example * changed 404 to 204 when group not found / already deleted * added 202 Accepted when performing delete in the background * [DeploymentScripts] Updated readme file to account for python sdk (#8525) * Added python deployment scripts package reference * update python sdk references * [BillingRP] Adding additional fields to Invoicing and Agreement APIs (#8418) * Added missing fields and corrected enum values as per actual implementation * Removing unsupported LineOfCredit API Removing unsupported LineOfCredit API * Delete IncreaseLineOfCreditBySubscription.json * Adding additional fields to Invoicing APIs Adding additional fields to Invoicing APIs * Adding additional feilds to Agreements Adding additional feilds to Agreements * Update billing.json * Updated descriptions * Upodated the agreement category enum * Updated description as per review comments. * Correcting typo * Updated the category enum values * Updated enum names * Updated * Added "isMonthlyInvoice" * Updated description for IsMonthlyInvoice Updated description for IsMonthlyInvoice * Fixed the build error * Updated with review comments * in64 -> int64 (#8547) * Add acr tasks (build) and scopemap specs to latest package tag (#8527) * regenerated all-api-versions * Compute update python readme (#8554) * updated readmes for python sdk * additional change * Minor fix to LTR on MI example (#8559) * Fix set LTR policy example * Add resource group based LTR APIs * fix examples * Fix MI LTR example * Fix example * another minor fix * Reconcile ManagedDatabaseRestoreDetails swagger specs (#8560) * fixing type in example * More fixes for LTR MI example * making fixes for restore details changes * adding ProxyResource reference' * update api version in example file * Adding nested "properties":{ "properties": { for ARM template. (#8480) * Individual enrollments updates (#8563) * Individual enrollments updates * fixing swagger * Making small tweaks * Removed solution model in example * Prettier check * Made suggested changes * Missing bracket * Adding names to x-ms-enums * [Hub Generated] Review request for Microsoft.Batch to add version stable/2020-03-01.11.0 (#8546) * Initial commit (copying old API version) * Update data plane * regenerated all-api-versions * Adding metadata path to the Azure Monitor data plane swagger files (#8504) * AppInsights * OperationalInsights * typo * typos * Fix most validation issues * Fix prettier issues * Revert changes to existing operation IDs - ignore validation warnings * Update description (#8454) * Pipeline tool script version upgrade (#8570) * Upgrade tools script version. Upgraded the OAV version. * [Hub Generated] Review request for Microsoft.Insights to add version stable/2018-03-01 (#7920) * fix(metricAlert_API): add missing properties to web test metric alert * docs(metricAlert_API): change properties description * fix(metricAlert_API): remove templateType from webtest metric alert rules * fix(metricAlert_API): change subscription description * fix(metricAlert_API): prettier checks * fix(): lint warnings * fix(): lint warnings * fix(): run prettier * fix(metricAlert_API): add 'None' option to AggregationType enum in order to be align with 2018-01-01 metricDefintions_API.json * fix(metricAlert_API): align AggregationType enum with metricDefinitions * fix(): revert changes to un-brack ARM api * fix(): change webTestId description * fix(): add none to timeAggregation enum for compatbility * fix(): remove type: string and none value from timeAggregation enum * [IoTCentral] change error details definition (#8395) * breaking-change 0.6.5 (#8569) * [DeploymentScripts] Add tail query string (#8539) * Update swagger for missing properties * Revert "Update swagger for missing properties" This reverts commit dc743305eb62f7c7c93f86713f8f0128461dccb9. * Add tail query string to log route * Add example and update description * Update description one more time * Fix tail type in the example * add cli.md for storage (#8577) * add cli.md for storage * update testcase * Adding Expand to Bookmark (#8238) * Supporting linked storage accounts new api for operationalinsights. (#8568) * Supporting linked storage accounts api. * Linked storage accounts examples. * Update examples api version. * Get all linked storage accounts api will point to the correct example. * Updating linked storage accounts list by workspace example. * next link should be equal to null, more constraints on enum types. * cspell/prettier fixes. * Correcting enum values in examples. * Enum value mistmatch fix. * Swagger updates to introduce cosmos-db api version 2020-03-01, and add PublicNetworkAccess property (#8474) * Created 2020-01-03 cosmosdb version with new PublicNetworkAccess database account property * Updated readme.md * Changed version number to 2020-03-01 * Added default response for DatabaseAccountGetResults * Fixed json for DatabaseAccountGetResults * Removing default response from DatabaseAccountGetResults * Added 404 to DatabaseAccounts_Get * Updated CosmosDBDatabaseAccountGet.json with 404 example * regenerated all-api-versions * Add RuleSetId to managed rule set definitions api (read only field) (#8382) * added warnings * [SRP] Add blob service property for container soft delete (#8498) * Adds 'Offline' state to provisioning states. (#8509) * Fix x-ms-enum name conflict (#8465) * [Deployment Scripts] Deployment scripts error model update (#8481) * add package-subscriptions-2019-11 (#8503) * regenerated all-api-versions * Added redis cache publisher schema for azure event grid. (#8486) * Added redis cache Event Schema to Event Grid DP Repo * removed commented section * [Hub Generated] Review request for Microsoft.Attestation to add version preview/2018-09-01-preview (#8478) * Include Tags in GetSubscription and Deployment APIs (#8268) * changes to get subscription * tags for deployments * fixes from another fork * added extension * Remove readonly flag from microsoftSessionAddress properties in BgpSession; add an example for IxRs directPeeringType (#8517) * add cli.md for databricks (#8521) * [DiskRP] Swagger changes for API version 2019-11-01 (#8195) * initial commit with the 2019-07-01 version first * adding the properties from the private sdk from version 2019-07-01 * adding diskIOPSReadOnly and diskMBpsReadOnly * adding 202 response code for PUT of a DiskEncryptionSet * adding exmaples * updating the example for creating a disk encryption set to include the 202 response and updating the readme * removing the 201 response code from DiskEncryptionSet creation * updating the descrptions for the EncryptionTypes * type is no longer required in the Encryption field for Disk Properties * changing the readme package and description for diskmbpsreadonly and diskiopsreadonly descriptions in disk.json * making diskMBpsReadWrite an int64 * updating the exmaples and disk.json to use the 2019-11-01 version * removing encryptionwithcustomerkey * adding galleryImageRef * supressing the camelCase rule for IOPS * fixing syntax errors in readme.md * changing the supression file to be disk.json rather than disks.json * adding properties to the supression paths * updating the from field in the supression * updating supression * moving supression to the top * suppressing the lint errors for IOPS * removing diskencryptionset changes * putting encryption type back in the disk encryption object but type is now optional * removing encryption set type * regenerated all-api-versions * Update improper descriptions of Data Share put calls (#8518) * Update DataShare.json * Update DataShare.json * replace resource-manager * regenerated all-api-versions * Make 2019-05-01 stable (#8491) * Examples and swagger for APIs related to managed server operations (#8243) * New examples and swagger for all APIs related to managed server operations * Run prittier check * Update ListManagedInstanceOperations.json * regenerated all-api-versions * rest-api-specs-scripts 0.6.2 breaking change fix (#8541) * Add case and incident tactics (#8288) * Added case tactics * Added incident tactics * Removing redundant comma from incident additional data * Changed tabs to spaces to better match format in file * Rename tactics field (alertTactics=>tactics) * Rename unknown classification to undetermined classification * Undo last commmit * update test for healthcareapis (#8543) * Azure Media Services 2020-02-01-preview update (#8538) * 2020-02-01-preview for Media Services LVA Changes to MediaGraph model Changing PUT from sync to async Fixing some description * Prettier and model validations fix * Fixing validations * Fixing version in Common.json * Using common types.json * Updating new version * Adding old version * Revert "Adding old version" This reverts commit 6bf3a735ca31f072a4a329f2fc156a9e1914fb1e. * Using common types * Using 200 for operation locatio header. * Fixing validation errors * Trying to fix autorest * Reverting common.js to test if that matters for autorest. * Reverting default operation result to test if that matters for autorest * Fixing previous revert. * Fixing after merge from upstream * Testing default operation result * Testing description * Adding common json back * Testing empty description * Testing no default for operation result * Removing common.json * Updating common.json of AMS * Updating common.json * Updating common.json * Updating common.json * Rename unknown classification to undetermined classification (#8436) * Fixing the structure of RESTProxy documentation: Updating the OperationId (#8327) * Updating the OperationId Updating the OperationId because the grouping of operations isn't correct. * Updating the operationId spelling * Making prettier fixes as outputed * update lint doc, add the missed rules doc R2029,R2007 (#8502) * Linter tool document update: add R4004, modify R2016 ,R3006 (#8417) * Linter tool document update: add R4004. * Update linter doc : modify R2016 ,R3006 * change date format * Update description of R2016 * 2020 01 01 updates to rules engine caching behavior (#8455) * 2020 01 01 updates to rules engine caching behavior * add new cache settings fields to CacheConfiguration * cache settings fields will enable Rules Engine to allow cache override actions * fix typos in examples * renamed privateLinkResourceId to privateLinkAlias * fix x-nullable usage * Change cacheDuration to "format":"duration" Co-authored-by: Moustafa Eid * add cli.md for postgresql (#8492) * add cli.md for postgresql * remove and update description * Added minimalTlsVersion property for Managed Instance endpoint, API version 2018-06-01-preview (#8508) * [SRP] Add blob service property for container soft delete (#8498) * Adds 'Offline' state to provisioning states. (#8509) * Fix x-ms-enum name conflict (#8465) * [Deployment Scripts] Deployment scripts error model update (#8481) * add package-subscriptions-2019-11 (#8503) * regenerated all-api-versions * Added redis cache publisher schema for azure event grid. (#8486) * Added redis cache Event Schema to Event Grid DP Repo * removed commented section * [Hub Generated] Review request for Microsoft.Attestation to add version preview/2018-09-01-preview (#8478) * Include Tags in GetSubscription and Deployment APIs (#8268) * changes to get subscription * tags for deployments * fixes from another fork * added extension * Remove readonly flag from microsoftSessionAddress properties in BgpSession; add an example for IxRs directPeeringType (#8517) * add cli.md for databricks (#8521) * Reverting to local Common.json to satisify autorest against md file. * Fixing prettier Co-authored-by: dosegal <51155368+dosegal@users.noreply.github.com> Co-authored-by: anushreeringne Co-authored-by: JianyeXi <59603451+jianyexi@users.noreply.github.com> Co-authored-by: aramesh-msft <59899320+aramesh-msft@users.noreply.github.com> Co-authored-by: Moustafa Eid Co-authored-by: Kerwin Co-authored-by: Andrija Cicovic <60783126+cicovica@users.noreply.github.com> Co-authored-by: Zhenfeng Co-authored-by: Akashdeep Goel Co-authored-by: Lei Ni <7233663+leni-msft@users.noreply.github.com> Co-authored-by: Filiz Topatan Co-authored-by: Jiashuo Li Co-authored-by: abebts2000 <54288923+abebts2000@users.noreply.github.com> Co-authored-by: gkostal Co-authored-by: ramoka178 <57157576+ramoka178@users.noreply.github.com> Co-authored-by: Praneeth Sanapathi * async operation status for privatelink scopes - JEDI urgent (#8344) * async operation status * privatelinkscope operation * Delete operationStatuses.json * Update privateLinkScopes_API.json * Update privateLinkScopes_API.json * Update privateLinkScopes_API.json * MSI: Use common types. Fix definitions for proper .NET SDK generation. (#8352) * Use common types. Fix definitions for proper .NET SDK generation. * Use tracked and proxy resource types * Revert reference of IdentityPatch to Identity resource * Revert the previous revert * New Put API for updating vault security config (#8292) * Adding Swagger details for Put BackupResourceVaultConfigs call Adding Swagger details for Put BackupResourceVaultConfigs call * Setting feature state as Enabled * Fixing duplicate OperationId for new Put API * Adding default response Co-authored-by: gcs06 * Fix type conversion issue of property Version for ManagementPartner API (#8276) * Fix type conversion issue of property Version * fix model validation * Update code * add cli.md for msi and fix location parameter (#8520) * Add DELETE API to Microsoft.Security applicationWhitelistings (#8368) * adding DELETE API to applicationWhitelistings * adding NotFound to the response * fix whitespace * add 404 to example * changed 404 to 204 when group not found / already deleted * added 202 Accepted when performing delete in the background * [DeploymentScripts] Updated readme file to account for python sdk (#8525) * Added python deployment scripts package reference * update python sdk references * [BillingRP] Adding additional fields to Invoicing and Agreement APIs (#8418) * Added missing fields and corrected enum values as per actual implementation * Removing unsupported LineOfCredit API Removing unsupported LineOfCredit API * Delete IncreaseLineOfCreditBySubscription.json * Adding additional fields to Invoicing APIs Adding additional fields to Invoicing APIs * Adding additional feilds to Agreements Adding additional feilds to Agreements * Update billing.json * Updated descriptions * Upodated the agreement category enum * Updated description as per review comments. * Correcting typo * Updated the category enum values * Updated enum names * Updated * Added "isMonthlyInvoice" * Updated description for IsMonthlyInvoice Updated description for IsMonthlyInvoice * Fixed the build error * Updated with review comments * in64 -> int64 (#8547) * Add acr tasks (build) and scopemap specs to latest package tag (#8527) * regenerated all-api-versions * Compute update python readme (#8554) * updated readmes for python sdk * additional change * Minor fix to LTR on MI example (#8559) * Fix set LTR policy example * Add resource group based LTR APIs * fix examples * Fix MI LTR example * Fix example * another minor fix * Reconcile ManagedDatabaseRestoreDetails swagger specs (#8560) * fixing type in example * More fixes for LTR MI example * making fixes for restore details changes * adding ProxyResource reference' * update api version in example file * Adding nested "properties":{ "properties": { for ARM template. (#8480) * Individual enrollments updates (#8563) * Individual enrollments updates * fixing swagger * Making small tweaks * Removed solution model in example * Prettier check * Made suggested changes * Missing bracket * Adding names to x-ms-enums * [Hub Generated] Review request for Microsoft.Batch to add version stable/2020-03-01.11.0 (#8546) * Initial commit (copying old API version) * Update data plane * regenerated all-api-versions * Adding metadata path to the Azure Monitor data plane swagger files (#8504) * AppInsights * OperationalInsights * typo * typos * Fix most validation issues * Fix prettier issues * Revert changes to existing operation IDs - ignore validation warnings * Update description (#8454) * Pipeline tool script version upgrade (#8570) * Upgrade tools script version. Upgraded the OAV version. * [Hub Generated] Review request for Microsoft.Insights to add version stable/2018-03-01 (#7920) * fix(metricAlert_API): add missing properties to web test metric alert * docs(metricAlert_API): change properties description * fix(metricAlert_API): remove templateType from webtest metric alert rules * fix(metricAlert_API): change subscription description * fix(metricAlert_API): prettier checks * fix(): lint warnings * fix(): lint warnings * fix(): run prettier * fix(metricAlert_API): add 'None' option to AggregationType enum in order to be align with 2018-01-01 metricDefintions_API.json * fix(metricAlert_API): align AggregationType enum with metricDefinitions * fix(): revert changes to un-brack ARM api * fix(): change webTestId description * fix(): add none to timeAggregation enum for compatbility * fix(): remove type: string and none value from timeAggregation enum * [IoTCentral] change error details definition (#8395) * breaking-change 0.6.5 (#8569) * [DeploymentScripts] Add tail query string (#8539) * Update swagger for missing properties * Revert "Update swagger for missing properties" This reverts commit dc743305eb62f7c7c93f86713f8f0128461dccb9. * Add tail query string to log route * Add example and update description * Update description one more time * Fix tail type in the example * add cli.md for storage (#8577) * add cli.md for storage * update testcase * Adding Expand to Bookmark (#8238) * Supporting linked storage accounts new api for operationalinsights. (#8568) * Supporting linked storage accounts api. * Linked storage accounts examples. * Update examples api version. * Get all linked storage accounts api will point to the correct example. * Updating linked storage accounts list by workspace example. * next link should be equal to null, more constraints on enum types. * cspell/prettier fixes. * Correcting enum values in examples. * Enum value mistmatch fix. * Swagger updates to introduce cosmos-db api version 2020-03-01, and add PublicNetworkAccess property (#8474) * Created 2020-01-03 cosmosdb version with new PublicNetworkAccess database account property * Updated readme.md * Changed version number to 2020-03-01 * Added default response for DatabaseAccountGetResults * Fixed json for DatabaseAccountGetResults * Removing default response from DatabaseAccountGetResults * Added 404 to DatabaseAccounts_Get * Updated CosmosDBDatabaseAccountGet.json with 404 example * regenerated all-api-versions * Add RuleSetId to managed rule set definitions api (read only field) (#8382) * Adding ABSA Swagger json * adding description * Updated the warnings for sentiment response * Updated Warnings to new contract * made changes * made changes * made changes * add new stable API v3.0 * add new stable API v3.0 * add new stable API v3.0 * add new stable API v3.0 * updated score to confidence score * resolved PR comments * Resolved review comments * Resolved review comments * changed score to confidencescore in LD * Revert changes in batch * fix build errors * fix build errors * fix build errors * fix build errors * fix build errors * fix build errors * fix build errors * fix build errors * removed pii ednpoint from v3.0 Co-authored-by: Zhenfeng Co-authored-by: Akashdeep Goel Co-authored-by: Lei Ni <7233663+leni-msft@users.noreply.github.com> Co-authored-by: Filiz Topatan Co-authored-by: Jiashuo Li Co-authored-by: azuresdkci Co-authored-by: abebts2000 <54288923+abebts2000@users.noreply.github.com> Co-authored-by: gkostal Co-authored-by: ramoka178 <57157576+ramoka178@users.noreply.github.com> Co-authored-by: Praneeth Sanapathi Co-authored-by: Kerwin Co-authored-by: Joshua Pollock Co-authored-by: dadihe <37852257+dadihe@users.noreply.github.com> Co-authored-by: Arcturus Co-authored-by: toki95 <35834415+toki95@users.noreply.github.com> Co-authored-by: Ruoxuan Wang <52271048+ruowan@users.noreply.github.com> Co-authored-by: dosiso <60354892+dosiso@users.noreply.github.com> Co-authored-by: Risong Na Co-authored-by: dosegal <51155368+dosegal@users.noreply.github.com> Co-authored-by: anushreeringne Co-authored-by: JianyeXi <59603451+jianyexi@users.noreply.github.com> Co-authored-by: aramesh-msft <59899320+aramesh-msft@users.noreply.github.com> Co-authored-by: Moustafa Eid Co-authored-by: Andrija Cicovic <60783126+cicovica@users.noreply.github.com> Co-authored-by: Arik Olsh <47111029+arolshan@users.noreply.github.com> Co-authored-by: angosms <56409202+angosms@users.noreply.github.com> Co-authored-by: chandrasekarendran <59728024+chandrasekarendran@users.noreply.github.com> Co-authored-by: gcs06 Co-authored-by: Neil Ye Co-authored-by: erelh Co-authored-by: Jorge Cotillo Co-authored-by: Anirban Sarkar <33848291+asarkar84@users.noreply.github.com> Co-authored-by: iscai-msft <43154838+iscai-msft@users.noreply.github.com> Co-authored-by: Tosin Adewale Co-authored-by: Zim Kalinowski Co-authored-by: pixia Co-authored-by: xaliciayang <59986952+xaliciayang@users.noreply.github.com> Co-authored-by: Rahul Singh <53578268+rahuls-microsoft@users.noreply.github.com> Co-authored-by: Vivian Liu Co-authored-by: Matthew Christopher Co-authored-by: Alon Gafni Co-authored-by: Ray Chen Co-authored-by: Adi biton Co-authored-by: Teng Lu Co-authored-by: zhzhao8888 <43188418+zhzhao8888@users.noreply.github.com> Co-authored-by: Dudi Likvornik Co-authored-by: ayanMSFT <53790657+ayanMSFT@users.noreply.github.com> Co-authored-by: Eric Schwabe Co-authored-by: tarun Co-authored-by: josuh --- .../data-plane/TextAnalytics/readme.md | 13 +- .../stable/v3.0/TextAnalytics.json | 1130 +++++++++++++++++ .../examples/SuccessfulEntitiesRequest.json | 91 ++ .../SuccessfulEntityLinkingRequest.json | 99 ++ .../examples/SuccessfulKeyPhrasesRequest.json | 60 + .../examples/SuccessfulLanguagesRequest.json | 67 + .../examples/SuccessfulSentimentRequest.json | 127 ++ 7 files changed, 1582 insertions(+), 5 deletions(-) create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/TextAnalytics.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntitiesRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntityLinkingRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulKeyPhrasesRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulLanguagesRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulSentimentRequest.json diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/readme.md b/specification/cognitiveservices/data-plane/TextAnalytics/readme.md index 38804b2bd5b5..47d9515d8a01 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/readme.md +++ b/specification/cognitiveservices/data-plane/TextAnalytics/readme.md @@ -128,7 +128,6 @@ These settings apply only when `--tag=release_2_0` is specified on the command l ``` yaml $(tag) == 'release_2_0' input-file: stable/v2.0/TextAnalytics.json -log-file: logs/log.txt ``` ### Release 2.1 @@ -137,7 +136,6 @@ These settings apply only when `--tag=release_2_1` is specified on the command l ``` yaml $(tag) == 'release_2_1' input-file: stable/v2.1/TextAnalytics.json -log-file: logs/log.txt ``` ### Release 2.1-Preview @@ -146,7 +144,6 @@ These settings apply only when `--tag=release_2_1_preview` is specified on the c ``` yaml $(tag) == 'release_2_1_preview' input-file: preview/v2.1/TextAnalytics.json -log-file: logs/log.txt ``` ### Release 3.0-Preview.1 @@ -155,7 +152,14 @@ These settings apply only when `--tag=release_3_0_preview.1` is specified on the ``` yaml $(tag) == 'release_3_0_preview.1' input-file: preview/v3.0-preview.1/TextAnalytics.json -log-file: logs/log.txt +``` + +### Release 3.0 + +These settings apply only when `--tag=release_3_0` is specified on the command line. + +``` yaml $(tag) == 'release_3_0' +input-file: stable/v3.0/TextAnalytics.json ``` ### Release 3.1-Preview.1 @@ -164,7 +168,6 @@ These settings apply only when `--tag=release_3_1_preview.1` is specified on the ``` yaml $(tag) == 'release_3_1_preview.1' input-file: preview/v3.1-preview.1/TextAnalytics.json -log-file: logs/log.txt ``` ## Swagger to SDK diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/TextAnalytics.json new file mode 100644 index 000000000000..6a5ac3d74066 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/TextAnalytics.json @@ -0,0 +1,1130 @@ +{ + "swagger": "2.0", + "info": { + "version": "v3.0", + "contact": { + "name": "Microsoft Cognitive Services", + "url": "https://azure.microsoft.com/en-us/services/cognitive-services/text-analytics/", + "email": "mlapi@microsoft.com" + }, + "title": "Text Analytics Client", + "description": "The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. No training data is needed to use this API; just bring your text data. This API uses advanced natural language processing techniques to deliver best in class predictions. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview" + }, + "securityDefinitions": { + "apim_key": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "security": [ + { + "apim_key": [] + } + ], + "x-ms-parameterized-host": { + "hostTemplate": "{Endpoint}/text/analytics/v3.0", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/Endpoint" + } + ] + }, + "paths": { + "/entities/recognition/general": { + "post": { + "summary": "Named Entity Recognition", + "description": "The API returns a list of general named entities in a given document. For the list of supported entity types, check Supported Entity Types in Text Analytics API. See the Supported languages in Text Analytics API for the list of enabled languages.", + "operationId": "EntitiesRecognitionGeneral", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "name": "model-version", + "in": "query", + "description": "(Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. ", + "required": false, + "type": "string" + }, + { + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain input and document level statistics.", + "type": "boolean", + "required": false + }, + { + "in": "body", + "name": "input", + "description": "Collection of documents to analyze.", + "required": true, + "schema": { + "$ref": "#/definitions/MultiLanguageBatchInput" + } + } + ], + "responses": { + "200": { + "description": "A successful call results in a list of recognized entities returned for each valid document.", + "schema": { + "$ref": "#/definitions/EntitiesResult" + } + }, + "default": { + "description": "Error Response", + "schema": { + "$ref": "#/definitions/TextAnalyticsError" + } + } + }, + "x-ms-examples": { + "Successful Entities request": { + "$ref": ".//examples//SuccessfulEntitiesRequest.json" + } + }, + "deprecated": false + } + }, + "/entities/linking": { + "post": { + "summary": "Linked entities from a well-known knowledge base", + "description": "The API returns a list of recognized entities with links to a well-known knowledge base. See the Supported languages in Text Analytics API for the list of enabled languages.", + "operationId": "EntitiesLinking", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "name": "model-version", + "in": "query", + "description": "(Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. ", + "type": "string" + }, + { + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain input and document level statistics.", + "type": "boolean" + }, + { + "in": "body", + "name": "input", + "description": "Collection of documents to analyze.", + "required": true, + "schema": { + "$ref": "#/definitions/MultiLanguageBatchInput" + } + } + ], + "responses": { + "200": { + "description": "A successful call results in a list of recognized entities with links to a well-known knowledge base returned for each valid document", + "schema": { + "$ref": "#/definitions/EntityLinkingResult" + } + }, + "default": { + "description": "Error Response", + "schema": { + "$ref": "#/definitions/TextAnalyticsError" + } + } + }, + "x-ms-examples": { + "Successful Entity Linking request": { + "$ref": ".//examples//SuccessfulEntityLinkingRequest.json" + } + }, + "deprecated": false + } + }, + "/keyPhrases": { + "post": { + "summary": "Key Phrases", + "description": "The API returns a list of strings denoting the key phrases in the input text. See the Supported languages in Text Analytics API for the list of enabled languages.", + "operationId": "KeyPhrases", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "name": "model-version", + "in": "query", + "description": "(Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. ", + "type": "string" + }, + { + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain input and document level statistics.", + "type": "boolean" + }, + { + "in": "body", + "name": "input", + "description": "Collection of documents to analyze. Documents can now contain a language field to indicate the text language", + "required": true, + "schema": { + "$ref": "#/definitions/MultiLanguageBatchInput" + } + } + ], + "responses": { + "200": { + "description": "A successful response results in 0 or more key phrases identified in each valid document", + "schema": { + "$ref": "#/definitions/KeyPhraseResult" + } + }, + "default": { + "description": "Error Response", + "schema": { + "$ref": "#/definitions/TextAnalyticsError" + } + } + }, + "x-ms-examples": { + "Successful Key Phrase request": { + "$ref": ".//examples//SuccessfulKeyPhrasesRequest.json" + } + }, + "deprecated": false + } + }, + "/languages": { + "post": { + "summary": "Detect Language", + "description": "The API returns the detected language and a numeric score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. See the Supported languages in Text Analytics API for the list of enabled languages.", + "operationId": "Languages", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "name": "model-version", + "in": "query", + "description": "(Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. ", + "type": "string" + }, + { + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain input and document level statistics.", + "type": "boolean" + }, + { + "in": "body", + "name": "input", + "description": "Collection of documents to analyze.", + "required": true, + "schema": { + "$ref": "#/definitions/LanguageBatchInput" + } + } + ], + "responses": { + "200": { + "description": "A successful call results in the detected language with the highest probability for each valid document", + "schema": { + "$ref": "#/definitions/LanguageResult" + } + }, + "default": { + "description": "Error Response", + "schema": { + "$ref": "#/definitions/TextAnalyticsError" + } + } + }, + "x-ms-examples": { + "Successful Detect Language request": { + "$ref": ".//examples//SuccessfulLanguagesRequest.json" + } + }, + "deprecated": false + } + }, + "/sentiment": { + "post": { + "summary": "Sentiment", + "description": "The API returns a sentiment prediction, as well as sentiment scores for each sentiment class (Positive, Negative, and Neutral) for the document and each sentence within it. See the Supported languages in Text Analytics API for the list of enabled languages.", + "operationId": "Sentiment", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "name": "model-version", + "in": "query", + "description": "(Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. ", + "type": "string" + }, + { + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain input and document level statistics.", + "type": "boolean" + }, + { + "in": "body", + "name": "input", + "description": "Collection of documents to analyze.", + "required": true, + "schema": { + "$ref": "#/definitions/MultiLanguageBatchInput" + } + } + ], + "responses": { + "200": { + "description": "A successful call results in a document sentiment prediction, as well as sentiment scores for each sentiment class (Positive, Negative, and Neutral)", + "schema": { + "$ref": "#/definitions/SentimentResponse" + } + }, + "default": { + "description": "Error Response", + "schema": { + "$ref": "#/definitions/TextAnalyticsError" + } + } + }, + "x-ms-examples": { + "Successful Sentiment request": { + "$ref": ".//examples//SuccessfulSentimentRequest.json" + } + }, + "deprecated": false + } + } + }, + "definitions": { + "MultiLanguageBatchInput": { + "type": "object", + "required": [ + "documents" + ], + "properties": { + "documents": { + "type": "array", + "description": "The set of documents to process as part of this batch.", + "items": { + "$ref": "#/definitions/MultiLanguageInput" + } + } + }, + "description": "Contains a set of input documents to be analyzed by the service." + }, + "MultiLanguageInput": { + "type": "object", + "required": [ + "id", + "text" + ], + "properties": { + "id": { + "type": "string", + "description": "A unique, non-empty document identifier." + }, + "text": { + "type": "string", + "description": "The input text to process." + }, + "language": { + "type": "string", + "description": "(Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use \"en\" for English; \"es\" for Spanish etc. If not set, use \"en\" for English as default." + } + }, + "description": "Contains an input document to be analyzed by the service." + }, + "DocumentError": { + "type": "object", + "required": [ + "id", + "error" + ], + "properties": { + "id": { + "type": "string", + "description": "Document Id." + }, + "error": { + "type": "object", + "description": "Document Error.", + "$ref": "#/definitions/TextAnalyticsError" + } + } + }, + "TextAnalyticsError": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "invalidRequest", + "invalidArgument", + "internalServerError", + "serviceUnavailable" + ], + "x-ms-enum": { + "name": "ErrorCodeValue", + "modelAsString": false + }, + "description": "Error code." + }, + "message": { + "type": "string", + "description": "Error message." + }, + "target": { + "type": "string", + "description": "Error target." + }, + "innererror": { + "$ref": "#/definitions/InnerError", + "description": "Inner error contains more specific information." + }, + "details": { + "type": "array", + "description": "Details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/TextAnalyticsError" + } + } + } + }, + "TextAnalyticsWarning": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "LongWordsInDocument", + "DocumentTruncated" + ], + "x-ms-enum": { + "name": "WarningCodeValue", + "modelAsString": false + }, + "description": "Error code." + }, + "message": { + "type": "string", + "description": "Warning message." + }, + "targetRef": { + "type": "string", + "description": "A JSON pointer reference indicating the target object." + } + } + }, + "InnerError": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "invalidParameterValue", + "invalidRequestBodyFormat", + "emptyRequest", + "missingInputRecords", + "invalidDocument", + "modelVersionIncorrect", + "invalidDocumentBatch", + "unsupportedLanguageCode", + "invalidCountryHint" + ], + "x-ms-enum": { + "name": "InnerErrorCodeValue", + "modelAsString": false + }, + "description": "Error code." + }, + "message": { + "type": "string", + "description": "Error message." + }, + "details": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Error details." + }, + "target": { + "type": "string", + "description": "Error target." + }, + "innererror": { + "$ref": "#/definitions/InnerError", + "description": "Inner error contains more specific information." + } + } + }, + "SentimentResponse": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Sentiment analysis per document.", + "items": { + "$ref": "#/definitions/DocumentSentiment" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + } + } + }, + "DocumentSentiment": { + "type": "object", + "required": [ + "id", + "sentiment", + "confidenceScores", + "sentences", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "sentiment": { + "type": "string", + "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).", + "enum": [ + "positive", + "neutral", + "negative", + "mixed" + ], + "x-ms-enum": { + "name": "DocumentSentimentValue", + "modelAsString": false + } + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics" + }, + "confidenceScores": { + "description": "Document level sentiment confidence scores between 0 and 1 for each sentiment class.", + "$ref": "#/definitions/SentimentConfidenceScorePerLabel" + }, + "sentences": { + "type": "array", + "description": "Sentence level sentiment analysis.", + "items": { + "$ref": "#/definitions/SentenceSentiment" + } + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsWarning" + } + } + } + }, + "RequestStatistics": { + "type": "object", + "required": [ + "documentsCount", + "validDocumentsCount", + "erroneousDocumentsCount", + "transactionsCount" + ], + "properties": { + "documentsCount": { + "type": "integer", + "format": "int32", + "description": "Number of documents submitted in the request." + }, + "validDocumentsCount": { + "type": "integer", + "format": "int32", + "description": "Number of valid documents. This excludes empty, over-size limit or non-supported languages documents." + }, + "erroneousDocumentsCount": { + "type": "integer", + "format": "int32", + "description": "Number of invalid documents. This includes empty, over-size limit or non-supported languages documents." + }, + "transactionsCount": { + "type": "integer", + "format": "int64", + "description": "Number of transactions for the request." + } + }, + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "DocumentStatistics": { + "type": "object", + "required": [ + "charactersCount", + "transactionsCount" + ], + "properties": { + "charactersCount": { + "type": "integer", + "format": "int32", + "description": "Number of text elements recognized in the document." + }, + "transactionsCount": { + "type": "integer", + "format": "int32", + "description": "Number of transactions for the document." + } + }, + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "SentimentConfidenceScorePerLabel": { + "type": "object", + "required": [ + "positive", + "neutral", + "negative" + ], + "properties": { + "positive": { + "type": "number", + "format": "double" + }, + "neutral": { + "type": "number", + "format": "double" + }, + "negative": { + "type": "number", + "format": "double" + } + }, + "description": "Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative." + }, + "SentenceSentiment": { + "type": "object", + "required": [ + "sentiment", + "confidenceScores", + "offset", + "length" + ], + "properties": { + "text": { + "type": "string", + "description": "The sentence text." + }, + "sentiment": { + "type": "string", + "description": "The predicted Sentiment for the sentence.", + "enum": [ + "positive", + "neutral", + "negative" + ], + "x-ms-enum": { + "name": "SentenceSentimentValue", + "modelAsString": false + } + }, + "confidenceScores": { + "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes.", + "$ref": "#/definitions/SentimentConfidenceScorePerLabel" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The sentence offset from the start of the document." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the sentence by Unicode standard." + } + } + }, + "EntitiesResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentEntities" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + } + } + }, + "DocumentEntities": { + "type": "object", + "required": [ + "id", + "entities", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "entities": { + "type": "array", + "description": "Recognized entities in the document.", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsWarning" + } + }, + "statistics": { + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref": "#/definitions/DocumentStatistics" + } + } + }, + "Entity": { + "type": "object", + "required": [ + "text", + "category", + "offset", + "length", + "confidenceScore" + ], + "properties": { + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "category": { + "type": "string", + "description": "Entity type, such as Person/Location/Org/SSN etc" + }, + "subcategory": { + "type": "string", + "description": "Entity sub type, such as Age/Year/TimeRange etc" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position (in Unicode characters) for the entity text." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length (in Unicode characters) for the entity text." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted entity." + } + } + }, + "EntityLinkingResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentLinkedEntities" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + } + } + }, + "DocumentLinkedEntities": { + "type": "object", + "required": [ + "id", + "entities", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "entities": { + "type": "array", + "description": "Recognized well-known entities in the document.", + "items": { + "$ref": "#/definitions/LinkedEntity" + } + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsWarning" + } + }, + "statistics": { + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref": "#/definitions/DocumentStatistics" + } + } + }, + "LinkedEntity": { + "type": "object", + "required": [ + "name", + "matches", + "language", + "url", + "dataSource" + ], + "properties": { + "name": { + "type": "string", + "description": "Entity Linking formal name." + }, + "matches": { + "type": "array", + "description": "List of instances this entity appears in the text.", + "items": { + "$ref": "#/definitions/Match" + } + }, + "language": { + "type": "string", + "description": "Language used in the data source." + }, + "id": { + "type": "string", + "description": "Unique identifier of the recognized entity from the data source." + }, + "url": { + "type": "string", + "description": "URL for the entity's page from the data source." + }, + "dataSource": { + "type": "string", + "description": "Data source used to extract entity linking, such as Wiki/Bing etc." + } + } + }, + "Match": { + "type": "object", + "required": [ + "confidenceScore", + "text", + "offset", + "length" + ], + "properties": { + "confidenceScore": { + "type": "number", + "format": "double", + "description": "If a well-known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned." + }, + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position (in Unicode characters) for the entity match text." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length (in Unicode characters) for the entity match text." + } + } + }, + "KeyPhraseResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentKeyPhrases" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + } + } + }, + "DocumentKeyPhrases": { + "type": "object", + "required": [ + "id", + "keyPhrases", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "keyPhrases": { + "type": "array", + "description": "A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document.", + "items": { + "type": "string" + } + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsWarning" + } + }, + "statistics": { + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref": "#/definitions/DocumentStatistics" + } + } + }, + "LanguageBatchInput": { + "type": "object", + "required": [ + "documents" + ], + "properties": { + "documents": { + "type": "array", + "items": { + "$ref": "#/definitions/LanguageInput" + } + } + } + }, + "LanguageInput": { + "type": "object", + "required": [ + "id", + "text" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "text": { + "type": "string" + }, + "countryHint": { + "type": "string" + } + } + }, + "LanguageResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentLanguage" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + } + } + }, + "DocumentLanguage": { + "type": "object", + "required": [ + "id", + "detectedLanguages", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "detectedLanguages": { + "type": "array", + "description": "A list of extracted languages.", + "items": { + "$ref": "#/definitions/DetectedLanguage" + } + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsWarning" + } + }, + "statistics": { + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref": "#/definitions/DocumentStatistics" + } + } + }, + "DetectedLanguage": { + "type": "object", + "required": [ + "name", + "iso6391Name", + "confidenceScore" + ], + "properties": { + "name": { + "type": "string", + "description": "Long name of a detected language (e.g. English, French)." + }, + "iso6391Name": { + "type": "string", + "description": "A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr)." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true." + } + } + } + }, + "parameters": { + "Endpoint": { + "name": "Endpoint", + "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).", + "x-ms-parameter-location": "client", + "required": true, + "type": "string", + "in": "path", + "x-ms-skip-url-encoding": true + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntitiesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntitiesRequest.json new file mode 100644 index 000000000000..4217d33a1c61 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntitiesRequest.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "language": "en", + "id": "1", + "text": "I had a wonderful trip to Seattle last week." + }, + { + "language": "en", + "id": "2", + "text": "I work at Microsoft." + }, + { + "language": "en", + "id": "3", + "text": "I visited Space Needle 2 times." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "id": "1", + "entities": [ + { + "text": "Seattle", + "category": "Location", + "offset": 26, + "length": 7, + "confidenceScore": 0.80 + }, + { + "text": "last week", + "category": "DateTime", + "subcategory": "DateRange", + "offset": 34, + "length": 9, + "confidenceScore": 0.8 + } + ], + "warnings": [] + }, + { + "id": "2", + "entities": [ + { + "text": "Microsoft", + "category": "Organization", + "offset": 10, + "length": 9, + "confidenceScore": 0.99 + } + ], + "warnings": [] + }, + { + "id": "3", + "entities": [ + { + "text": "Space Needle", + "category": "Organization", + "offset": 10, + "length": 12, + "confidenceScore": 0.75 + }, + { + "text": "2", + "category": "Quantity", + "subcategory": "Number", + "offset": 23, + "length": 1, + "confidenceScore": 0.8 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntityLinkingRequest.json new file mode 100644 index 000000000000..ecb5818e578a --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntityLinkingRequest.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "language": "en", + "id": "1", + "text": "I had a wonderful trip to Seattle last week." + }, + { + "language": "en", + "id": "2", + "text": "I work at Microsoft." + }, + { + "language": "en", + "id": "3", + "text": "I visited Space Needle 2 times." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "id": "1", + "entities": [ + { + "name": "Seattle", + "matches": [ + { + "text": "Seattle", + "offset": 26, + "length": 7, + "confidenceScore": 0.15 + } + ], + "language": "en", + "id": "Seattle", + "url": "https://en.wikipedia.org/wiki/Seattle", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + }, + { + "id": "2", + "entities": [ + { + "name": "Microsoft", + "matches": [ + { + "text": "Microsoft", + "offset": 10, + "length": 9, + "confidenceScore": 0.18 + } + ], + "language": "en", + "id": "Microsoft", + "url": "https://en.wikipedia.org/wiki/Microsoft", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + }, + { + "id": "3", + "entities": [ + { + "name": "Space Needle", + "matches": [ + { + "text": "Space Needle", + "offset": 10, + "length": 12, + "confidenceScore": 0.15 + } + ], + "language": "en", + "id": "Space Needle", + "url": "https://en.wikipedia.org/wiki/Space_Needle", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulKeyPhrasesRequest.json new file mode 100644 index 000000000000..77ea9c553b0e --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulKeyPhrasesRequest.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "language": "en", + "id": "1", + "text": "Hello world. This is some input text that I love." + }, + { + "language": "fr", + "id": "2", + "text": "Bonjour tout le monde" + }, + { + "language": "es", + "id": "3", + "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "id": "1", + "keyPhrases": [ + "world", + "input text" + ], + "warnings": [] + }, + { + "id": "2", + "keyPhrases": [ + "monde" + ], + "warnings": [] + }, + { + "id": "3", + "keyPhrases": [ + "carretera", + "tráfico", + "día" + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulLanguagesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulLanguagesRequest.json new file mode 100644 index 000000000000..109e2c90de57 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulLanguagesRequest.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "countryHint": "US", + "id": "1", + "text": "Hello world" + }, + { + "id": "2", + "text": "Bonjour tout le monde" + }, + { + "id": "3", + "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "id": "1", + "detectedLanguages": [ + { + "name": "English", + "iso6391Name": "en", + "confidenceScore": 1 + } + ], + "warnings": [] + }, + { + "id": "2", + "detectedLanguages": [ + { + "name": "French", + "iso6391Name": "fr", + "confidenceScore": 1 + } + ], + "warnings": [] + }, + { + "id": "3", + "detectedLanguages": [ + { + "name": "Spanish", + "iso6391Name": "es", + "confidenceScore": 1 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulSentimentRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulSentimentRequest.json new file mode 100644 index 000000000000..680392d80510 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulSentimentRequest.json @@ -0,0 +1,127 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "language": "en", + "id": "1", + "text": "Hello world. This is some input text that I love." + }, + { + "language": "en", + "id": "2", + "text": "It's incredibly sunny outside! I'm so happy." + }, + { + "language": "en", + "id": "3", + "text": "Pike place market is my favorite Seattle attraction." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "id": "1", + "sentiment": "positive", + "confidenceScores": { + "positive": 0.98, + "neutral": 0.01, + "negative": 0.01 + }, + "sentences": [ + { + "text": "Hello world.", + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.07, + "neutral": 0.91, + "negative": 0.02 + }, + "offset": 0, + "length": 12 + }, + { + "text": "This is some input text that I love.", + "sentiment": "positive", + "confidenceScores": { + "positive": 0.98, + "neutral": 0.01, + "negative": 0.01 + }, + "offset": 13, + "length": 36 + } + ], + "warnings": [] + }, + { + "id": "2", + "sentiment": "positive", + "confidenceScores": { + "positive": 0.98, + "neutral": 0.01, + "negative": 0.01 + }, + "sentences": [ + { + "text": "It's incredibly sunny outside!", + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.04, + "neutral": 0.93, + "negative": 0.03 + }, + "offset": 0, + "length": 30 + }, + { + "text": "I'm so happy.", + "sentiment": "positive", + "confidenceScores": { + "positive": 0.98, + "neutral": 0.01, + "negative": 0.01 + }, + "offset": 31, + "length": 13 + } + ], + "warnings": [] + }, + { + "id": "3", + "sentiment": "positive", + "confidenceScores": { + "positive": 0.98, + "neutral": 0.01, + "negative": 0.01 + }, + "sentences": [ + { + "text": "Pike place market is my favorite Seattle attraction.", + "sentiment": "positive", + "confidenceScores": { + "positive": 0.98, + "neutral": 0.01, + "negative": 0.01 + }, + "offset": 0, + "length": 52 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + } +}