File tree Expand file tree Collapse file tree 2 files changed +80
-0
lines changed
test/Microsoft.OpenApi.Readers.Tests/V3Tests Expand file tree Collapse file tree 2 files changed +80
-0
lines changed Original file line number Diff line number Diff line change @@ -1403,5 +1403,17 @@ public async Task ParseDocumentWithEmptyPathsSucceeds()
14031403 var result = await OpenApiDocument . LoadAsync ( Path . Combine ( SampleFolderPath , "docWithEmptyPaths.yaml" ) ) ;
14041404 Assert . Empty ( result . Diagnostic . Errors ) ;
14051405 }
1406+
1407+ [ Fact ]
1408+ public async Task ParseDocumentWithExampleReferencesPasses ( )
1409+ {
1410+ // Act & Assert: Ensure no NullReferenceException is thrown
1411+ Func < Task > act = async ( ) =>
1412+ {
1413+ await OpenApiDocument . LoadAsync ( System . IO . Path . Combine ( SampleFolderPath , "docWithExampleReferences.yaml" ) ) ;
1414+ } ;
1415+
1416+ await act . Should ( ) . NotThrowAsync < NullReferenceException > ( ) ;
1417+ }
14061418 }
14071419}
Original file line number Diff line number Diff line change 1+ openapi : 3.0.3
2+ info :
3+ version : 1.1.4
4+ title : GitHub v3 REST API
5+ description : GitHub's v3 REST API.
6+ paths :
7+ /actions/hosted-runners/{hosted_runner_id} :
8+ get :
9+ summary : Get a GitHub-hosted runner for an organization
10+ description : |-
11+ Gets a GitHub-hosted runner configured in an organization.
12+ OAuth app tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint.
13+ responses :
14+ ' 200 ' :
15+ description : Response
16+ content :
17+ application/json :
18+ schema :
19+ " $ref " : " #/components/schemas/actions-hosted-runner"
20+ examples :
21+ default :
22+ " $ref " : " #/components/examples/actions-hosted-runner"
23+ /oidc/customization/sub :
24+ get :
25+ summary : Get the customization template for an OIDC subject claim for an organization
26+ description : |-
27+ Gets the customization template for an OpenID Connect (OIDC) subject claim.
28+ OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint.
29+ requestBody :
30+ required : true
31+ content :
32+ application/json :
33+ schema :
34+ " $ref " : " #/components/schemas/oidc-custom-sub"
35+ examples :
36+ default :
37+ " $ref " : " #/components/examples/oidc-custom-sub"
38+ responses :
39+ ' 200 ' :
40+ description : A JSON serialized template for OIDC subject claim customization
41+ content :
42+ application/json :
43+ schema :
44+ " $ref " : " #/components/schemas/oidc-custom-sub"
45+ components :
46+ schemas :
47+ actions-hosted-runner :
48+ title : GitHub-hosted runner
49+ type : object
50+ oidc-custom-sub :
51+ title : Actions OIDC Subject customization
52+ description : Actions OIDC Subject customization
53+ type : object
54+ examples :
55+ actions-hosted-runner :
56+ value :
57+ id : 5
58+ name : My hosted ubuntu runner
59+ runner_group_id : 2
60+ platform : linux-x64
61+ oidc-custom-sub :
62+ value :
63+ include_claim_keys :
64+ - repo
65+ - context
66+
67+
68+
You can’t perform that action at this time.
0 commit comments