Skip to content

Commit 8d5e697

Browse files
authored
Swagger Generation: Navigation properties (#25)
* Implement readonly deserialization and swagger output * Implement optional URI to expose entities from config * Add test for readonly. Revert config singleton * Remove debug logs * Implement navigation properties * Add extra validation for config. Remove wrong config * Implement testing for Navigation properties * Simplify colletion check in navigation properties
1 parent f0fba3e commit 8d5e697

16 files changed

+852
-420
lines changed

swagger-generation/config.yaml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ URL: https://graph.microsoft.com/beta/$metadata
44
# Version with which the api will be generated in the swagger document
55
apiVersion: beta
66

7-
# List of entity types to be exposed in the swagger document
7+
# List of entity types to generate swagger from.
8+
# - Name: Name of the entity type
9+
# RootUri: Path to the entity in swagger document. If missing, the entity will not be exposed
10+
# NavigationPropertyMode: Mode to generate navigation properties. Possible values are:
11+
# - Allow: All properties from the list will be generated, properties not in the list will be ignored
12+
# - Ignore: All properties from the list will be ignored, properties not in the list will be generated
13+
# If missing, the default value is Allow
14+
# NavigationProperty: List of navigation properties used in the option before
15+
# RequiredOnWrite: List of properties that are required on write
16+
# ReadOnly: List of properties that are read only
817
EntityTypes:
918
- Name: microsoft.graph.group
1019
RootUri: /groups
@@ -16,14 +25,30 @@ EntityTypes:
1625
- mailEnabled
1726
- mailNickname
1827
- securityEnabled
28+
ReadOnly:
29+
- createdDateTime
30+
- expirationDateTime
31+
- mail
32+
- onPremisesLastSyncDateTime
33+
- onPremisesSamAccountName
34+
- onPremisesSecurityIdentifier
35+
- onPremisesSyncEnabled
36+
- proxyAddresses
37+
- renewedDateTime
1938
- Name: microsoft.graph.application
2039
RootUri: /applications
2140
RequiredOnWrite:
2241
- displayName
42+
ReadOnly:
43+
- certification
44+
- createdDateTime
2345
- Name: microsoft.graph.servicePrincipal
2446
RootUri: /servicePrincipals
2547
RequiredOnWrite:
2648
- appId
49+
ReadOnly:
50+
- applicationTemplateId
51+
- signInAudience
2752
- Name: microsoft.graph.oAuth2PermissionGrant
2853
RootUri: /oauth2PermissionGrants
2954
RequiredOnWrite:
@@ -36,3 +61,20 @@ EntityTypes:
3661
- resourceId
3762
- principalId
3863
- appRoleId
64+
ReadOnly:
65+
- creationTimestamp
66+
- principalDisplayName
67+
- principalType
68+
- Name: microsoft.graph.appRole
69+
ReadOnly:
70+
- origin
71+
- Name: microsoft.graph.informationalUrl
72+
ReadOnly:
73+
- logoUrl
74+
- Name: microsoft.graph.passwordCredential
75+
ReadOnly:
76+
- hint
77+
- secretText
78+
- Name: microsoft.graph.windowsApplication
79+
ReadOnly:
80+
- packageSid

0 commit comments

Comments
 (0)