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>
* set autorest.powershell v4 as default version loaded by autorest
* Add change description for @autorest/configuration
---------
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
* Support Any schema
* improvements
* Improvements in Enum translation
* Changelog
* Format and remove broken link
* fixfix lint
* Correctly case model, enum and property names
* Address comments
* Remove cadl-python from dependencies
Can't see what purpose this would have since the tool is all typescript. This dependency makes it impossible to use the plugin without Python installed. It should be unnecessary.
* Changelog.
* Api version
* Changelog
* Use parameter.in when available
* Set path for ServiceParameter
* Fix format
* Use x-name
* Set name from swagger
* Fix formatting
* Fix duplicate api-version parameter
* Use uri instead of path
* Make apiVersion param true
* Update autorest.typescript links
* Try regression testing on node 18
* Remove Node18 testing
Co-authored-by: Jose Manuel Heredia Hidalgo <joheredi@microsoft.com>
Co-authored-by: David Wilson <daviwil@microsoft.com>
* Make Go v4 code generator the default
Use v2 only when --legacy is specified.
* add changelog
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>