Граф коммитов

339 Коммитов

Автор SHA1 Сообщение Дата
Chenjie Shi 1a40a3af06
migrate @projectedName to @encodedName (#4885)
resolve: #4884
2024-02-22 15:05:44 +08:00
Chenjie Shi 81026f1b0d
add features for conversion (#4871)
1. support new flatten decorator and add `client.tsp`: fix
https://github.com/Azure/autorest/issues/4850
2. fix doc comment escape issue: fix #4876
3. support new location resource expression: fix:
https://github.com/Azure/autorest/issues/4880
2024-02-09 08:33:44 +08:00
Chenjie Shi 1579900a2a
Add feature to converter (#4868)
1. support flatten
2. support custom resource, fix #4861 
3. fix doc multi-line issue
4. fix naming escape issue
5. fix duration default value problem
2024-02-01 21:46:31 +08:00
Jose Manuel Heredia Hidalgo 4e0feaf308
Update tspconfig for data-plane (#4869)
Update data-plane tspconfig to comply with the azure-rest-spec repo
requirements

fixes #4787 4787
2024-01-25 08:51:29 -08:00
Jose Manuel Heredia Hidalgo 27490ae88b
Use Auth shcemes (#4863)
Fixes #4791

---------

Co-authored-by: Jose Manuel Heredia Hidalgo <mane.h@live.com>
2024-01-23 09:42:15 -08:00
Chenjie Shi 9b0ed9587a
Add feature and fix bug for converter (#4860)
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
2024-01-19 08:19:53 +00:00
Chenjie Shi a4ebf162cf
Converter issue fix (#4851)
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
2024-01-11 09:48:50 +00:00
Jose Manuel Heredia Hidalgo faf5c11682
Initial Support for ARM in OpenAPI to TypeSpec Conversion (#4777)
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>
2023-12-22 11:13:41 +08:00
Timothee Guerin fe71a68f5f
Publish auto release (#4797)
Co-authored-by: Microsoft Auto Changeset Bot <autochangesetbot@microsoft.com>
2023-11-16 16:53:19 +00:00
Xiaogang 980e2f5110
set autorest.powershell v4 as default version loaded by autorest (#4793)
* set autorest.powershell v4 as default version loaded by autorest

* Add change description for @autorest/configuration

---------

Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
2023-11-16 04:38:16 +00:00
Timothee Guerin a71ba5b314
Remove test matrix for out of support node version(14, 16) and update dependencies (#4794) 2023-11-15 19:48:35 -08:00
Timothee Guerin e8d9758562
Prepare release July 31st 2023 (#4765) 2023-07-31 08:25:27 -07:00
Mike Kistler 7d0ed2741a
Fix final state schema external ref (#4763)
* Add test for final-state-schema with external ref

* Fix for final-state-schema with external ref

* Rename test to fix test hangs
2023-07-27 14:39:37 -07:00
Timothee Guerin 4448624e1a
Bump version for publish (#4743) 2023-05-26 16:00:47 -07:00
Jose Manuel Heredia Hidalgo 0354d7f713
[OpenAPI to TypeSpec] - Support primitive types as array elements (#4738) 2023-05-26 08:35:06 -07:00
Timothee Guerin 07c2b97397
Bump version for publish (#4742) 2023-05-26 07:14:52 -07:00
Timothee Guerin dca9fe86e7
Format rfc7231 map to rfc1123 (#4741) 2023-05-26 07:12:15 -07:00
Mike Kistler 40378f12e5
Update final-state-schema references in merger (#4736) 2023-05-16 08:30:49 -07:00
Mike Kistler 73f476d113
Bypass autocorrect to type: object in some cases (#4731) 2023-05-02 08:38:07 -07:00
Timothee Guerin 42cc4e7493
Release April 2023 (#4728) 2023-04-12 21:57:57 -07:00
Timothee Guerin 9d2be9abe0
Fix: Issue with discriminator mapping not working across files (#4724) 2023-03-29 10:11:32 -07:00
Timothee Guerin a5d2727e15
Fix conflicting suppressions (#4725) 2023-03-28 09:48:13 -07:00
Timothee Guerin f1e3be9399
Fix circular ref issue with multipart? (#4722) 2023-03-24 08:36:25 -07:00
Jose Manuel Heredia Hidalgo f37ff23fd3
Update to typespec (#4720)
* Update to typespec

* fix tsproject

* Update decorators

* update changelog

* Update

* Address comments
2023-03-14 11:02:32 -07:00
Jose Manuel Heredia Hidalgo ed6068aa7b
[Openapi to Cadl] Enum improvements (#4715)
* 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
2023-02-24 13:04:37 -08:00
Jose Manuel Heredia Hidalgo 13dc23ccfb
[Openapi-to-cadl] Fix output-folder issue (#4702)
* Use autorest writeFile

* Fix format

* Update changelog
2023-02-03 16:50:00 -08:00
Travis Prescott d5d71d89ac
[openAPI-to-cadl] Remove cadl-python from dependencies (#4691)
* 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.
2023-01-09 11:53:53 -08:00
Timothee Guerin 8a04b75fda
Prepare publish Dec 2022 (#4687) 2023-01-04 08:10:57 -08:00
Timothee Guerin cb3c65372c
Fix: Emitted artifact from csharp on windows use `\` which result in transform not running (#4683)
* Normalize paths

* Changelog
2022-12-06 18:23:42 -08:00
Jose Manuel Heredia Hidalgo ec0d56e12e
Add @projectedName and update service version (#4679) 2022-11-23 08:26:31 -08:00
Jose Manuel Heredia Hidalgo bbfe8867d1
Add default plugin for Openapi2Cadl (#4678)
* Add default plugin

* Update default config

* Update changelog
2022-11-22 14:05:26 -08:00
Mike Kistler f415b62c4c
Support final-state-schema LRO option (#4647) 2022-11-22 09:11:11 -08:00
Timothee Guerin d1880938e3
Ignore unknown refs kinds (#4675) 2022-11-21 17:31:28 +00:00
Timothee Guerin f5aebc28a7
Missing some package updates (#4677) 2022-11-19 01:29:17 +00:00
Jose Manuel Heredia Hidalgo 90437047e9
Merge openapi to cadl plugin (#4664) 2022-11-18 16:48:35 -08:00
Timothee Guerin 391dc5ca05
General pacakges updates (#4676) 2022-11-18 23:37:24 +00:00
Timothee Guerin 54d4190bfc
Remove `--model-validator` plugin referencing oav (#4673) 2022-11-18 11:18:35 -08:00
David Wilson 017efcbacd
Publish: Feature: Allow defining in server variables/x-ms-parameterized-host (#4663)
Publish modelerfour fixes
2022-11-03 19:22:47 +00:00
Timothee Guerin 03c46bd480
Feature: Allow defining in server variables/x-ms-parameterized-host (#4657)
* 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>
2022-11-03 11:22:08 -07:00
Timothee Guerin abaf641b60
Publish: Fix: `format: arm-id` not doing anything in modelerfour (#4612) 2022-08-08 17:35:39 +00:00
Timothee Guerin 59aca446de
Fix: `format: arm-id` not doing anything in modelerfour (#4611) 2022-08-08 09:47:34 -07:00
Timothee Guerin fd3bca3ac3
Bump version for july 2022 release (#4597) 2022-07-19 09:22:25 -07:00
Timothee Guerin bc64a8fe91
Feature: format: `arm-id` (#4596) 2022-07-18 15:46:08 -07:00
Timothee Guerin 4c6ff74700
Add format:uri as alternative to format:url (#4591) 2022-07-06 12:42:59 -07:00
Weidong Xu 0ed8a1805d
config, fix extension java, update min codegen version to 4.1.0 (#4572)
* java, update default codegen to 4.1.0

* changelog

Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
2022-07-06 19:30:58 +00:00
Timothee Guerin 88b689a5a1
Improve name is empty error and source maps (#4555) 2022-06-13 09:25:32 -07:00
Timothee Guerin 2519d915b0
Feature: Modelerfour pass externalDocs through (#4558) 2022-06-13 08:53:09 -07:00
Timothee Guerin 622e7af7ee
Fix: `$ref` with urlencoded (#4556) 2022-06-10 07:28:13 -07:00
Timothee Guerin b6b389a83c
Cleanup(remove md-mock-api) and updates dependencies (#4551) 2022-06-03 07:22:21 -07:00
Joel Hendrix 3831a35bfb
Make Go v4 code generator the default (#4550)
* Make Go v4 code generator the default

Use v2 only when --legacy is specified.

* add changelog

Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
2022-06-02 17:56:14 -07:00