Skip to content

Commit 56fbef1

Browse files
heiskrCopilot
andauthored
🐞 Fix and re-enable validate-openapi-check workflow (#60531)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 72dccb2 commit 56fbef1

File tree

2 files changed

+59
-4
lines changed

2 files changed

+59
-4
lines changed

.github/workflows/validate-openapi-check.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- 'src/rest/scripts/openapi-check.ts'
1313
- 'src/rest/scripts/utils/get-operations.ts'
1414
- 'src/rest/scripts/utils/operation.ts'
15-
# In case dependencies change
15+
- 'src/rest/fixtures/openapi-check-fixture.json'
1616
- 'package.json'
1717
- 'package-lock.json'
1818
- 'tsconfig.json'
@@ -39,10 +39,10 @@ jobs:
3939
4040
- name: Test Docker image with sample OpenAPI file
4141
run: |
42-
docker run --rm openapi-decorator:test -f "src/rest/data/fpt-2022-11-28/schema.json"
42+
docker run --rm openapi-decorator:test -f "src/rest/fixtures/openapi-check-fixture.json"
4343
4444
- name: Test Docker image with multiple OpenAPI files
4545
run: |
4646
docker run --rm openapi-decorator:test \
47-
-f "src/rest/data/fpt-2022-11-28/schema.json" \
48-
"src/rest/data/ghec-2022-11-28/schema.json"
47+
-f "src/rest/fixtures/openapi-check-fixture.json" \
48+
"src/rest/fixtures/openapi-check-fixture.json"
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"openapi": "3.1.0",
3+
"info": {
4+
"title": "OpenAPI Check Fixture",
5+
"version": "1.0.0"
6+
},
7+
"servers": [
8+
{
9+
"url": "https://api.github.com"
10+
}
11+
],
12+
"paths": {
13+
"/fixture/test": {
14+
"get": {
15+
"summary": "Test endpoint for openapi-check validation",
16+
"operationId": "fixture/test",
17+
"tags": ["fixture"],
18+
"externalDocs": {
19+
"description": "API method documentation",
20+
"url": "https://docs.github.com/rest"
21+
},
22+
"parameters": [],
23+
"responses": {
24+
"200": {
25+
"description": "OK",
26+
"content": {
27+
"application/json": {
28+
"schema": {
29+
"type": "object",
30+
"properties": {
31+
"message": {
32+
"type": "string"
33+
}
34+
}
35+
},
36+
"examples": {
37+
"default": {
38+
"value": {
39+
"message": "success"
40+
}
41+
}
42+
}
43+
}
44+
}
45+
}
46+
},
47+
"x-github": {
48+
"githubCloudOnly": false,
49+
"category": "fixture",
50+
"subcategory": "test"
51+
}
52+
}
53+
}
54+
}
55+
}

0 commit comments

Comments
 (0)