Skip to content

Tables tsp spec migration#39915

Merged
lmazuel merged 28 commits intomainfrom
tables-tsp-migration
Feb 24, 2026
Merged

Tables tsp spec migration#39915
lmazuel merged 28 commits intomainfrom
tables-tsp-migration

Conversation

@annatisch
Copy link
Copy Markdown
Member

Data Plane API Specification Update Pull Request

Tip

Overwhelmed by all this guidance? See the Getting help section at the bottom of this PR description.

PR review workflow diagram

Please understand this diagram before proceeding. It explains how to get your PR approved & merged.

spec_pr_review_workflow_diagram

API Info: The Basics

Most of the information about your service should be captured in the issue that serves as your API Spec engagement record.

  • Link to API Spec engagement record issue:

Is this review for (select one):

  • a private preview
  • a public preview
  • GA release

Change Scope

This section will help us focus on the specific parts of your API that are new or have been modified.
Please share a link to the design document for the new APIs, a link to the previous API Spec document (if applicable), and the root paths that have been updated.

  • Design Document:
  • Previous API Spec Doc:
  • Updated paths:

Viewing API changes

For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.

Suppressing failures

If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
Swagger-Suppression-Process
to get approval.

Release planner

A release plan should have been created. If not, please create one as it will help guide you through the REST API and SDK creation process.

❔Got questions? Need additional info?? We are here to help!

Contact us!

The Azure API Review Board is dedicated to helping you create amazing APIs. You can read about our mission and learn more about our process on our wiki.

Click here for links to tools, specs, guidelines & other good stuff

Tooling

Guidelines & Specifications

Helpful Links

Getting help

  • First, please carefully read through this PR description, from top to bottom.
  • If you don't have permissions to remove or add labels to the PR, request write access per aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories
  • To understand what you must do next to merge this PR, see the Next Steps to Merge comment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.
  • For guidance on fixing this PR CI check failures, see the hyperlinks provided in given failure
    and https://aka.ms/ci-fix.
  • If the PR CI checks appear to be stuck in queued state, please add a comment with contents /azp run.
    This should result in a new comment denoting a PR validation pipeline has started and the checks should be updated after few minutes.
  • If the help provided by the previous points is not enough, post to https://aka.ms/azsdk/support/specreview-channel and link to this PR.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 26, 2026

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ This PR targets either the main branch of the public specs repo or the RPSaaSMaster branch of the private specs repo. These branches are not intended for iterative development. Therefore, you must acknowledge you understand that after this PR is merged, the APIs are considered shipped to Azure customers. Any further attempts at in-place modifications to the APIs will be subject to Azure's versioning and breaking change policies. Additionally, for control plane APIs, you must acknowledge that you are following all the best practices documented by ARM at aka.ms/armapibestpractices. If you do intend to release the APIs to your customers by merging this PR, add the PublishToCustomers label to your PR in acknowledgement of the above. Otherwise, retarget this PR onto a feature branch, i.e. with prefix release- (see aka.ms/azsdk/api-versions#release--branches).
  • ❌ This PR has at least one breaking change (label: BreakingChangeReviewRequired).
    To unblock this PR, follow the process at aka.ms/brch.
  • ❌ The required check named Swagger ModelValidation has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it and consult the aka.ms/ci-fix guide


Comment generated by summarize-checks workflow run.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 26, 2026

API Change Check

APIView identified API level changes in this PR and created the following API reviews

Language API Review for Package
TypeSpec Data.Tables
Python azure-data-tables
Swagger Tables-Tables

@github-actions github-actions bot added the VersioningReviewRequired <valid label in PR review process>add this label when versioning review is required label Jan 26, 2026
@github-actions github-actions bot added BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required and removed VersioningReviewRequired <valid label in PR review process>add this label when versioning review is required labels Jan 27, 2026
@annatisch
Copy link
Copy Markdown
Member Author

annatisch commented Feb 8, 2026

Summary of breaking changes

1003 - RequestBodyFormatNoLongerSupported (6 errors)

In the original swagger spec - 6 operations were incorrectly documented as using "application/json;odata=nometadata" for the request body. According to the REST API specs below, these should always have been "application/json".

1004 - ResponseBodyFormatNowSupported (6 errors)

