Skip to content

Commit

Permalink
Add app and SP owners and other updates (#218)
Browse files Browse the repository at this point in the history
* Add app and SP owners and other updates

* PR comments

* Update with latest msgraph-metadata
  • Loading branch information
jason-dou authored Feb 11, 2025
1 parent 8c14daf commit c9f712f
Show file tree
Hide file tree
Showing 15 changed files with 847 additions and 643 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
"$ref": "types.json#/95"
},
"Microsoft.Graph/applications/federatedIdentityCredentials@beta": {
"$ref": "types.json#/100"
"$ref": "types.json#/101"
},
"Microsoft.Graph/oauth2PermissionGrants@beta": {
"$ref": "types.json#/104"
"$ref": "types.json#/105"
},
"Microsoft.Graph/appRoleAssignedTo@beta": {
"$ref": "types.json#/108"
"$ref": "types.json#/109"
},
"Microsoft.Graph/users@beta": {
"$ref": "types.json#/113"
"$ref": "types.json#/114"
}
},
"resourceFunctions": {},
Expand All @@ -28,7 +28,7 @@
"version": "0.1.10-preview",
"isSingleton": false,
"configurationType": {
"$ref": "types.json#/114"
"$ref": "types.json#/115"
}
}
}
230 changes: 139 additions & 91 deletions generated/microsoftgraph/microsoft.graph/beta/0.1.10-preview/types.json

Large diffs are not rendered by default.

169 changes: 89 additions & 80 deletions generated/microsoftgraph/microsoft.graph/beta/0.1.10-preview/types.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

