Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
tadelesh committed Oct 24, 2023
1 parent 0220795 commit b3f81c7
Show file tree
Hide file tree
Showing 41 changed files with 20,843 additions and 830 deletions.
10,065 changes: 10,065 additions & 0 deletions packages/extensions/openapi-to-cadl/test/arm-azureintegrationspaces/CodeModel.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"output-folder": ".",
"namespace": "Azure.ResourceManager.Integration.Spaces",
"library-name": "AzureIntegrationSpacesResourceManagementAPI",
"shared-source-folders": [
"C:\\Users\\chenjieshi\\.autorest\\@autorest_csharp@3.0.0-alpha.20231017.8\\node_modules\\@autorest\\csharp\\Generator.Shared",
"C:\\Users\\chenjieshi\\.autorest\\@autorest_csharp@3.0.0-alpha.20231017.8\\node_modules\\@autorest\\csharp\\Azure.Core.Shared"
],
"azure-arm": true,
"public-clients": true,
"head-as-boolean": true,
"RequestPathToResourceData": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}": "ApplicationResource"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@ isAzureSpec: true
isArm: true
namespace: "Azure.ResourceManager.Integration.Spaces"
```
### Config for csharp
```yaml
save-inputs: true
request-path-to-resource-data:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}: ApplicationResource
```

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,24 @@ interface Applications {
filter?: string;

@doc("Select the specified fields to be included in the response.")
@query("select")
@query({
name: "select",
format: "multi",
})
select?: string[];

@doc("Expand the indicated resources into the response.")
@query("expand")
@query({
name: "expand",
format: "multi",
})
expand?: string[];

@doc("Expressions that specify the order of returned results.")
@query("orderby")
@query({
name: "orderby",
format: "multi",
})
orderby?: string[];
}
>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,24 @@ interface BusinessProcesses {
filter?: string;

@doc("Select the specified fields to be included in the response.")
@query("select")
@query({
name: "select",
format: "multi",
})
select?: string[];

@doc("Expand the indicated resources into the response.")
@query("expand")
@query({
name: "expand",
format: "multi",
})
expand?: string[];

@doc("Expressions that specify the order of returned results.")
@query("orderby")
@query({
name: "orderby",
format: "multi",
})
orderby?: string[];
}
>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,24 @@ interface BusinessProcessVersions {
filter?: string;

@doc("Select the specified fields to be included in the response.")
@query("select")
@query({
name: "select",
format: "multi",
})
select?: string[];

@doc("Expand the indicated resources into the response.")
@query("expand")
@query({
name: "expand",
format: "multi",
})
expand?: string[];

@doc("Expressions that specify the order of returned results.")
@query("orderby")
@query({
name: "orderby",
format: "multi",
})
orderby?: string[];
}
>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,24 @@ interface InfrastructureResources {
filter?: string;

@doc("Select the specified fields to be included in the response.")
@query("select")
@query({
name: "select",
format: "multi",
})
select?: string[];

@doc("Expand the indicated resources into the response.")
@query("expand")
@query({
name: "expand",
format: "multi",
})
expand?: string[];

@doc("Expressions that specify the order of returned results.")
@query("orderby")
@query({
name: "orderby",
format: "multi",
})
orderby?: string[];
}
>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,24 @@ interface Spaces {
filter?: string;

@doc("Select the specified fields to be included in the response.")
@query("select")
@query({
name: "select",
format: "multi",
})
select?: string[];

@doc("Expand the indicated resources into the response.")
@query("expand")
@query({
name: "expand",
format: "multi",
})
expand?: string[];

@doc("Expressions that specify the order of returned results.")
@query("orderby")
@query({
name: "orderby",
format: "multi",
})
orderby?: string[];
}
>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,24 @@ interface ApplicationResourcesOperations {
filter?: string;

@doc("Select the specified fields to be included in the response.")
@query("select")
@query({
name: "select",
format: "multi",
})
select?: string[];

@doc("Expand the indicated resources into the response.")
@query("expand")
@query({
name: "expand",
format: "multi",
})
expand?: string[];

@doc("Expressions that specify the order of returned results.")
@query("orderby")
@query({
name: "orderby",
format: "multi",
})
orderby?: string[];

@doc("The name of the space")
Expand Down
4,015 changes: 4,014 additions & 1 deletion packages/extensions/openapi-to-cadl/test/arm-compute/resources.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/rest";
import "./models.tsp";
import "./DiskAccess.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
using TypeSpec.Http;

namespace Azure.ResourceManager.Compute;
@doc("The Private Endpoint Connection resource.")
@parentResource(DiskAccess)
model ComputePrivateEndpointConnection
is ProxyResource<PrivateEndpointConnectionProperties> {
@doc("The name of the private endpoint connection.")
@path
@key("privateEndpointConnectionName")
@segment("privateEndpointConnections")
name: string;
}

@armResourceOperations
interface ComputePrivateEndpointConnections {
@doc("""
Gets information about a private endpoint connection under a disk access
resource.
""")
getAPrivateEndpointConnection is ArmResourceRead<ComputePrivateEndpointConnection>;
@doc("""
Approve or reject a private endpoint connection under disk access resource,
this can't be used to create a new private endpoint connection.
""")
updateAPrivateEndpointConnection is ArmResourceCreateOrUpdateAsync<ComputePrivateEndpointConnection>;
@doc("Deletes a private endpoint connection under a disk access resource.")
deleteAPrivateEndpointConnection is ArmResourceDeleteAsync<ComputePrivateEndpointConnection>;
@doc("List information about private endpoint connections under a disk access resource")
listPrivateEndpointConnections is ArmResourceListByParent<ComputePrivateEndpointConnection>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/rest";
import "./models.tsp";
import "./RestorePointGroup.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/rest";
import "./models.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
using TypeSpec.Http;

namespace Azure.ResourceManager.Compute;
@doc("Create or update Restore Point collection parameters.")
model RestorePointGroup is TrackedResource<RestorePointCollectionProperties> {
@doc("The name of the restore point collection.")
@path
@key("restorePointCollectionName")
@segment("restorePointCollections")
name: string;
}

@armResourceOperations
interface RestorePointGroups {
@doc("The operation to get the restore point collection.")
get is ArmResourceRead<RestorePointGroup>;
@doc("""
The operation to create or update the restore point collection. Please refer to
https://aka.ms/RestorePoints for more details. When updating a restore point
collection, only tags may be modified.
""")
createOrUpdate is ArmResourceCreateOrUpdateAsync<RestorePointGroup>;
@doc("The operation to update the restore point collection.")
update is ArmResourcePatchSync<
RestorePointGroup,
RestorePointCollectionProperties
>;
@doc("""
The operation to delete the restore point collection. This operation will also
delete all the contained restore points.
""")
delete is ArmResourceDeleteAsync<RestorePointGroup>;
@doc("Gets the list of restore point collections in a resource group.")
list is ArmResourceListByParent<RestorePointGroup>;
@doc("""
Gets the list of restore point collections in the subscription. Use nextLink
property in the response to get the next page of restore point collections. Do
this till nextLink is not null to fetch all the restore point collections.
""")
listAll is ArmListBySubscription<RestorePointGroup>;
}
Loading

0 comments on commit b3f81c7

Please sign in to comment.