Skip to content

Commit 2f5281d

Browse files
Resolving Eric's comments
1 parent 9296145 commit 2f5281d

25 files changed

Lines changed: 4795 additions & 505 deletions

File tree

RELATIONSHIP_MEMBERS_PROPOSAL.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Implement enhanced relationship member types that provide rich object metadata w
5656

5757
### Version Strategy
5858

59-
- **Enhanced Versions**: `beta/1.1.0-preview` and `v1.1/0.1.1-preview`
59+
- **Enhanced Versions**: `beta/1.0.1-preview` and `v1.0/1.0.1-preview`
6060
- **Legacy Versions**: `v1.0/1.0.0` (maintains string arrays)
6161
- **Detection Logic**: `isEnhancedRelationshipVersion()` function
6262

@@ -95,17 +95,16 @@ if (isEnhanced) {
9595
**Location:** `src/generator/src/generate.ts`
9696

9797
**Changes:**
98-
- Added v1.1 API version support
99-
- Updated `extensionConfigForGeneration` with v1.1 configuration
100-
- Enhanced `shouldIncludeFilePath` with v1.1 patterns
101-
- Updated `buildTypeIndex` for v1.1 version handling
98+
- Updated `extensionConfigForGeneration` with v1.0.1 configuration
99+
- Enhanced `shouldIncludeFilePath` with v1.0.1 patterns
100+
- Updated `buildTypeIndex` for v1.0.1 version handling
102101

103102
#### 3. index.ts (swagger-generation)
104103
**Location:** `src/swagger-generation/src/index.ts`
105104

106105
**Changes:**
107-
- Fixed `writeSwaggerReadMeFile` to include v1.1 AutoRest configuration
108-
- Added v1.1 section to readme template
106+
- Fixed `writeSwaggerReadMeFile` to include v1.0.1 AutoRest configuration
107+
- Added v1.0.1 section to readme template
109108
- Ensured proper AutoRest setup for all API versions
110109

111110
### Test Coverage
@@ -114,15 +113,15 @@ if (isEnhanced) {
114113
**Location:** `src/swagger-generation/tests/swaggerWriter.test.ts`
115114

116115
**Coverage:**
117-
1. **Enhanced Beta Test**: Validates `beta/1.1.0-preview` with full relationship member objects
118-
2. **Enhanced v1.1 Test**: Validates `v1.1/0.1.1-preview` with full relationship member objects
116+
1. **Enhanced Beta Test**: Validates `beta/1.0.1-preview` with full relationship member objects
117+
2. **Enhanced v1.0.1 Test**: Validates `v1.0/1.0.1-preview` with full relationship member objects
119118
3. **Legacy v1.0 Test**: Validates `v1.0/1.0.0` maintains simple string arrays
120119

121120
**Test Results:** ✅ 11/11 tests passing
122121

123122
## API Version Comparison
124123

125-
### Enhanced Versions (beta/1.1.0-preview, v1.1/0.1.1-preview)
124+
### Enhanced Versions (beta/1.0.1-preview, v1.0/1.0.1-preview)
126125

127126
```json
128127
{
@@ -200,8 +199,8 @@ var servicePrincipals = filter(group.members, member => member.type == 'serviceP
200199
## Validation Results
201200

202201
### Production Validation
203-
-**Beta Swagger**: `microsoftgraph-beta-1.1.0-preview.json` contains enhanced relationshipMember
204-
-**v1.1 Swagger**: `microsoftgraph-v1.1-0.1.1-preview.json` contains enhanced relationshipMember
202+
-**Beta Swagger**: `microsoftgraph-beta-1.0.1-preview.json` contains enhanced relationshipMember
203+
-**v1.1 Swagger**: `microsoftgraph-v1.0-1.0.1-preview.json` contains enhanced relationshipMember
205204
-**v1.0 Swagger**: `microsoftgraph-v1.0-1.0.0.json` maintains string arrays (no relationshipMember)
206205

207206
### Test Validation
@@ -213,7 +212,7 @@ npm test -- swaggerWriter.test.ts
213212
### Generated Output Verification
214213
```powershell
215214
# Enhanced versions contain full object structure
216-
Get-Content src\swagger-generation\output\microsoftgraph-beta-1.1.0-preview.json |
215+
Get-Content src\swagger-generation\output\microsoftgraph-beta-1.0.1-preview.json |
217216
ConvertFrom-Json | Select-Object -ExpandProperty definitions |
218217
Select-Object -ExpandProperty "microsoft.graph.relationshipMember"
219218
@@ -235,7 +234,7 @@ Get-Content src\swagger-generation\output\microsoftgraph-v1.0-1.0.0.json |
235234
## Migration Path
236235

237236
### For New Implementations
238-
- Use enhanced versions (`beta/1.1.0-preview` or `v1.1/0.1.1-preview`)
237+
- Use enhanced versions (`beta/1.0.1-preview` or `v1.0/1.0.1-preview`)
239238
- Leverage rich relationship member objects for advanced scenarios
240239

241240
### For Existing Implementations
@@ -248,8 +247,8 @@ Get-Content src\swagger-generation\output\microsoftgraph-v1.0-1.0.0.json |
248247
### Version Detection Logic
249248
```typescript
250249
function isEnhancedRelationshipVersion(config: Config): boolean {
251-
return (config.APIVersion === 'beta' && config.ExtensionVersion === '1.1.0-preview') ||
252-
(config.APIVersion === 'v1.1' && config.ExtensionVersion === '0.1.1-preview');
250+
return (config.APIVersion === 'beta' && config.ExtensionVersion === '1.0.1-preview') ||
251+
(config.APIVersion === 'v1.0' && config.ExtensionVersion === '1.0.1-preview');
253252
}
254253
```
255254

generated/index.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
{
22
"resources": {
33
"Microsoft.Graph/groups@beta": {
4-
"$ref": "microsoftgraph/microsoft.graph/beta/0.1.9-preview/types.json#/18"
4+
"$ref": "microsoftgraph/microsoft.graph/beta/1.0.1-preview/types.json#/18"
55
},
66
"Microsoft.Graph/applications@beta": {
7-
"$ref": "microsoftgraph/microsoft.graph/beta/0.1.9-preview/types.json#/74"
7+
"$ref": "microsoftgraph/microsoft.graph/beta/1.0.1-preview/types.json#/74"
88
},
99
"Microsoft.Graph/servicePrincipals@beta": {
10-
"$ref": "microsoftgraph/microsoft.graph/beta/0.1.9-preview/types.json#/92"
10+
"$ref": "microsoftgraph/microsoft.graph/beta/1.0.1-preview/types.json#/92"
1111
},
1212
"Microsoft.Graph/applications/federatedIdentityCredentials@beta": {
13-
"$ref": "microsoftgraph/microsoft.graph/beta/0.1.9-preview/types.json#/97"
13+
"$ref": "microsoftgraph/microsoft.graph/beta/1.0.1-preview/types.json#/97"
1414
},
1515
"Microsoft.Graph/oauth2PermissionGrants@beta": {
16-
"$ref": "microsoftgraph/microsoft.graph/beta/0.1.9-preview/types.json#/101"
16+
"$ref": "microsoftgraph/microsoft.graph/beta/1.0.1-preview/types.json#/101"
1717
},
1818
"Microsoft.Graph/appRoleAssignedTo@beta": {
19-
"$ref": "microsoftgraph/microsoft.graph/beta/0.1.9-preview/types.json#/105"
19+
"$ref": "microsoftgraph/microsoft.graph/beta/1.0.1-preview/types.json#/105"
2020
},
2121
"Microsoft.Graph/users@beta": {
22-
"$ref": "microsoftgraph/microsoft.graph/beta/0.1.9-preview/types.json#/110"
22+
"$ref": "microsoftgraph/microsoft.graph/beta/1.0.1-preview/types.json#/110"
2323
},
2424
"Microsoft.Graph/groups@v1.0": {
25-
"$ref": "microsoftgraph/microsoft.graph/v1.0/0.1.9-preview/types.json#/13"
25+
"$ref": "microsoftgraph/microsoft.graph/v1.0/1.0.1-preview/types.json#/13"
2626
},
2727
"Microsoft.Graph/applications@v1.0": {
28-
"$ref": "microsoftgraph/microsoft.graph/v1.0/0.1.9-preview/types.json#/70"
28+
"$ref": "microsoftgraph/microsoft.graph/v1.0/1.0.1-preview/types.json#/70"
2929
},
3030
"Microsoft.Graph/servicePrincipals@v1.0": {
31-
"$ref": "microsoftgraph/microsoft.graph/v1.0/0.1.9-preview/types.json#/88"
31+
"$ref": "microsoftgraph/microsoft.graph/v1.0/1.0.1-preview/types.json#/88"
3232
},
3333
"Microsoft.Graph/applications/federatedIdentityCredentials@v1.0": {
34-
"$ref": "microsoftgraph/microsoft.graph/v1.0/0.1.9-preview/types.json#/93"
34+
"$ref": "microsoftgraph/microsoft.graph/v1.0/1.0.1-preview/types.json#/93"
3535
},
3636
"Microsoft.Graph/oauth2PermissionGrants@v1.0": {
37-
"$ref": "microsoftgraph/microsoft.graph/v1.0/0.1.9-preview/types.json#/97"
37+
"$ref": "microsoftgraph/microsoft.graph/v1.0/1.0.1-preview/types.json#/97"
3838
},
3939
"Microsoft.Graph/appRoleAssignedTo@v1.0": {
40-
"$ref": "microsoftgraph/microsoft.graph/v1.0/0.1.9-preview/types.json#/101"
40+
"$ref": "microsoftgraph/microsoft.graph/v1.0/1.0.1-preview/types.json#/101"
4141
},
4242
"Microsoft.Graph/users@v1.0": {
43-
"$ref": "microsoftgraph/microsoft.graph/v1.0/0.1.9-preview/types.json#/106"
43+
"$ref": "microsoftgraph/microsoft.graph/v1.0/1.0.1-preview/types.json#/106"
4444
}
4545
},
4646
"resourceFunctions": {}

generated/microsoftgraph/microsoft.graph/beta/1.1.0-preview/index.json renamed to generated/microsoftgraph/microsoft.graph/beta/1.0.1-preview/index.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
{
22
"resources": {
33
"Microsoft.Graph/groups@beta": {
4-
"$ref": "types.json#/23"
4+
"$ref": "types.json#/21"
55
},
66
"Microsoft.Graph/applications@beta": {
7-
"$ref": "types.json#/79"
7+
"$ref": "types.json#/77"
88
},
99
"Microsoft.Graph/servicePrincipals@beta": {
10-
"$ref": "types.json#/97"
10+
"$ref": "types.json#/95"
1111
},
1212
"Microsoft.Graph/applications/federatedIdentityCredentials@beta": {
13-
"$ref": "types.json#/103"
13+
"$ref": "types.json#/101"
1414
},
1515
"Microsoft.Graph/oauth2PermissionGrants@beta": {
16-
"$ref": "types.json#/107"
16+
"$ref": "types.json#/105"
1717
},
1818
"Microsoft.Graph/appRoleAssignedTo@beta": {
19-
"$ref": "types.json#/111"
19+
"$ref": "types.json#/109"
2020
},
2121
"Microsoft.Graph/users@beta": {
22-
"$ref": "types.json#/116"
22+
"$ref": "types.json#/114"
2323
}
2424
},
2525
"resourceFunctions": {},
2626
"settings": {
2727
"name": "MicrosoftGraphBeta",
28-
"version": "1.1.0-preview",
28+
"version": "1.0.1-preview",
2929
"isSingleton": false,
3030
"configurationType": {
31-
"$ref": "types.json#/117"
31+
"$ref": "types.json#/116"
3232
}
3333
}
3434
}

generated/microsoftgraph/microsoft.graph/beta/1.1.0-preview/index.md renamed to generated/microsoftgraph/microsoft.graph/beta/1.0.1-preview/index.md

File renamed without changes.

0 commit comments

Comments
 (0)