-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Convert ResourceConnector swagger to Tsp #37141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Next Steps to Merge✅ All automated merging requirements have been met! To get your PR merged, see aka.ms/azsdk/specreview/merge.Comment generated by summarize-checks workflow run. |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews
|
specification/resourceconnector/ResourceConnector.Management/Appliance.tsp
Outdated
Show resolved
Hide resolved
1ab2300 to
84dd58a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the ResourceConnector service's swagger specification to TypeSpec format. The migration includes the conversion of the REST API definitions, models, and examples while maintaining functional equivalence with the original swagger specification.
Key changes in this migration:
- Complete conversion from swagger JSON to TypeSpec format with proper ARM template structure
- Restructured example files with improved formatting and additional metadata
- Updated API definitions with TypeSpec-specific annotations and decorators
Reviewed Changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
specification/resourceconnector/ResourceConnector.Management/main.tsp |
Main TypeSpec entry point defining the service, versioning, and namespace |
specification/resourceconnector/ResourceConnector.Management/models.tsp |
Core data models and type definitions converted from swagger schemas |
specification/resourceconnector/ResourceConnector.Management/Appliance.tsp |
Resource-specific operations and interfaces for Appliance resources |
specification/resourceconnector/ResourceConnector.Management/routes.tsp |
Additional route definitions for non-standard operations |
specification/resourceconnector/ResourceConnector.Management/back-compatible.tsp |
Client generation compatibility mappings |
specification/resourceconnector/ResourceConnector.Management/tspconfig.yaml |
TypeSpec configuration for code generation across multiple languages |
specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/appliances.json |
Updated swagger file generated from TypeSpec with improved structure |
| Multiple example files | Reformatted JSON examples with consistent property ordering and metadata |
specification/resourceconnector/ResourceConnector.Management/tspconfig.yaml
Outdated
Show resolved
Hide resolved
...urce-manager/Microsoft.ResourceConnector/ResourceConnector/stable/2022-10-27/appliances.json
Outdated
Show resolved
Hide resolved
8835e0e to
e14a2f7
Compare
…an/azure-rest-api-specs into Convert-ResourceConnector
…an/azure-rest-api-specs into Convert-ResourceConnector
* convert and compile * recompile * update * update * update * Delete package-lock.json * fix comment * update * format * update description and summary * delete * resolve breaking for js * Add client.tsp to mitigate TypeSpec migration breaks - fix SshKey -> SSHKey breaking change * Fix client.tsp imports and finalize TypeSpec migration break mitigation * client.tsp for java * merge * add config for python * Resolve conflicts * Resolve conflict * add flatten on parameter patchableAppliance * remove csharp config --------- Co-authored-by: Pan Shao <97225342+pshao25@users.noreply.github.com> Co-authored-by: Jiao Di (MSFT) <80496810+v-jiaodi@users.noreply.github.com> Co-authored-by: Weidong Xu <weidxu@microsoft.com> Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com> Co-authored-by: Tong Xu (MSFT) <v-xuto@microsoft.com>
This PR migrates your latest version (identified by the tag in your readme.md) of swagger to TypeSpec. We already tried our best to make sure the TypeSpec represents same as previous swagger. Since we lack the business knowledge, please validate this PR again to make sure it's functional equivalent as before. The local validation step is at Getting started | TypeSpec Azure
Besides, TypeSpec encourages to follow ARM guidelines. Therefore, some representations in your previous swagger will be fixed to follow these guidelines. When you see differences in your local validation, please keep this note in mind.
Please reach out to TypeSpec Discussions Channel if there is any help needed.
Existing problems:
There is an issue in the
patchableAppliancemodel where"x-ms-client-flatten": trueis added to the model itself rather than to the model properties. Currently, TypeSpec cannot handle this type of syntax.