148 changes: 75 additions & 73 deletions generated/microsoftgraph/microsoft.graph/v1.0/0.1.10-preview/types.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion msgraph-metadata
Submodule msgraph-metadata updated 41 files
+1 −1 .github/workflows/metadata-parser-validation.yml
+1 −1 .github/workflows/openapi-parser-validation.yml
+2,114 −705 clean_beta_metadata/cleanMetadata.xml
+9,078 −6,189 clean_beta_metadata/cleanMetadataWithDescriptionsAndAnnotationsAndErrorsbeta.xml
+9,104 −6,215 clean_beta_metadata/cleanMetadataWithDescriptionsAndAnnotationsbeta.xml
+9,046 −6,303 clean_beta_metadata/cleanMetadataWithDescriptionsbeta.xml
+251 −21 clean_v10_metadata/cleanMetadata.xml
+5,630 −4,818 clean_v10_metadata/cleanMetadataWithDescriptionsAndAnnotationsAndErrorsv1.0.xml
+5,638 −4,826 clean_v10_metadata/cleanMetadataWithDescriptionsAndAnnotationsv1.0.xml
+5,638 −4,826 clean_v10_metadata/cleanMetadataWithDescriptionsv1.0.xml
+22,131 −8,411 openapi/beta/default.yaml
+24,319 −8,178 openapi/beta/graphexplorer.yaml
+24,106 −9,666 openapi/beta/openapi.yaml
+22,336 −8,527 openapi/beta/powershell_v2.yaml
+11,291 −2,242 openapi/v1.0/default.yaml
+13,735 −1,591 openapi/v1.0/graphexplorer.yaml
+12,661 −3,897 openapi/v1.0/openapi.yaml
+11,023 −1,880 openapi/v1.0/powershell_v2.yaml
+2,118 −763 schemas/annotated-beta-Prod.csdl
+229 −21 schemas/annotated-v1.0-Prod.csdl
+686 −0 schemas/beta-Bleu.csdl
+686 −0 schemas/beta-Delos.csdl
+1,345 −70 schemas/beta-Fairfax.csdl
+686 −0 schemas/beta-GovSG.csdl
+535 −36 schemas/beta-Mooncake.csdl
+2,118 −763 schemas/beta-Prod.csdl
+151 −2 schemas/beta-USNat.csdl
+151 −2 schemas/beta-USSec.csdl
+686 −0 schemas/v1.0-Bleu.csdl
+686 −0 schemas/v1.0-Delos.csdl
+113 −24 schemas/v1.0-Fairfax.csdl
+686 −0 schemas/v1.0-GovSG.csdl
+24 −24 schemas/v1.0-Mooncake.csdl
+229 −21 schemas/v1.0-Prod.csdl
+11 −0 schemas/v1.0-USNat.csdl
+11 −0 schemas/v1.0-USSec.csdl
+1 −1 scripts/run-metadata-validation.ps1
+2 −2 scripts/run-openapi-validation.ps1
+30 −1 transforms/csdl/preprocess_csdl.xsl
+26 −0 transforms/csdl/preprocess_csdl_test_input.xml
+58 −0 transforms/csdl/preprocess_csdl_test_output.xml
11 changes: 10 additions & 1 deletion src/swagger-generation/configs/beta/0.1.10-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ EntityTypes:
- certification
- createdDateTime
- publisherDomain
Relationships:
NeedsBatch: true
BulkLimit: 20
Properties:
- owners
- Name: microsoft.graph.servicePrincipal
RootUri: /servicePrincipals
Upsertable: true
Expand All @@ -159,6 +164,11 @@ EntityTypes:
- applicationTemplateId
- appOwnerOrganizationId
- signInAudience
Relationships:
NeedsBatch: true
BulkLimit: 20
Properties:
- owners
- Name: microsoft.graph.federatedIdentityCredential
RootUri: /applications/federatedIdentityCredentials
Upsertable: true
Expand All @@ -167,7 +177,6 @@ EntityTypes:
- audiences
- issuer
- name
- subject
- Name: microsoft.graph.oAuth2PermissionGrant
RootUri: /oauth2PermissionGrants
Upsertable: false
Expand Down
10 changes: 10 additions & 0 deletions src/swagger-generation/configs/v1.0/0.1.10-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ EntityTypes:
- certification
- createdDateTime
- publisherDomain
Relationships:
NeedsBatch: true
BulkLimit: 20
Properties:
- owners
- Name: microsoft.graph.servicePrincipal
RootUri: /servicePrincipals
Upsertable: true
Expand All @@ -144,6 +149,11 @@ EntityTypes:
- appOwnerOrganizationId
- resourceSpecificApplicationPermissions
- signInAudience
Relationships:
NeedsBatch: true
BulkLimit: 20
Properties:
- owners
- Name: microsoft.graph.federatedIdentityCredential
RootUri: /applications/federatedIdentityCredentials
Upsertable: true
Expand Down
48 changes: 44 additions & 4 deletions src/swagger-generation/output/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -459,27 +459,67 @@
"isIdempotent": true,
"updatable": true,
"alternateKey": "uniqueName",
"isContainment": false
"isContainment": false,
"relationshipMetadata": {
"needsBatch": true,
"bulkLimit": 20,
"properties": [
{
"name": "owners",
"type": "directoryObjects"
}
]
}
},
"v1.0": {
"isIdempotent": true,
"updatable": true,
"alternateKey": "uniqueName",
"isContainment": false
"isContainment": false,
"relationshipMetadata": {
"needsBatch": true,
"bulkLimit": 20,
"properties": [
{
"name": "owners",
"type": "directoryObjects"
}
]
}
}
},
"servicePrincipals": {
"beta": {
"isIdempotent": true,
"updatable": true,
"alternateKey": "appId",
"isContainment": false
"isContainment": false,
"relationshipMetadata": {
"needsBatch": true,
"bulkLimit": 20,
"properties": [
{
"name": "owners",
"type": "directoryObjects"
}
]
}
},
"v1.0": {
"isIdempotent": true,
"updatable": true,
"alternateKey": "appId",
"isContainment": false
"isContainment": false,
"relationshipMetadata": {
"needsBatch": true,
"bulkLimit": 20,
"properties": [
{
"name": "owners",
"type": "directoryObjects"
}
]
}
}
},
"applications/federatedIdentityCredentials": {
Expand Down
191 changes: 108 additions & 83 deletions src/swagger-generation/output/microsoftgraph-beta-0.1.10-preview.json

Large diffs are not rendered by default.

154 changes: 81 additions & 73 deletions src/swagger-generation/output/microsoftgraph-v1.0-0.1.10-preview.json

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/swagger-generation/src/deserializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,5 +317,11 @@ const filterDescription = (description: string, isAlternateKey: boolean): string
return !hasUnhelpfulWord && !hasReadonlyForAlternateKey;
});

return filteredSentences.join('. ').trim();
// Combine all sentences and add a trailing period if not already present
let combinedDescription = filteredSentences.join('. ').trim();
if (combinedDescription && !combinedDescription.endsWith('.')) {
combinedDescription += '.';
}

return combinedDescription
}
4 changes: 2 additions & 2 deletions src/swagger-generation/tests/deserializer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@ describe('constructDataStructure', () => {
expect(propertyWithDescription).toBeDefined();
expect(propertyWithNoDescription).toBeDefined();
expect(altenernateKeyWithDescription).toBeDefined();
expect(propertyWithDescription?.Description).toBe('Description of propertyName. Optional');
expect(propertyWithDescription?.Description).toBe('Description of propertyName. Optional.');
expect(propertyWithNoDescription?.Description).toBe('')
expect(altenernateKeyWithDescription?.Description).toBe('Alternate key of the entity. Required');
expect(altenernateKeyWithDescription?.Description).toBe('Alternate key of the entity. Required.');
});

it('should deserialize alternate keys', () => {
Expand Down
Loading

0 comments on commit c9f712f

Please sign in to comment.