Skip to content
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

Add support for TypeSpec Values #432

Merged
merged 35 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2277abc
Uptake new object literals
timotheeguerin Mar 15, 2024
c19bd6e
.
timotheeguerin Mar 15, 2024
ae52793
Merge branch 'main' into uptake/object-literals
timotheeguerin Mar 15, 2024
48a230d
Fix
timotheeguerin Mar 15, 2024
24e7c89
Merge with main
timotheeguerin Mar 19, 2024
1c603bd
update
timotheeguerin Mar 19, 2024
ad34875
Create uptake-object-literals-2024-2-19-2-42-4.md
timotheeguerin Mar 19, 2024
627f216
Create uptake-object-literals-2024-2-19-2-47-33.md
timotheeguerin Mar 19, 2024
be2fa18
Fix
timotheeguerin Mar 19, 2024
ca2b83c
Create uptake-object-literals-2024-2-19-3-23-18.md
timotheeguerin Mar 19, 2024
2352814
merge
timotheeguerin Mar 19, 2024
e62a8de
Fix
timotheeguerin Mar 19, 2024
d827fbc
Fix up
timotheeguerin Mar 19, 2024
7068bce
Fix
timotheeguerin Mar 19, 2024
257a39f
.,
timotheeguerin Mar 19, 2024
969f06f
MErge with main
timotheeguerin May 6, 2024
d1e5eaf
Apply changes
timotheeguerin May 6, 2024
9d55cc2
update changelog
timotheeguerin May 6, 2024
c941a8c
regen docs
timotheeguerin May 7, 2024
a64f8b1
fix
timotheeguerin May 7, 2024
849da41
Merge branch 'main' of https://github.com/Azure/typespec-azure into u…
timotheeguerin May 7, 2024
827ac10
merge with main
timotheeguerin May 7, 2024
9ce3fb8
Migrate private decorator to valueof
timotheeguerin May 7, 2024
956fc35
Fix up issues
timotheeguerin May 7, 2024
5d22b56
Format
timotheeguerin May 7, 2024
537112c
Update uptake-object-literals-2024-2-19-2-47-33.md
timotheeguerin May 7, 2024
53df3f4
fix some tests
timotheeguerin May 7, 2024
c92b334
fix
timotheeguerin May 7, 2024
126f0da
Merge branch 'main' into uptake/object-literals
timotheeguerin May 7, 2024
1f7bd3d
bump
timotheeguerin May 7, 2024
c281870
fix
timotheeguerin May 7, 2024
110839d
Use main core
timotheeguerin May 8, 2024
a02a399
merge with main
timotheeguerin May 8, 2024
a14cadf
fix missing metaKind rename
timotheeguerin May 8, 2024
c266770
fix
timotheeguerin May 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .chronus/changes/uptake-object-literals-2024-2-19-2-42-4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: fix
packages:
- "@azure-tools/typespec-autorest"
---

Add support for tuple literals as default values
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: feature
packages:
- "@azure-tools/typespec-azure-core"
- "@azure-tools/typespec-azure-resource-manager"
---

Add support for values
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: feature
packages:
- "@azure-tools/typespec-client-generator-core"
---

Add support for values
2 changes: 1 addition & 1 deletion core
Submodule core updated 122 files
8 changes: 4 additions & 4 deletions docs/libraries/azure-core/reference/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,10 @@ model Azure.Core.StatusMonitorOptions

#### Properties

| Name | Type | Description |
| -------------- | ---------------------------- | --------------------------------------------------------------------------------------- |
| kind | `"statusMonitor"` | The kind of polling options |
| finalProperty? | `ModelProperty \| ErrorType` | A reference to or name of the property of the status monitor that contains the response |
| Name | Type | Description |
| -------------- | ------------------------- | --------------------------------------------------------------------------------------- |
| kind | `"statusMonitor"` | The kind of polling options |
| finalProperty? | `ModelProperty \| string` | A reference to or name of the property of the status monitor that contains the response |

### `StatusMonitorPollingOptions` {#Azure.Core.StatusMonitorPollingOptions}

Expand Down
52 changes: 26 additions & 26 deletions docs/libraries/azure-core/reference/interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface Azure.Core.ResourceOperations<InterfaceTraits, ErrorResponse>
Create or replace operation template.

```typespec
op Azure.Core.ResourceOperations.ResourceCreateOrReplace(apiVersion: string, resource: Resource): (anonymous model) | (anonymous model) | ErrorResponse
op Azure.Core.ResourceOperations.ResourceCreateOrReplace(apiVersion: string, resource: Resource): { statusCode: 201 } | { statusCode: 200 } | ErrorResponse
```

