Skip to content
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

Add relationship types to Graph Bicep #217

Merged
merged 4 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading