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

5679 Коммитов

Автор SHA1 Сообщение Дата
Pan Shao ff93b8b61b
Bump versions (#5015)
Co-authored-by: Microsoft Auto Changeset Bot <autochangesetbot@microsoft.com>
2024-09-09 16:19:58 +08:00
Pan Shao 2547245a1b
Remove dependency of .net generator from tsp converter (#5008)
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>
2024-09-06 16:40:16 +08:00
Patrick Hallisey f9c30f35b8
Rename autorest.csharp branch feature/v3 to main (#5011) 2024-09-04 04:34:45 -07:00
Pan Shao a9acf9a4e4
Bump versions (#5007)
Co-authored-by: Microsoft Auto Changeset Bot <autochangesetbot@microsoft.com>
2024-08-28 14:54:44 +08:00
Joel Hendrix e801c982de
Note that final-state-via is only for POST (#5004) 2024-08-20 14:30:22 -07:00
Pan Shao d00c2a0046
upgrade tsp compiler to 0.59 (#5003)
Co-authored-by: Pan Shao <pashao@microsoft.com>
2024-08-19 16:31:17 +08:00
Pan Shao c77664b6c4
Bump versions (#5000)
Co-authored-by: Microsoft Auto Changeset Bot <autochangesetbot@microsoft.com>
2024-08-13 15:26:42 +08:00
Pan Shao 812da7888f
Upgrade tsp to 0.58 (#4998)
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>
2024-08-12 12:48:40 +08:00
Wes Haggard 4d3ee05850
Remove unused macos references (#4978) 2024-07-19 11:27:17 -07:00
Jose Manuel Heredia Hidalgo d665678278
[Openapi to Typespec] Detect Arm and Fix unsupported char type (#4989)
* Currently SchemaType.Char is unsupported, mapping it to string to fix
the problem
* Automatically detect when a swagger is ARM
Fixes #4991
2024-07-12 13:39:46 -07:00
Pan Shao fa08f8cc50
Bump versions (#4982)
Co-authored-by: Microsoft Auto Changeset Bot <autochangesetbot@microsoft.com>
2024-06-25 17:24:01 +08:00
Pan Shao 74c57ee452
Upgrade compiler to 0.57 (#4981) 2024-06-25 16:02:49 +08:00
Pan Shao 765bc784b0
Bump versions (#4977)
Co-authored-by: Microsoft Auto Changeset Bot <autochangesetbot@microsoft.com>
2024-06-11 12:29:17 +08:00
Pan Shao 6e0147d1df
Output autogen information (#4975)
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.
2024-06-07 10:11:24 +08:00
Timothee Guerin 2ec0240df9
Fix invalid connection (#4974) 2024-06-03 18:09:09 +00:00
Timothee Guerin 38507ae584
Disable docker publish for now (#4973)
It has been broken for a long time and not sure anybody uses it anyway,
This is currently blocking any other publishing
2024-06-03 17:11:51 +00:00
Patrick Hallisey 3a4b4811e1
Use new service connection for Autorest publish (#4972) 2024-05-31 18:26:49 +00:00
Pan Shao 72bbf9c3ce
Change enum definition to latest grammer (#4945)
Fix #4943
2024-05-29 22:30:19 +08:00
Pan Shao 21d78e4733
Bump versions (#4970)
Co-authored-by: Microsoft Auto Changeset Bot <autochangesetbot@microsoft.com>
2024-05-29 10:54:00 +08:00
Laurent Mazuel 4ddb583d72
Add disclaimer that flatteing is not recommended anymore (#4908) 2024-05-28 14:26:04 -07:00
Pan Shao 961b09d5a2
Upgrade compiler version and fix issues (#4967)
1. Upgrade compiler version to 0.56
2. `TrackedResourceBase` => `Foundations.TrackedResource` (same as
others: `XXXResourceBase` => `Foundations.XXXResource`)
3. `Azure.ResourceManager.ManagedServiceIdentity` =>
`Azure.ResourceManager.ManagedServiceIdentityProperty` (same as others
`Azure.ResourceManager.XXX`=> `Azure.ResourceManager.XXXProperty`)
4. `extends Record<XXX>` => `...Record<XXX>`
5. `name: string` in resource => `ResourceNameParameter` template
6. `@parameterVisibility("read")` => `@parameterVisibility`
7. `TrackedResource` => `Azure.ResourceManager.TrackedResource`
8. Add suppressions of below syntax to brown field services
- ArmResourceDeleteSync
- ArmResourceDeleteAsync
- property has record type-
2024-05-24 11:25:01 +08:00
Patrick Hallisey 1f91e166f3
Use authenticatedContainerRegistries config for 1es template (#4935) 2024-05-08 13:20:59 -07:00
Pan Shao 33f1071120
Support for anyObject (#4958)
Fix #4957
Fix #4959

---------

Co-authored-by: Pan Shao <pashao@microsoft.com>
2024-04-26 10:15:11 +08:00
Pan Shao 03fc9adaaf
Change isFullCompatible logic (#4954)
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"
2024-04-19 19:23:47 +08:00
Pan Shao 6018eb2b79
Support api version as path parameter (#4952)
Fix #4951 #4949 #4950
And fix some compile error for version name
2024-04-19 17:30:27 +08:00
Pan Shao a76da06009
Add command to call tsp compilation for test projects (#4948)
This is part of https://github.com/Azure/autorest/issues/4947

We could call `npm run generate swagger {project folder}` to run the
compilation.
2024-04-17 10:24:39 +08:00
Patrick Hallisey 977049cf32
Use 1es pipeline templates (#4920)
Co-authored-by: Scott Beddall (from Dev Box) <scbedd@microsoft.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
2024-03-26 18:46:55 +00:00
Rodge Fu 63ffe68961
Inlcude csharp rename decorator when openai-to-typespec generating tsp (#4907)
Fixes https://github.com/Azure/autorest.csharp/issues/4236.
Generate csharp renaming decorator when openai-to-typespec generating
tsp. (include rename of resource, resource.property, model,
model.property, enum, enum.member and operation name)

related autorest.csharp change can be found at
https://github.com/Azure/autorest.csharp/pull/4380
2024-03-19 21:20:34 +08:00
Chenjie Shi cc5a4dc000
lock openapi-to-typespec test config (#4919)
fix: https://github.com/Azure/autorest/issues/4913
2024-03-19 15:00:46 +08:00
Chenjie Shi 746b972309
Fix typo (#4904) 2024-03-12 11:26:43 +08:00
Timothee Guerin 8d137ce24e
Bump versions (#4897) 2024-02-28 19:04:14 +00:00
Timothee Guerin 04b947f109
Fix crash with duplicate paths (#4896)
fix #4882 too
2024-02-28 10:01:48 -08:00
Chenjie Shi 6c9655e62e
change to use different base parameter for different resource (#4889)
fix: https://github.com/Azure/autorest/issues/4872
2024-02-27 07:29:20 +00:00
Chenjie Shi a445362db3
Add a flag to disable conversion feature for backcomp (#4887)
fix #4879

need wait for #4885 to be merged first.
2024-02-23 09:14:32 +00:00
Chenjie Shi 0a048786f2
Change to use raw operation for non-resource operations (#4886)
resolve: https://github.com/Azure/autorest/issues/4881
2024-02-23 03:27:25 +00:00
Chenjie Shi 894d5a84f5
fix default value of array and remove default value of duration temporarily (#4888)
fix: https://github.com/Azure/autorest/issues/4874
2024-02-22 10:20:18 +00:00
Chenjie Shi 1a40a3af06
migrate @projectedName to @encodedName (#4885)
resolve: #4884
2024-02-22 15:05:44 +08:00
Gil LaHaye 1819fe1d8d
Fix typo in autorest-configuration-schema.ts (#4842)
description: "Reservered for future use." -> description: "Reserved for
future use."
2024-02-16 07:01:00 -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
Tymur Mudzhyri 7c01d2e176
Update link to autorest.python changelog (#4818)
Just a small documentation fix that makes `@autorest.python` changelog
link work
2023-12-11 09:47:29 -08:00
Timothee Guerin e9ea42b743
Fix pick latest installed (#4810)
fix #4785
2023-11-28 19:57:10 +00: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
Timothee Guerin d9a71585ad
Fix changelogs (#4799) 2023-11-16 07:59:23 -08:00
Timothee Guerin 0ff63ea46e
Fix auto release (#4798) 2023-11-16 07:53:45 -08:00