Skip to content

Commit 0114e5b

Browse files
committed
generated build
1 parent 9281199 commit 0114e5b

File tree

9 files changed

+174
-49
lines changed

9 files changed

+174
-49
lines changed

dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
docEl.addEventListener('before-try', (e) => {
44
e.detail.request.headers.append('AAA-BBB', 'CCC DDDD');
55
});
6-
});</script><body><rapi-doc spec-url="./specs/petstore.yaml" id="thedoc" theme="dark" render-style="read" schema-style="tree" use-path-in-nav-bar="true" show-components="true" show-info="true" show-header="true" allow-search="false" allow-advanced-search="true" allow-spec-url-load="false" allow-spec-file-load="false" allow-spec-file-download="true" allow-server-selection="true" allow-authentication="true" match-type="regex" persist-auth="true"></rapi-doc></body></html>
6+
});</script><body><rapi-doc spec-url="./specs/temp.json" id="thedoc" theme="dark" render-style="read" schema-style="tree" use-path-in-nav-bar="true" show-components="true" show-info="true" show-header="true" allow-search="false" allow-advanced-search="true" allow-spec-url-load="false" allow-spec-file-load="false" allow-spec-file-download="true" allow-server-selection="true" allow-authentication="true" match-type="regex" persist-auth="true"></rapi-doc></body></html>

dist/index.html.gz

-1 Bytes
Binary file not shown.

dist/rapidoc-min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rapidoc-min.js.gz

39 Bytes
Binary file not shown.

dist/rapidoc.js

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2984,7 +2984,7 @@ function splitCells(tableRow, count) {
29842984

29852985
// First/last cell in a row cannot be empty if it has no leading/trailing pipe
29862986
if (!cells[0].trim()) { cells.shift(); }
2987-
if (!cells[cells.length - 1].trim()) { cells.pop(); }
2987+
if (cells.length > 0 && !cells[cells.length - 1].trim()) { cells.pop(); }
29882988

29892989
if (cells.length > count) {
29902990
cells.splice(count);
@@ -3433,7 +3433,7 @@ class Tokenizer {
34333433
type: 'table',
34343434
header: splitCells(cap[1]).map(c => { return { text: c }; }),
34353435
align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
3436-
rows: cap[3] ? cap[3].replace(/\n[ \t]*$/, '').split('\n') : []
3436+
rows: cap[3] && cap[3].trim() ? cap[3].replace(/\n[ \t]*$/, '').split('\n') : []
34373437
};
34383438

34393439
if (item.header.length === item.align.length) {
@@ -7633,7 +7633,7 @@ var http$1 = {};
76337633

76347634
return exports;
76357635

7636-
})({}));
7636+
}))({});
76377637
})(typeof self !== 'undefined' ? self : globalThis);
76387638

76397639
/* eslint complexity: [2, 18], max-statements: [2, 33] */
@@ -16479,7 +16479,14 @@ var _default$4 = {
1647916479
});
1648016480
patches.push(...absoluteRefPatches);
1648116481
return undefined;
16482-
}); // Merge back the values from the original definition
16482+
}); // If there was an example in the original definition,
16483+
// keep it instead of merging with examples from other schema
16484+
16485+
if (originalDefinitionObj.example) {
16486+
// Delete other schema examples
16487+
patches.push(specmap.remove([].concat(parent, 'example')));
16488+
} // Merge back the values from the original definition
16489+
1648316490

