Skip to content

Commit

Permalink
Add relationship types to Graph Bicep (#217)
Browse files Browse the repository at this point in the history
* Add relationship type and extension config

* Update relationship name and description

* Fix tests and more updates
  • Loading branch information
jason-dou authored Jan 31, 2025
1 parent 5f886e6 commit 8c14daf
Show file tree
Hide file tree
Showing 34 changed files with 16,404 additions and 2,376 deletions.
32 changes: 1 addition & 31 deletions docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,40 +40,10 @@ cd ../swagger-generation/configs
Create new yml files (following the existing naming convention and a new semantic version) under the `beta` and `v1.0` folders.
Edit the new yml files, with new types, properties and/or property annotation changes.
#### Configure which versions need generation
1. Update extensionConfig
From the root folder `/msgraph-bicep-types`:
```sh
notepad src/extensionConfigs/extensionConfig.json
```
Update the version numbers and save the file.
1. Add the new swagger version file names (to be generated in the next step).
From the root folder `/msgraph-bicep-types`:
```sh
notepad swagger/specification/microsoftgraph/preview/readme.md
```
Edit the YML `input-file` sections to append the latest versions for beta and v1.0. Something like:
```yml
input-file:
- microsoftgraph/preview/beta/0.1.8-preview.json
- microsoftgraph/preview/beta/0.1.9-preview.json <-- appending new version
input-file:
- microsoftgraph/preview/v1.0/0.1.8-preview.json
- microsoftgraph/preview/v1.0/0.1.9-preview.json <-- appending new version
```
### Generate the new types
From the root folder `/msgraph-bicep-types` run the following PowerShell script
From the root folder `/msgraph-bicep-types` run the following PowerShell script to generate types for the latest version
```sh
.\scripts\UpdateGeneratedTypes.ps1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"resources": {
"Microsoft.Graph/groups@beta": {
"$ref": "types.json#/21"
},
"Microsoft.Graph/applications@beta": {
"$ref": "types.json#/77"
},
"Microsoft.Graph/servicePrincipals@beta": {
"$ref": "types.json#/95"
},
"Microsoft.Graph/applications/federatedIdentityCredentials@beta": {
"$ref": "types.json#/100"
},
"Microsoft.Graph/oauth2PermissionGrants@beta": {
"$ref": "types.json#/104"
},
"Microsoft.Graph/appRoleAssignedTo@beta": {
"$ref": "types.json#/108"
},
"Microsoft.Graph/users@beta": {
"$ref": "types.json#/113"
}
},
"resourceFunctions": {},
"settings": {
"name": "MicrosoftGraphBeta",
"version": "0.1.10-preview",
"isSingleton": false,
"configurationType": {
"$ref": "types.json#/114"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Bicep Types
## microsoft.graph
### microsoft.graph/applications
* **Link**: [beta](types.md#resource-microsoftgraphapplicationsbeta)

### microsoft.graph/applications/federatedidentitycredentials
* **Link**: [beta](types.md#resource-microsoftgraphapplicationsfederatedidentitycredentialsbeta)

### microsoft.graph/approleassignedto
* **Link**: [beta](types.md#resource-microsoftgraphapproleassignedtobeta)

### microsoft.graph/groups
* **Link**: [beta](types.md#resource-microsoftgraphgroupsbeta)

### microsoft.graph/oauth2permissiongrants
* **Link**: [beta](types.md#resource-microsoftgraphoauth2permissiongrantsbeta)

### microsoft.graph/serviceprincipals
* **Link**: [beta](types.md#resource-microsoftgraphserviceprincipalsbeta)

### microsoft.graph/users
* **Link**: [beta](types.md#resource-microsoftgraphusersbeta)

Loading

0 comments on commit 8c14daf

Please sign in to comment.