Azure / typespec-azure

About TypeSpec Azure Libraries
https://azure.github.io/typespec-azure/
MIT License
11 stars 37 forks source link

[Se] Investigate feasibility of maintaining data ordering in OpenAPI→TypeSpec→OpenAPI process #1521

Open mario-guerra opened 2 weeks ago

mario-guerra commented 2 weeks ago

Context

The TypeSpec team has a plan for converting existing Azure services to TypeSpec. The process involves manual refinement of TypeSpec files (TSPs), validation through human reviews, and various work items assigned to different teams for approval and automation. The primary goal is to ensure that the converted TypeSpec generates an OpenAPI specification functionally equivalent to the original, maintaining round-trip correctness.

Description

The TypeSpec team needs to investigate whether it is feasible to maintain the ordering of data during the conversion process from OpenAPI to TypeSpec and back to OpenAPI. Maintaining data order can make it easier for reviewers to validate the conversion and ensure round-trip correctness. This investigation will help determine if maintaining data order can reduce the burden on reviewers and improve the overall conversion process.

allenjzhang commented 4 days ago

We have introduced sorting capability to tsp-client and placed as the first step of conversion. In addition, many brownfield services have multiple json files which need to be combined as well. Trying to maintaining order back and forth as suggested is not only complex but no necessary.