Fix https://github.com/Azure/autorest/issues/4995
What still left is:
1. Multi path cases depend on TypeSpec design: "arm-apimanagement",
"arm-compute", "arm-machinelearningservices"
2. Expanded cases depend on TypeSpec design: "arm-dns"
3. Deal with directives: an example is arm-storage.
---------
Co-authored-by: Pan Shao <pashao@microsoft.com>
Upgrade tsp version of converter to 0.58
Uptake changes from
- https://github.com/Azure/typespec-azure/issues/709
1. For brownfield: add flag `arm-resource-flattening`, add
`@@flattenProperty` to properties if needed, direct use of
Azure.ResourceManager.XXXResource allows us not need
`x-ms-client-flatten` any more.
2. For greenfield: no flag `arm-resource-flattening`, no
`@@flattenProperty`
- https://github.com/Azure/typespec-azure/issues/862
Remove all the workaround for Azure.ResourceManager.XXXResource.
---------
Co-authored-by: Pan Shao <pashao@microsoft.com>
1. Fix https://github.com/Azure/autorest/issues/4963
2. Support "x-ms-identifiers"
3. Add #suppress
"@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state"
on the enum for provisioning.
1. Fix#4953
2. Change the logic of isFullCompatible to "only brownfield is full
compatible"
3. Add compiler server to vscode setting
4. Enable "arm-agrifood", "arm-sphere", "arm-test"
1. remove useless enum
2. refine example file name logic
3. add full support for check name availability
4. change body param name and doc
5. change to use `ArmResourceCreateOrReplaceAsync`
6. add url type support
7. add number precision support
8. fix default value bug
9. fix readonly and patch model split issues
10. change doc syntax
1. fix discriminator finding logic: previous exit logic for recursion is
wrong
2. refine TSP build-in model filtering logic: add all special models and
also add build-in namespace to models.tsp to resolve some compiling
error
3. fix number enum naming issue
4. change to always use custom patch
5. replace response model for normal operation to fix missing model ref
compiling error
6. fix enum default value compiling error
7. ~remove `@path` for resource key~
8. resolve operation id collision problem
9. fix multi-layer singleton resource with duplicate key issue
10. fix singleton resource base parameter calculation issue
11. refine operaion id logic and add example conversion
12. add basic global check name availability operation
13. fix enum doc missing issue
14. add lro header support
This PR represents the initial effort to integrate ARM (Azure Resource
Manager) support into the OpenAPI to TypeSpec plugin. Utilizing the
`@typespec/azure-resource-manager` library, we now generate TypeSpec
representations of Azure resources. A subsequent PR will address the
definition of Resource operations.
**Overview:**
1. **Consuming Resource Metadata (`resources.json`)**:
- Originates from C# codegen efforts, reusing their discovery and
metadata extraction processes.
- A parallel project is ongoing to enhance C# codegen, aiming to output
all necessary metadata for this feature.
- Currently, the metadata is read from a JSON file located at the
project root. Integration into the pipeline will be a focus of future
work.
2. **Per-Resource tsp File Generation**:
- Files generated will contain model declarations for both the Resources
and their subsequent operations.
- This is achieved using templates and decorators from
`@typespec/azure-resource-manager`.
3. **Reutilizing Data Plane Conversion Logic**:
- Efforts have been made to reuse existing components, including model
generation, decorator logic, interfaces, and more.
**Upcoming Work:**
- Inclusion of Resource operations within the Resource file, utilizing
templates from `@typespec/azure-resource-manager`.
- Removal of extraneous generated models.
- For ARM spec conversions, there won't be a need for the `routes.tsp`
file, as operations are defined alongside the resources. However, this
file remains relevant and necessary for data plane spec conversions.
---------
Co-authored-by: tadelesh <tadelesh.shi@live.cn>
Co-authored-by: Jose Manuel Heredia Hidalgo <mane.h@live.com>