While the success response body default format is "application/json;odata=minimalmetadata", the response body "application/json" should also be supported in the following 6 operations as the format of the error response.

  • paths['/Tables'].get
  • paths['/Tables'].post
  • paths['/{table}()'].get
  • paths['/{table}'].post
  • paths['/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')'].get
  • paths['/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')'].delete

1005 - RemovedPath (2 errors)

The following paths have been respecified as follows:

  • paths['/?ServiceProperties'] -> paths['?restype=service&comp=properties']
  • paths['/?ServiceStats'] -> paths['?restype=service&comp=stats']

1006 - RemovedDefinition (1 error)

The TableEntityProperties model is now defined as an alias of Record<unknown>

1010 - AddingRequiredParameter (4 errors)

The "Accept" header was being stripped from requests with no success response body (e.g. status 204), so needed to be explicitly added as otherwise XML error response bodies may be returned for JSON requests, which can cause problems for code generators. This was added to the following 6 operations (only 4 of which show up as breaking changes):

  • paths['/Tables('{table}')'].delete
  • paths['/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')'].put
  • paths['/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')'].patch
  • paths['/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')'].delete
  • paths['{table}?comp=acl'].put
  • paths['?restype=service&comp=properties'].put

1011 - AddingResponseCode (1 error)

The original swagger spec was missing the "default" error response for paths['/Tables'].get

1014 - RemovingHeader (2 errors)

I'm not sure why we're getting these errors, one for each success response code for paths['/{table}'].post:

1016 - ConstantStatusHasChanged (9 errors)

This is because the previous swagger spec defined the API version header as a constant, which is no longer the case now that it uses the @apiVersion decorator. This change applied to every operation, however this error has only been raised for the 9 JSON operations (and ignored for the 5 XML operations).

1017 - ReferenceRedirection (118 errors)

This seems to be expected for a tsp migration - I have just ignored all these errors.

1023 - TypeFormatChanged (48 errors)

These all fall under one of the following 3 changes:

  • "The new version has a different format 'uuid' than the previous one ''."
    The tsp declares both the "x-ms-client-request-id" and "x-ms-request-id" as uuid, as opposed to the original spec which left them as unformatted string. This can be reverted if preferred.
  • "The new version has a different format 'date-time-rfc7231' than the previous one 'date-time-rfc1123'."
    The "Date" header now uses the subformat "rfc7231" as "rfc1123" isn't support by tsp.
  • "The new version has a different format 'int32' than the previous one ''."
    The previous spec definition of the "Timeout" parameter had the type as "integer" but never defined the format as "int32".

1026 - TypeChanged (8 errors)

  • "The new version has a different type '' than the previous one 'object'." - There are 6 instances of this error and it appears to be related to the change from TableEntityProperties being a model with additionalProperties=true to an alias for Record<unknown>. The newly generated spec uses additionalProperties={} instead.
  • "The new version has a different type 'object' than the previous one ''." - The original spec definition of "Metrics" was missing the type: "object" declaration, which has been added.
  • The new version has a different type 'object' than the previous one 'array'. This is because the correct way to declare an XML array that is unwrapped to a tagged element is to declare it as a model with the array as an internal attribute using @xml.unwrapped.

1033 - RemovedProperty (28 errors)

These are all renames to using tsp naming conventions, while maintaining compatibility using the @xml.name decorator:

  • TableServiceProperties.Logging -> logging
  • TableServiceProperties.HourMetrics -> hourMetrics
  • TableServiceProperties.MinuteMetrics -> minuteMetrics
  • TableServiceProperties.Cors -> cors
  • Logging.Version -> Logging.version
  • Logging.Delete -> Logging.delete
  • Logging.Read -> Logging.read
  • Logging.Write -> Logging.write
  • Logging.RetentionPolicy -> Logging.retentionPolicy
  • Metrics.Version -> version
  • Metrics.Enabled -> Metrics.enabled
  • Metrics.IncludeAPIs -> includeApis
  • Metrics.RetentionPolicy -> retentionPolicy
  • RetentionPolicy.Enabled -> RetentionPolicy.enabled
  • RetentionPolicy.Days -> days
  • AccessPolicy.Start -> AccessPolicy.start
  • AccessPolicy.Expiry -> AccessPolicy.expiry
  • AccessPolicy.Permission -> AccessPolicy.permission
  • CorsRule.AllowedOrigins -> CorsRule.allowedOrigins
  • CorsRule.AllowedMethods -> CorsRule.allowedMethods
  • CorsRule.AllowedHeaders -> CorsRule.allowedHeaders
  • CorsRule.ExposedHeaders -> CorsRule.exposedHeaders
  • CorsRule.MaxAgeInSeconds -> CorsRule.maxAgeInSeconds
  • StorageServiceStats.GeoReplication
  • GeoReplication.Status -> GeoReplication.status
  • GeoReplication.LastSyncTime -> GeoReplication.lastSyncTime
  • SignedIdentifier.Id -> SignedIdentifier.id
  • SignedIdentifier.AccessPolicy -> SignedIdentifier.accessPolicy

