-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[DO NOT MERGE] TEST TEST Creating a new TestService with new structure layout #34537
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
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e95df0a
Creating a new TestService with new structure layout
allenjzhang 6e4c175
change to lower case
mario-guerra 4dce77d
add cspell
mario-guerra 47609c9
Merge branch 'main' into pr-34050
mario-guerra 8d26071
Update folder-structure.ts
weshaggard 7abacdc
Update Get-TypeSpec-Folders.ps1
weshaggard 1035bbd
update json files
mario-guerra fd44c72
skip folder depth check
mario-guerra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This file configures spell checking. Items in "words" were initially populated | ||
# with words that might be spelling errors. Review these words and take | ||
# appropriate action. For more information, see: https://aka.ms/ci-fix#spell-check | ||
|
||
# Spell checking is not case sensitive | ||
# Keep word lists in alphabetical order so the file is easier to manage | ||
version: '0.2' | ||
import: | ||
- ../../cspell.yaml | ||
words: | ||
- armcontoso | ||
- contosowidgetmanager | ||
- contosowidget | ||
- azmanager | ||
- byval | ||
|
63 changes: 63 additions & 0 deletions
63
...tosowidgetmanager-new2/resource-manager/Microsoft.Contoso/Contoso.Management/employee.tsp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import "@typespec/rest"; | ||
import "@typespec/http"; | ||
import "@azure-tools/typespec-azure-core"; | ||
import "@azure-tools/typespec-azure-resource-manager"; | ||
|
||
using TypeSpec.Rest; | ||
using TypeSpec.Http; | ||
using Azure.Core; | ||
using Azure.ResourceManager; | ||
|
||
namespace Microsoft.Contoso; | ||
|
||
/** Employee resource */ | ||
model Employee is TrackedResource<EmployeeProperties> { | ||
...ResourceNameParameter<Employee>; | ||
} | ||
|
||
/** Employee properties */ | ||
model EmployeeProperties { | ||
/** Age of employee */ | ||
age?: int32; | ||
|
||
/** City of employee */ | ||
city?: string; | ||
|
||
/** Profile of employee */ | ||
@encode("base64url") | ||
profile?: bytes; | ||
|
||
/** The status of the last operation. */ | ||
@visibility(Lifecycle.Read) | ||
provisioningState?: ProvisioningState; | ||
} | ||
|
||
/** The resource provisioning state. */ | ||
@lroStatus | ||
union ProvisioningState { | ||
ResourceProvisioningState, | ||
|
||
/** The resource is being provisioned */ | ||
Provisioning: "Provisioning", | ||
|
||
/** The resource is updating */ | ||
Updating: "Updating", | ||
|
||
/** The resource is being deleted */ | ||
Deleting: "Deleting", | ||
|
||
/** The resource create request has been accepted */ | ||
Accepted: "Accepted", | ||
|
||
string, | ||
} | ||
|
||
@armResourceOperations | ||
interface Employees { | ||
get is ArmResourceRead<Employee>; | ||
createOrUpdate is ArmResourceCreateOrReplaceAsync<Employee>; | ||
update is ArmResourcePatchSync<Employee, EmployeeProperties>; | ||
delete is ArmResourceDeleteWithoutOkAsync<Employee>; | ||
listByResourceGroup is ArmResourceListByParent<Employee>; | ||
listBySubscription is ArmListBySubscription<Employee>; | ||
} |
76 changes: 76 additions & 0 deletions
76
...soft.Contoso/Contoso.Management/examples/2021-10-01-preview/Employees_CreateOrUpdate.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"title": "Employees_CreateOrUpdate", | ||
"operationId": "Employees_CreateOrUpdate", | ||
"parameters": { | ||
"api-version": "2021-10-01-preview", | ||
"subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", | ||
"resourceGroupName": "rgopenapi", | ||
"employeeName": "9KF-f-8b", | ||
"resource": { | ||
"properties": { | ||
"age": 30, | ||
"city": "gydhnntudughbmxlkyzrskcdkotrxn", | ||
"profile": "ms" | ||
}, | ||
"tags": { | ||
"key2913": "urperxmkkhhkp" | ||
}, | ||
"location": "itajgxyqozseoygnl" | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"properties": { | ||
"age": 30, | ||
"city": "gydhnntudughbmxlkyzrskcdkotrxn", | ||
"profile": "ms", | ||
"provisioningState": "Succeeded" | ||
}, | ||
"tags": { | ||
"key2913": "urperxmkkhhkp" | ||
}, | ||
"location": "itajgxyqozseoygnl", | ||
"id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/le-8MU--J3W6q8D386p3-iT3", | ||
"name": "xepyxhpb", | ||
"type": "svvamxrdnnv", | ||
"systemData": { | ||
"createdBy": "iewyxsnriqktsvp", | ||
"createdByType": "User", | ||
"createdAt": "2023-05-19T00:28:48.610Z", | ||
"lastModifiedBy": "xrchbnnuzierzpxw", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2023-05-19T00:28:48.610Z" | ||
} | ||
} | ||
}, | ||
"201": { | ||
"headers": { | ||
"Azure-AsyncOperation": "https://contoso.com/operationstatus" | ||
}, | ||
"body": { | ||
"properties": { | ||
"age": 30, | ||
"city": "gydhnntudughbmxlkyzrskcdkotrxn", | ||
"profile": "ms", | ||
"provisioningState": "Succeeded" | ||
}, | ||
"tags": { | ||
"key2913": "urperxmkkhhkp" | ||
}, | ||
"location": "itajgxyqozseoygnl", | ||
"id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/9KF-f-8b", | ||
"name": "xepyxhpb", | ||
"type": "svvamxrdnnv", | ||
"systemData": { | ||
"createdBy": "iewyxsnriqktsvp", | ||
"createdByType": "User", | ||
"createdAt": "2023-05-19T00:28:48.610Z", | ||
"lastModifiedBy": "xrchbnnuzierzpxw", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2023-05-19T00:28:48.610Z" | ||
} | ||
} | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...er/Microsoft.Contoso/Contoso.Management/examples/2021-10-01-preview/Employees_Delete.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"title": "Employees_Delete", | ||
"operationId": "Employees_Delete", | ||
"parameters": { | ||
"api-version": "2021-10-01-preview", | ||
"subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", | ||
"resourceGroupName": "rgopenapi", | ||
"employeeName": "5vX--BxSu3ux48rI4O9OQ569" | ||
}, | ||
"responses": { | ||
"202": { | ||
"headers": { | ||
"Retry-After": 30, | ||
"location": "https://contoso.com/operationstatus" | ||
} | ||
}, | ||
"204": {} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...nager/Microsoft.Contoso/Contoso.Management/examples/2021-10-01-preview/Employees_Get.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"title": "Employees_Get", | ||
"operationId": "Employees_Get", | ||
"parameters": { | ||
"api-version": "2021-10-01-preview", | ||
"subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", | ||
"resourceGroupName": "rgopenapi", | ||
"employeeName": "le-8MU--J3W6q8D386p3-iT3" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"properties": { | ||
"age": 30, | ||
"city": "gydhnntudughbmxlkyzrskcdkotrxn", | ||
"profile": "ms", | ||
"provisioningState": "Succeeded" | ||
}, | ||
"tags": { | ||
"key2913": "urperxmkkhhkp" | ||
}, | ||
"location": "itajgxyqozseoygnl", | ||
"id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/le-8MU--J3W6q8D386p3-iT3", | ||
"name": "xepyxhpb", | ||
"type": "svvamxrdnnv", | ||
"systemData": { | ||
"createdBy": "iewyxsnriqktsvp", | ||
"createdByType": "User", | ||
"createdAt": "2023-05-19T00:28:48.610Z", | ||
"lastModifiedBy": "xrchbnnuzierzpxw", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2023-05-19T00:28:48.610Z" | ||
} | ||
} | ||
} | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...Contoso/Contoso.Management/examples/2021-10-01-preview/Employees_ListByResourceGroup.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"title": "Employees_ListByResourceGroup", | ||
"operationId": "Employees_ListByResourceGroup", | ||
"parameters": { | ||
"api-version": "2021-10-01-preview", | ||
"subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9", | ||
"resourceGroupName": "rgopenapi" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"properties": { | ||
"age": 30, | ||
"city": "gydhnntudughbmxlkyzrskcdkotrxn", | ||
"profile": "ms", | ||
"provisioningState": "Succeeded" | ||
}, | ||
"tags": { | ||
"key2913": "urperxmkkhhkp" | ||
}, | ||
"location": "itajgxyqozseoygnl", | ||
"id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", | ||
"name": "xepyxhpb", | ||
"type": "svvamxrdnnv", | ||
"systemData": { | ||
"createdBy": "iewyxsnriqktsvp", | ||
"createdByType": "User", | ||
"createdAt": "2023-05-19T00:28:48.610Z", | ||
"lastModifiedBy": "xrchbnnuzierzpxw", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2023-05-19T00:28:48.610Z" | ||
} | ||
} | ||
], | ||
"nextLink": "https://microsoft.com/a" | ||
} | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
....Contoso/Contoso.Management/examples/2021-10-01-preview/Employees_ListBySubscription.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"title": "Employees_ListBySubscription", | ||
"operationId": "Employees_ListBySubscription", | ||
"parameters": { | ||
"api-version": "2021-10-01-preview", | ||
"subscriptionId": "11809CA1-E126-4017-945E-AA795CD5C5A9" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"properties": { | ||
"age": 30, | ||
"city": "gydhnntudughbmxlkyzrskcdkotrxn", | ||
"profile": "ms", | ||
"provisioningState": "Succeeded" | ||
}, | ||
"tags": { | ||
"key2913": "urperxmkkhhkp" | ||
}, | ||
"location": "itajgxyqozseoygnl", | ||
"id": "/subscriptions/11809CA1-E126-4017-945E-AA795CD5C5A9/resourceGroups/rgopenapi/providers/Microsoft.Contoso/employees/test", | ||
"name": "xepyxhpb", | ||
"type": "svvamxrdnnv", | ||
"systemData": { | ||
"createdBy": "iewyxsnriqktsvp", | ||
"createdByType": "User", | ||
"createdAt": "2023-05-19T00:28:48.610Z", | ||
"lastModifiedBy": "xrchbnnuzierzpxw", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2023-05-19T00:28:48.610Z" | ||
} | ||
} | ||
], | ||
"nextLink": "https://microsoft.com/a" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename Contoso.Management folder to just Contoso. We already know it's management because it's under resource-manager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wess requested a data-plane example to be part of this PR.
So, under data-plane folder, there should 1 or 2 ServiceName folders identical in structure to that under the Microsoft.Contoso RP namespace folder. Data-plane does not have an RP namespace folder and does not have a readme.md files in this folder. The only readme.md files are in the ServiceName folders.