1648416491
patches.push(specmap.mergeDeep(parent, originalDefinitionObj)); // If there was not an original $$ref value, make sure to remove
1648516492
// any $$ref value that may exist from the result of `allOf` merges
@@ -21933,11 +21940,13 @@ async function ProcessSpec(specUrl, generateMissingTags = false, sortTags = fals
2193321940

2193421941
if (typeof specUrl === 'string') {
2193521942
specMeta = await index.resolve({
21936-
url: specUrl
21943+
url: specUrl,
21944+
allowMetaPatches: false
2193721945
}); // Swagger(specUrl);
2193821946
} else {
2193921947
specMeta = await index.resolve({
21940-
spec: specUrl
21948+
spec: specUrl,
21949+
allowMetaPatches: false
2194121950
}); // Swagger({ spec: specUrl });
2194221951
}
2194321952

@@ -27466,10 +27475,13 @@ class RapiDoc extends LitElement {
2746627475
const locationHash = (_window$location$hash = window.location.hash) === null || _window$location$hash === void 0 ? void 0 : _window$location$hash.substring(1);
2746727476

2746827477
if (locationHash) {
27478+
const regEx = new RegExp(`^${this.routePrefix}`, 'i');
27479+
const elementId = window.location.hash.replace(regEx, '');
27480+
2746927481
if (this.renderStyle === 'view') {
27470-
this.expandAndGotoOperation(locationHash, true, true);
27482+
this.expandAndGotoOperation(elementId, true, true);
2747127483
} else {
27472-
this.scrollTo(locationHash);
27484+
this.scrollTo(elementId);
2747327485
}
2747427486
} else if (this.renderStyle === 'focused') {
2747527487
var _this$resolvedSpec$ta;
@@ -34241,7 +34253,7 @@ Prism.languages.js = Prism.languages.javascript;
3424134253
/******/
3424234254
/******/ /* webpack/runtime/getFullHash */
3424334255
/******/ (() => {
34244-
/******/ __webpack_require__.h = () => ("1eec880843fe59401dc9")
34256+
/******/ __webpack_require__.h = () => ("df05e226319ffb7a972b")
3424534257
/******/ })();
3424634258
/******/
3424734259
/******/ /* webpack/runtime/global */

dist/report.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/rapidoc-min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/rapidoc.js

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2984,7 +2984,7 @@ function splitCells(tableRow, count) {
29842984

29852985
// First/last cell in a row cannot be empty if it has no leading/trailing pipe
29862986
if (!cells[0].trim()) { cells.shift(); }
2987-
if (!cells[cells.length - 1].trim()) { cells.pop(); }
2987+
if (cells.length > 0 && !cells[cells.length - 1].trim()) { cells.pop(); }
29882988

29892989
if (cells.length > count) {
29902990
cells.splice(count);
@@ -3433,7 +3433,7 @@ class Tokenizer {
34333433
type: 'table',
34343434
header: splitCells(cap[1]).map(c => { return { text: c }; }),
34353435
align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
3436-
rows: cap[3] ? cap[3].replace(/\n[ \t]*$/, '').split('\n') : []
3436+
rows: cap[3] && cap[3].trim() ? cap[3].replace(/\n[ \t]*$/, '').split('\n') : []
34373437
};
34383438

34393439
if (item.header.length === item.align.length) {
@@ -7633,7 +7633,7 @@ var http$1 = {};
76337633

76347634
return exports;
76357635

7636-
})({}));
7636+
}))({});
76377637
})(typeof self !== 'undefined' ? self : globalThis);
76387638

76397639
/* eslint complexity: [2, 18], max-statements: [2, 33] */
@@ -16479,7 +16479,14 @@ var _default$4 = {
1647916479
});
1648016480
patches.push(...absoluteRefPatches);
1648116481
return undefined;
16482-
}); // Merge back the values from the original definition
16482+
}); // If there was an example in the original definition,
16483+
// keep it instead of merging with examples from other schema
16484+
16485+
if (originalDefinitionObj.example) {
16486+
// Delete other schema examples
16487+
patches.push(specmap.remove([].concat(parent, 'example')));
16488+
} // Merge back the values from the original definition
16489+
1648316490