1034 - AddedRequiredProperty (28 errors)

These are all renames to using tsp naming conventions, while maintaining compatibility using the @xml.name decorator:

  • Logging.Version -> Logging.version
  • Logging.Delete -> Logging.delete
  • Logging.Read -> Logging.read
  • Logging.Write -> Logging.write
  • Logging.RetentionPolicy -> Logging.retentionPolicy
  • Metrics.Enabled -> Metrics.enabled
  • RetentionPolicy.Enabled -> RetentionPolicy.enabled
  • AccessPolicy.Start -> AccessPolicy.start
  • AccessPolicy.Expiry -> AccessPolicy.expiry
  • AccessPolicy.Permission -> AccessPolicy.permission
  • CorsRule.AllowedOrigins -> CorsRule.allowedOrigins
  • CorsRule.AllowedMethods -> CorsRule.allowedMethods
  • CorsRule.AllowedHeaders -> CorsRule.allowedHeaders
  • CorsRule.ExposedHeaders -> CorsRule.exposedHeaders
  • CorsRule.MaxAgeInSeconds -> CorsRule.maxAgeInSeconds
  • StorageServiceStats.GeoReplication
  • GeoReplication.Status -> GeoReplication.status
  • GeoReplication.LastSyncTime -> GeoReplication.lastSyncTime
  • SignedIdentifier.Id -> SignedIdentifier.id
  • SignedIdentifier.AccessPolicy -> SignedIdentifier.accessPolicy

1035 - RemovedOperation (2 errors)

The following paths have been respecified as follows:

  • paths['/{table}'].get -> paths['/{table}?comp=acl'].get
  • paths['/{table}'].put -> paths['/{table}?comp=acl'].put

1038 - AddedPath (5 errors)

The following paths have been respecified as follows:

  • paths['/?ServiceProperties'].get -> paths['?restype=service&comp=properties'].get
  • paths['/?ServiceProperties'].put -> paths['?restype=service&comp=properties'].put
  • paths['/?ServiceStats'].get -> paths['?restype=service&comp=stats'].get
  • paths['/{table}'].get -> paths['/{table}?comp=acl'].get
  • paths['/{table}'].put -> paths['/{table}?comp=acl'].put

1042 - ChangedParameterOrder (61 errors)

None of the parameters in the Tables API are order-sensitive, and this is an expected error in the tsp migration. All of these have been ignored.

1045 - AddedOptionalProperty (8 errors)

These are all renames to using tsp naming conventions, while maintaining compatibility using the @xml.name decorator:

  • TableServiceProperties.Logging -> logging
  • TableServiceProperties.HourMetrics -> hourMetrics
  • TableServiceProperties.MinuteMetrics -> minuteMetrics
  • TableServiceProperties.Cors -> cors
  • Metrics.Version -> version
  • Metrics.IncludeAPIs -> includeApis
  • Metrics.RetentionPolicy -> retentionPolicy
  • RetentionPolicy.Days -> days

1046 - RemovedOptionalParameter (3 errors)

This appears to have been a bug in the previous swagger spec - as according to the REST API spec, the following 3 operations should never have support the $format query parameter:

1049 - RemovedXmsEnum (9 errors)

This is because the previous swagger spec defined the API version header as a constant, which is no longer the case now that it uses the @apiVersion decorator. This change applied to every operation, however this error has only been raised for the 9 JSON operations (and ignored for the 5 XML operations).

1050 - ParameterLocationHasChanged (9 errors)