##### Template Parameters
Expand All @@ -43,7 +43,7 @@ op Azure.Core.ResourceOperations.ResourceCreateOrReplace(apiVersion: string, res
Long-running resource create or replace operation template.

```typespec
op Azure.Core.ResourceOperations.LongRunningResourceCreateOrReplace(apiVersion: string, resource: Resource): (anonymous model) | (anonymous model) | ErrorResponse
op Azure.Core.ResourceOperations.LongRunningResourceCreateOrReplace(apiVersion: string, resource: Resource): { statusCode: 201, operationLocation: TypeSpec.Rest.ResourceLocation } | { statusCode: 200, operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse
```

##### Template Parameters
Expand All @@ -58,7 +58,7 @@ op Azure.Core.ResourceOperations.LongRunningResourceCreateOrReplace(apiVersion:
Create or update operation template.

```typespec
op Azure.Core.ResourceOperations.ResourceCreateOrUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): (anonymous model) | (anonymous model) | ErrorResponse
op Azure.Core.ResourceOperations.ResourceCreateOrUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): { statusCode: 201 } | { statusCode: 200 } | ErrorResponse
```

##### Template Parameters
Expand All @@ -73,7 +73,7 @@ op Azure.Core.ResourceOperations.ResourceCreateOrUpdate(apiVersion: string, cont
Long-running resource create or update operation template.

```typespec
op Azure.Core.ResourceOperations.LongRunningResourceCreateOrUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): (anonymous model) | (anonymous model) | ErrorResponse
op Azure.Core.ResourceOperations.LongRunningResourceCreateOrUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): { statusCode: 201, operationLocation: TypeSpec.Rest.ResourceLocation } | { statusCode: 200, operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse
```

##### Template Parameters
Expand All @@ -88,7 +88,7 @@ op Azure.Core.ResourceOperations.LongRunningResourceCreateOrUpdate(apiVersion: s
Resource update operation template.

```typespec
op Azure.Core.ResourceOperations.ResourceUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): (anonymous model) | ErrorResponse
op Azure.Core.ResourceOperations.ResourceUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): { statusCode: 200 } | ErrorResponse
```

##### Template Parameters
Expand All @@ -103,7 +103,7 @@ op Azure.Core.ResourceOperations.ResourceUpdate(apiVersion: string, contentType:
Resource create with service-provided name operation template.

```typespec
op Azure.Core.ResourceOperations.ResourceCreateWithServiceProvidedName(apiVersion: string, resource: Resource): Azure.Core.(anonymous model) | ErrorResponse
op Azure.Core.ResourceOperations.ResourceCreateWithServiceProvidedName(apiVersion: string, resource: Resource): Azure.Core.{ statusCode: 201, location: TypeSpec.Rest.ResourceLocation } | ErrorResponse
```

##### Template Parameters
Expand All @@ -118,7 +118,7 @@ op Azure.Core.ResourceOperations.ResourceCreateWithServiceProvidedName(apiVersio
Long-running resource create with service-provided name operation template.

```typespec
op Azure.Core.ResourceOperations.LongRunningResourceCreateWithServiceProvidedName(apiVersion: string, resource: Resource): Azure.Core.(anonymous model) | ErrorResponse
op Azure.Core.ResourceOperations.LongRunningResourceCreateWithServiceProvidedName(apiVersion: string, resource: Resource): Azure.Core.{ statusCode: 202, location: TypeSpec.Rest.ResourceLocation } | ErrorResponse
```

##### Template Parameters
Expand Down Expand Up @@ -148,7 +148,7 @@ op Azure.Core.ResourceOperations.ResourceRead(apiVersion: string): {} | ErrorRes
Resource delete operation template.

```typespec
op Azure.Core.ResourceOperations.ResourceDelete(apiVersion: string): Azure.Core.(anonymous model) | ErrorResponse
op Azure.Core.ResourceOperations.ResourceDelete(apiVersion: string): Azure.Core.{ statusCode: 204 } | ErrorResponse
```

##### Template Parameters
Expand All @@ -163,7 +163,7 @@ op Azure.Core.ResourceOperations.ResourceDelete(apiVersion: string): Azure.Core.
Long-running resource delete operation template.

```typespec
op Azure.Core.ResourceOperations.LongRunningResourceDelete(apiVersion: string): (anonymous model) | ErrorResponse
op Azure.Core.ResourceOperations.LongRunningResourceDelete(apiVersion: string): { statusCode: 202, id: string, status: Azure.Core.Foundations.OperationState, error: Azure.Core.Foundations.Error, result: never, operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse
```

##### Template Parameters
Expand Down Expand Up @@ -227,7 +227,7 @@ op Azure.Core.ResourceOperations.ResourceCollectionAction(apiVersion: string): {
Long-running resource action operation template.

```typespec
op Azure.Core.ResourceOperations.LongRunningResourceAction(apiVersion: string): Azure.Core.(anonymous model) | ErrorResponse
op Azure.Core.ResourceOperations.LongRunningResourceAction(apiVersion: string): Azure.Core.{ statusCode: 202, id: string, status: Azure.Core.Foundations.OperationState, error: StatusError, result: StatusResult, operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse
```

##### Template Parameters
Expand All @@ -245,7 +245,7 @@ op Azure.Core.ResourceOperations.LongRunningResourceAction(apiVersion: string):
Long-running resource collection action operation template.

```typespec
op Azure.Core.ResourceOperations.LongRunningResourceCollectionAction(apiVersion: string): Azure.Core.(anonymous model) | ErrorResponse
op Azure.Core.ResourceOperations.LongRunningResourceCollectionAction(apiVersion: string): Azure.Core.{ statusCode: 202, id: string, status: Azure.Core.Foundations.OperationState, error: StatusError, result: StatusResult, operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse
```

##### Template Parameters
Expand Down Expand Up @@ -301,7 +301,7 @@ See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#def
Long-running operation signature for a resource action.

```typespec
op Azure.Core.LongRunningResourceAction(apiVersion: string): Azure.Core.(anonymous model) | Azure.Core.Foundations.ErrorResponse
op Azure.Core.LongRunningResourceAction(apiVersion: string): Azure.Core.{ statusCode: 202, id: string, status: Azure.Core.Foundations.OperationState, error: StatusError, result: StatusResult, operationLocation: TypeSpec.Rest.ResourceLocation } | Azure.Core.Foundations.ErrorResponse
```

#### Template Parameters
Expand All @@ -323,7 +323,7 @@ See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#def
Long-running operation signature for an action that applies to a collection of resources.

```typespec
op Azure.Core.LongRunningResourceCollectionAction(apiVersion: string): Azure.Core.(anonymous model) | Azure.Core.Foundations.ErrorResponse
op Azure.Core.LongRunningResourceCollectionAction(apiVersion: string): Azure.Core.{ statusCode: 202, id: string, status: Azure.Core.Foundations.OperationState, error: StatusError, result: StatusResult, operationLocation: TypeSpec.Rest.ResourceLocation } | Azure.Core.Foundations.ErrorResponse
```

#### Template Parameters
Expand All @@ -345,7 +345,7 @@ See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#def
Long-running operation signature to create or replace a resource.

```typespec
op Azure.Core.LongRunningResourceCreateOrReplace(apiVersion: string, resource: Resource): (anonymous model) | (anonymous model) | Azure.Core.Foundations.ErrorResponse
op Azure.Core.LongRunningResourceCreateOrReplace(apiVersion: string, resource: Resource): { statusCode: 201, operationLocation: TypeSpec.Rest.ResourceLocation } | { statusCode: 200, operationLocation: TypeSpec.Rest.ResourceLocation } | Azure.Core.Foundations.ErrorResponse
```

#### Template Parameters
Expand All @@ -364,7 +364,7 @@ See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#def
Long-running operation signature to create or update a resource.

```typespec
op Azure.Core.LongRunningResourceCreateOrUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): (anonymous model) | (anonymous model) | Azure.Core.Foundations.ErrorResponse
op Azure.Core.LongRunningResourceCreateOrUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): { statusCode: 201, operationLocation: TypeSpec.Rest.ResourceLocation } | { statusCode: 200, operationLocation: TypeSpec.Rest.ResourceLocation } | Azure.Core.Foundations.ErrorResponse
```

#### Template Parameters
Expand All @@ -383,7 +383,7 @@ See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#def
Long-running operation signature to create a resource with a service-provided name.

```typespec
op Azure.Core.LongRunningResourceCreateWithServiceProvidedName(apiVersion: string, resource: Resource): Azure.Core.(anonymous model) | Azure.Core.Foundations.ErrorResponse
op Azure.Core.LongRunningResourceCreateWithServiceProvidedName(apiVersion: string, resource: Resource): Azure.Core.{ statusCode: 202, location: TypeSpec.Rest.ResourceLocation } | Azure.Core.Foundations.ErrorResponse
```

#### Template Parameters
Expand All @@ -402,7 +402,7 @@ See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#def
Long-running operation signature to delete a resource.

```typespec
op Azure.Core.LongRunningResourceDelete(apiVersion: string): (anonymous model) | Azure.Core.Foundations.ErrorResponse
op Azure.Core.LongRunningResourceDelete(apiVersion: string): { statusCode: 202, id: string, status: Azure.Core.Foundations.OperationState, error: Azure.Core.Foundations.Error, result: never, operationLocation: TypeSpec.Rest.ResourceLocation } | Azure.Core.Foundations.ErrorResponse
```

#### Template Parameters
Expand All @@ -417,7 +417,7 @@ op Azure.Core.LongRunningResourceDelete(apiVersion: string): (anonymous model) |
A long-running remote procedure call (RPC) operation.

```typespec
op Azure.Core.LongRunningRpcOperation(apiVersion: string): Azure.Core.(anonymous model) | ErrorResponse
op Azure.Core.LongRunningRpcOperation(apiVersion: string): Azure.Core.{ statusCode: 202, id: string, status: Azure.Core.Foundations.OperationState, error: StatusError, result: StatusResult, operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse
```

#### Template Parameters
Expand Down Expand Up @@ -483,7 +483,7 @@ See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#def
Operation signature to create or replace a resource.

```typespec
op Azure.Core.ResourceCreateOrReplace(apiVersion: string, resource: Resource): (anonymous model) | (anonymous model) | Azure.Core.Foundations.ErrorResponse
op Azure.Core.ResourceCreateOrReplace(apiVersion: string, resource: Resource): { statusCode: 201 } | { statusCode: 200 } | Azure.Core.Foundations.ErrorResponse
```

#### Template Parameters
Expand All @@ -502,7 +502,7 @@ See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#def
Operation signature to create or update a resource.

```typespec
op Azure.Core.ResourceCreateOrUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): (anonymous model) | (anonymous model) | Azure.Core.Foundations.ErrorResponse
op Azure.Core.ResourceCreateOrUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): { statusCode: 201 } | { statusCode: 200 } | Azure.Core.Foundations.ErrorResponse
```

#### Template Parameters
Expand All @@ -521,7 +521,7 @@ See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#def
Operation signature to synchronously create a resource with a service-provided name.

```typespec
op Azure.Core.ResourceCreateWithServiceProvidedName(apiVersion: string, resource: Resource): Azure.Core.(anonymous model) | Azure.Core.Foundations.ErrorResponse
op Azure.Core.ResourceCreateWithServiceProvidedName(apiVersion: string, resource: Resource): Azure.Core.{ statusCode: 201, location: TypeSpec.Rest.ResourceLocation } | Azure.Core.Foundations.ErrorResponse
```

#### Template Parameters
Expand All @@ -540,7 +540,7 @@ See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#def
Operation signature to delete a resource.

```typespec
op Azure.Core.ResourceDelete(apiVersion: string): Azure.Core.(anonymous model) | Azure.Core.Foundations.ErrorResponse
op Azure.Core.ResourceDelete(apiVersion: string): Azure.Core.{ statusCode: 204 } | Azure.Core.Foundations.ErrorResponse
```

#### Template Parameters
Expand Down Expand Up @@ -596,7 +596,7 @@ See https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#def
Operation signature to update a resource.

```typespec
op Azure.Core.ResourceUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): (anonymous model) | Azure.Core.Foundations.ErrorResponse
op Azure.Core.ResourceUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): { statusCode: 200 } | Azure.Core.Foundations.ErrorResponse
```

#### Template Parameters
Expand Down Expand Up @@ -649,7 +649,7 @@ op Azure.Core.Foundations.GetOperationStatus(apiVersion: string, operationId: st
Long-running operation.

```typespec
op Azure.Core.Foundations.LongRunningOperation(apiVersion: string): Azure.Core.Foundations.(anonymous model) | ErrorResponse
op Azure.Core.Foundations.LongRunningOperation(apiVersion: string): Azure.Core.Foundations.{ operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse
```

#### Template Parameters
Expand All @@ -666,7 +666,7 @@ op Azure.Core.Foundations.LongRunningOperation(apiVersion: string): Azure.Core.F
Long-running operation that updates a resource.

```typespec
op Azure.Core.Foundations.LongRunningResourceUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): (anonymous model) | ErrorResponse
op Azure.Core.Foundations.LongRunningResourceUpdate(apiVersion: string, contentType: "application/merge-patch+json", resource: Resource): { statusCode: 200, operationLocation: TypeSpec.Rest.ResourceLocation } | ErrorResponse
```

#### Template Parameters
Expand All @@ -682,7 +682,7 @@ op Azure.Core.Foundations.LongRunningResourceUpdate(apiVersion: string, contentT
Operation that lists resources in a non-paginated way.

```typespec
op Azure.Core.Foundations.NonPagedResourceList(apiVersion: string): Azure.Core.Foundations.(anonymous model) | ErrorResponse
op Azure.Core.Foundations.NonPagedResourceList(apiVersion: string): Azure.Core.Foundations.{ body: Array<Element> } | ErrorResponse
```

#### Template Parameters
Expand Down
Loading
Loading