1648416491
patches.push(specmap.mergeDeep(parent, originalDefinitionObj)); // If there was not an original $$ref value, make sure to remove
1648516492
// any $$ref value that may exist from the result of `allOf` merges
@@ -21933,11 +21940,13 @@ async function ProcessSpec(specUrl, generateMissingTags = false, sortTags = fals
2193321940

2193421941
if (typeof specUrl === 'string') {
2193521942
specMeta = await index.resolve({
21936-
url: specUrl
21943+
url: specUrl,
21944+
allowMetaPatches: false
2193721945
}); // Swagger(specUrl);
2193821946
} else {
2193921947
specMeta = await index.resolve({
21940-
spec: specUrl
21948+
spec: specUrl,
21949+
allowMetaPatches: false
2194121950
}); // Swagger({ spec: specUrl });
2194221951
}
2194321952

@@ -27466,10 +27475,13 @@ class RapiDoc extends LitElement {
2746627475
const locationHash = (_window$location$hash = window.location.hash) === null || _window$location$hash === void 0 ? void 0 : _window$location$hash.substring(1);
2746727476

2746827477
if (locationHash) {
27478+
const regEx = new RegExp(`^${this.routePrefix}`, 'i');
27479+
const elementId = window.location.hash.replace(regEx, '');
27480+
2746927481
if (this.renderStyle === 'view') {
27470-
this.expandAndGotoOperation(locationHash, true, true);
27482+
this.expandAndGotoOperation(elementId, true, true);
2747127483
} else {
27472-
this.scrollTo(locationHash);
27484+
this.scrollTo(elementId);
2747327485
}
2747427486
} else if (this.renderStyle === 'focused') {
2747527487
var _this$resolvedSpec$ta;
@@ -34241,7 +34253,7 @@ Prism.languages.js = Prism.languages.javascript;
3424134253
/******/
3424234254
/******/ /* webpack/runtime/getFullHash */
3424334255
/******/ (() => {
34244-
/******/ __webpack_require__.h = () => ("1eec880843fe59401dc9")
34256+
/******/ __webpack_require__.h = () => ("df05e226319ffb7a972b")
3424534257
/******/ })();
3424634258
/******/
3424734259
/******/ /* webpack/runtime/global */

docs/specs/temp.json

Lines changed: 127 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,135 @@
11
{
2-
"components": {},
2+
"x-generator": "NSwag v13.13.2.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v12.0.0.0))",
3+
"openapi": "3.0.0",
34
"info": {
4-
"title": "Example Schema",
5-
"version": "0.0.1"
5+
"title": "API",
6+
"version": "1.0.0"
67
},
7-
"openapi": "3.0.3",
8+
"servers": [
9+
{
10+
"url": "http://localhost:8181"
11+
}
12+
],
813
"paths": {
9-
"/api/v1/example": {
10-
"get": {
11-
"operationId": "v1_example",
12-
"description": "Example API",
13-
"parameters": [
14-
{
15-
"in": "query",
16-
"name": "boolean_query_parameter",
17-
"schema": {
18-
"type": "boolean",
19-
"default": false
20-
}
21-
},
22-
{
23-
"in": "query",
24-
"name": "integer_query_parameter",
25-
"schema": {
26-
"type": "integer",
27-
"default": 0
28-
}
29-
}
14+
"/api/employee": {
15+
"get": {
16+
"tags": [
17+
"Employee"
18+
],
19+
"summary": "Get Employees",
20+
"description": "Gets one or more employees",
21+
"operationId": "Employee_GetEmployees",
22+
"parameters": [
23+
{
24+
"name": "ids",
25+
"in": "query",
26+
"style": "form",
27+
"explode": true,
28+
"description": "A comma-delimited list of employee ids/codes to retrieve. If not provided, all employees will be returned.",
29+
"schema": {
30+
"type": "array",
31+
"nullable": true,
32+
"items": {
33+
"type": "string"
34+
}
35+
},
36+
"x-position": 1
37+
},
38+
{
39+
"name": "idType",
40+
"in": "query",
41+
"description": "The type of id: MasterId, EmployeeCode, or TimeWorksPlusId",
42+
"schema": {
43+
"default": "EmployeeCode",
44+
"oneOf": [
45+
{
46+
"$ref": "#/components/schemas/EmployeeIdType"
47+
}
3048
]
49+
},
50+
"x-position": 2
51+
}
52+
],
53+
"responses": {
54+
"200": {
55+
"description": "",
56+
"content": {
57+
"application/json": {
58+
"schema": {
59+
"type": "array",
60+
"items": {
61+
"$ref": "#/components/schemas/Employee"
62+
}
63+
}
64+
}
65+
}
3166
}
67+
}
3268
}
33-
}
69+
}
70+
},
71+
"components": {
72+
"schemas": {
73+
"Employee": {
74+
"type": "object",
75+
"additionalProperties": false,
76+
"required": [
77+
"employeeCode"
78+
],
79+
"properties": {
80+
"employeeCode": {
81+
"type": "string",
82+
"description": "The employee code.",
83+
"maxLength": 20,
84+
"minLength": 1
85+
},
86+
"firstName": {
87+
"type": "string",
88+
"description": "The employee's first name.",
89+
"nullable": true
90+
},
91+
"lastName": {
92+
"type": "string",
93+
"description": "The employee's last name.",
94+
"nullable": true
95+
}
96+
}
97+
},
98+
"EmployeeIdType": {
99+
"type": "string",
100+
"description": "Type of unique identifier to identify the employee.",
101+
"x-enumFlags": true,
102+
"x-enumNames": [
103+
"MasterId",
104+
"EmployeeCode",
105+
"TimeWorksPlusId"
106+
],
107+
"enum": [
108+
"MasterId",
109+
"EmployeeCode",
110+
"TimeWorksPlusId"
111+
]
112+
}
113+
},
114+
"securitySchemes": {
115+
"Authorization": {
116+
"type": "http",
117+
"description": "All API endpoints use JWT Authentication. You must obtain a valid JWT from the SwipeClock Authorization Service",
118+
"name": "Authorization",
119+
"in": "header",
120+
"scheme": "Bearer",
121+
"bearerFormat": "JWT",
122+
"flows": {
123+
"implicit": {
124+
"authorizationUrl": "http://localhost:8181/AuthenticationService/"
125+
}
126+
}
127+
}
128+
}
129+
},
130+
"security": [
131+
{
132+
"Authorization": []
133+
}
134+
]
34135
}

0 commit comments

Comments
 (0)