This is expected when moving from the previous API version header to using the @apiVersion decorator.
This change applied to every operation, however this error has only been raised for the 9 JSON operations (and ignored for the 5 XML operations).

@annatisch annatisch changed the title Tables draft tsp spec Tables tsp spec migration Feb 9, 2026
@annatisch annatisch marked this pull request as ready for review February 9, 2026 04:27
@annatisch annatisch requested a review from pjohari-ms as a code owner February 9, 2026 04:27
Copy link
Copy Markdown
Member

@catalinaperalta catalinaperalta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tsp is looking very good...just a few comments/questions

Comment thread specification/cosmos-db/data-plane/Tables/client.tsp
Comment thread specification/cosmos-db/data-plane/Tables/tspconfig.yaml Outdated
Comment thread specification/cosmos-db/data-plane/Tables/models.tsp Outdated
Comment thread specification/cosmos-db/data-plane/Tables/models.tsp Outdated
Comment thread specification/cosmos-db/data-plane/Tables/routes.tsp Outdated
Comment thread specification/cosmos-db/data-plane/Tables/routes.tsp
Comment thread specification/cosmos-db/data-plane/Tables/routes.tsp
Comment thread specification/cosmos-db/data-plane/Tables/routes.tsp
annatisch and others added 7 commits February 24, 2026 16:27
Co-authored-by: catalinaperalta <9859037+catalinaperalta@users.noreply.github.com>
Updated TableEntityProperties to use EntityValueType union. Removed ClientRequestIdHeader and RequestIdResponseHeader definitions.
Updated TableEntityProperties to use Record<unknown> and removed EntityValueType union.
@lmazuel lmazuel merged commit 2ad30de into main Feb 24, 2026
33 of 40 checks passed
@lmazuel lmazuel deleted the tables-tsp-migration branch February 24, 2026 23:32
nandakishores pushed a commit to nandakishores/azure-rest-api-specs that referenced this pull request Feb 26, 2026
* Tables draft tsp spec

* preview -> stable

* Fix config paths

* Start customizations

* Started separate clients

* Some client restructuring

* Client formatting

* Fix config

* Fix some warnings

* Recompiled

* Fix breaking changes 1

* Fix breaking changes 2

* Fix breaking changes 3

* Removed extra paging tags

* Some cleanup

* Added explicit Accept headers

* Re-order

* Recompile

* Update specification/cosmos-db/data-plane/Tables/tspconfig.yaml

Co-authored-by: catalinaperalta <9859037+catalinaperalta@users.noreply.github.com>

* Refactor table entity properties and remove headers

Updated TableEntityProperties to use EntityValueType union. Removed ClientRequestIdHeader and RequestIdResponseHeader definitions.

* Refactor TablesXmlOperation parameters structure

* Recompile

* Refactor TableEntityProperties and remove EntityValueType

Updated TableEntityProperties to use Record<unknown> and removed EntityValueType union.

* Recompile

---------

Co-authored-by: catalinaperalta <9859037+catalinaperalta@users.noreply.github.com>
markcowl pushed a commit to markcowl/azure-rest-api-specs that referenced this pull request Apr 7, 2026
* Tables draft tsp spec

* preview -> stable

* Fix config paths

* Start customizations

* Started separate clients

* Some client restructuring

* Client formatting

* Fix config

* Fix some warnings

* Recompiled

* Fix breaking changes 1

* Fix breaking changes 2

* Fix breaking changes 3

* Removed extra paging tags

* Some cleanup

* Added explicit Accept headers

* Re-order

* Recompile

* Update specification/cosmos-db/data-plane/Tables/tspconfig.yaml

Co-authored-by: catalinaperalta <9859037+catalinaperalta@users.noreply.github.com>

* Refactor table entity properties and remove headers

Updated TableEntityProperties to use EntityValueType union. Removed ClientRequestIdHeader and RequestIdResponseHeader definitions.

* Refactor TablesXmlOperation parameters structure

* Recompile

* Refactor TableEntityProperties and remove EntityValueType

Updated TableEntityProperties to use Record<unknown> and removed EntityValueType union.

* Recompile

---------

Co-authored-by: catalinaperalta <9859037+catalinaperalta@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required Cosmos data-plane TypeSpec Authored with TypeSpec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants