Skip to content

Commit 5de87cd

Browse files
committed
generated build
1 parent 8822e9d commit 5de87cd

14 files changed

+333
-231
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/temp.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" update-route="false" match-type="regex" persist-auth="true"></rapi-doc></body></html>
6+
});</script><body><rapi-doc spec-url="./specs/aaa.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" update-route="false" 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: 98 additions & 98 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rapidoc-min.js.LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
/**
6262
* @preserve
63-
* RapiDoc 9.1.8 - WebComponent to View OpenAPI docs
63+
* RapiDoc 9.2.0-beta - WebComponent to View OpenAPI docs
6464
* License: MIT
6565
* Repo : https://github.com/mrin9/RapiDoc
6666
* Author : Mrinmoy Majumdar

dist/rapidoc-min.js.LICENSE.txt.gz

4 Bytes
Binary file not shown.

dist/rapidoc-min.js.gz

243 Bytes
Binary file not shown.

dist/rapidoc-min.js.map

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.map.gz

302 Bytes
Binary file not shown.

dist/rapidoc.js

Lines changed: 65 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
/**
33
* @preserve
4-
* RapiDoc 9.1.8 - WebComponent to View OpenAPI docs
4+
* RapiDoc 9.2.0-beta - WebComponent to View OpenAPI docs
55
* License: MIT
66
* Repo : https://github.com/mrin9/RapiDoc
77
* Author : Mrinmoy Majumdar
@@ -28973,6 +28973,44 @@ function schemaToSampleObj(schema, config = {}) {
2897328973

2897428974
return obj;
2897528975
}
28976+
28977+
function generateMarkdownForArrayAndObjectDescription(schema, level = 0) {
28978+
var _schema$items5;
28979+
28980+
let markdown = '';
28981+
28982+
if (schema.title) {
28983+
markdown = `**${schema.title}:** `;
28984+
}
28985+
28986+
if (schema.minItems) {
28987+
markdown = `${markdown} **Min Items:** ${schema.minItems}`;
28988+
}
28989+
28990+
if (schema.maxItems) {
28991+
markdown = `${markdown} **Max Items:** ${schema.maxItems}`;
28992+
}
28993+
28994+
if (schema.description) {
28995+
markdown = `${markdown} ${schema.description}`;
28996+
}
28997+
28998+
if (level > 0 && (_schema$items5 = schema.items) !== null && _schema$items5 !== void 0 && _schema$items5.description) {
28999+
let itemsMarkdown = '';
29000+
29001+
if (schema.items.minProperties) {
29002+
itemsMarkdown = `**Min Properties:** ${schema.items.minProperties}`;
29003+
}
29004+
29005+
if (schema.items.maxProperties) {
29006+
itemsMarkdown = `${itemsMarkdown} **Max Properties:** ${schema.items.maxProperties}`;
29007+
}
29008+
29009+
markdown = `${markdown} ⮕ ${itemsMarkdown} [ ${schema.items.description} ] `;
29010+
}
29011+
29012+
return markdown;
29013+
}
2897629014
/**
2897729015
* For changing OpenAPI-Schema to an Object Notation,
2897829016
* This Object would further be an input to UI Components to generate an Object-Tree
@@ -28982,6 +29020,7 @@ function schemaToSampleObj(schema, config = {}) {
2898229020
* @param {string} suffix - used for suffixing property names to avoid duplicate props during object composion
2898329021
*/
2898429022

29023+
2898529024
function schemaInObjectNotation(schema, obj, level = 0, suffix = '') {
2898629025
if (!schema) {
2898729026
return;
@@ -29104,6 +29143,7 @@ function schemaInObjectNotation(schema, obj, level = 0, suffix = '') {
2910429143
} else if (v === 'object') {
2910529144
// If object type iterate all the properties and create an object-type-option
2910629145
const objTypeOption = {
29146+
'::title': schema.title || '',
2910729147
'::description': schema.description || '',
2910829148
'::type': 'object',
2910929149
'::deprecated': schema.deprecated || false
@@ -29120,6 +29160,7 @@ function schemaInObjectNotation(schema, obj, level = 0, suffix = '') {
2912029160
multiTypeOptions[`::OPTION~${i + 1}`] = objTypeOption;
2912129161
} else if (v === 'array') {
2912229162
multiTypeOptions[`::OPTION~${i + 1}`] = {
29163+
'::title': schema.title || '',
2912329164
'::description': schema.description || '',
2912429165
'::type': 'array',
2912529166
'::props': schemaInObjectNotation(schema.items, {}, level + 1)
@@ -29130,7 +29171,9 @@ function schemaInObjectNotation(schema, obj, level = 0, suffix = '') {
2913029171
obj['::ONE~OF'] = multiTypeOptions;
2913129172
}
2913229173
} else if (schema.type === 'object' || schema.properties) {
29133-
obj['::description'] = schema.description || '';
29174+
// If Object
29175+
obj['::title'] = schema.title || '';
29176+
obj['::description'] = generateMarkdownForArrayAndObjectDescription(schema, level);
2913429177
obj['::type'] = 'object';
2913529178
obj['::deprecated'] = schema.deprecated || false;
2913629179
obj['::readwrite'] = schema.readOnly ? 'readonly' : schema.writeOnly ? 'writeonly' : '';
@@ -29147,10 +29190,9 @@ function schemaInObjectNotation(schema, obj, level = 0, suffix = '') {
2914729190
obj['<any-key>'] = schemaInObjectNotation(schema.additionalProperties, {});
2914829191
}
2914929192
} else if (schema.type === 'array' || schema.items) {
29150-
var _schema$items5;
29151-
2915229193
// If Array
29153-
obj['::description'] = schema.description ? schema.description : (_schema$items5 = schema.items) !== null && _schema$items5 !== void 0 && _schema$items5.description ? `array&lt;${schema.items.description}&gt;` : '';
29194+
obj['::title'] = schema.title || '';
29195+
obj['::description'] = generateMarkdownForArrayAndObjectDescription(schema, level);
2915429196
obj['::type'] = 'array';
2915529197
obj['::deprecated'] = schema.deprecated || false;
2915629198
obj['::readwrite'] = schema.readOnly ? 'readonly' : schema.writeOnly ? 'writeonly' : '';
@@ -29307,6 +29349,15 @@ function generateExample(schema, mimeType, examples = '', example = '', includeR
2930729349
exampleValue
2930829350
});
2930929351
}
29352+
} else if (mimeType !== null && mimeType !== void 0 && mimeType.toLowerCase().includes('jose')) {
29353+
finalExamples.push({
29354+
exampleId: 'Example',
29355+
exampleSummary: 'Base64 Encoded',
29356+
exampleDescription: '',
29357+
exampleType: mimeType,
29358+
exampleValue: schema.pattern || 'bXJpbg==',
29359+
exampleFormat: 'text'
29360+
});
2931029361
} else {
2931129362
finalExamples.push({
2931229363
exampleId: 'Example',
@@ -29853,7 +29904,7 @@ class SchemaTree extends lit_element_s {
2985329904
<div class='inside-bracket ${data['::type'] || 'no-type-info'}' style='padding-left:${data['::type'] === 'xxx-of-option' || data['::type'] === 'xxx-of-array' ? 0 : leftPadding}px;'>
2985429905
${Array.isArray(data) && data[0] ? $`${this.generateTree(data[0], 'xxx-of-option', '', '::ARRAY~OF', '', newSchemaLevel, newIndentLevel, data[0]['::readwrite'])}` : $`
2985529906
${Object.keys(data).map(dataKey => $`
29856-
${['::description', '::type', '::props', '::deprecated', '::array-type', '::readwrite'].includes(dataKey) ? data[dataKey]['::type'] === 'array' || data[dataKey]['::type'] === 'object' ? $`${this.generateTree(data[dataKey]['::type'] === 'array' ? data[dataKey]['::props'] : data[dataKey], data[dataKey]['::type'], data[dataKey]['::array-type'] || '', dataKey, data[dataKey]['::description'], newSchemaLevel, newIndentLevel, data[dataKey]['::readwrite'] ? data[dataKey]['::readwrite'] : '')}` : '' : $`${this.generateTree(data[dataKey]['::type'] === 'array' ? data[dataKey]['::props'] : data[dataKey], data[dataKey]['::type'], data[dataKey]['::array-type'] || '', dataKey, data[dataKey]['::description'], newSchemaLevel, newIndentLevel, data[dataKey]['::readwrite'] ? data[dataKey]['::readwrite'] : '')}`}
29907+
${['::title', '::description', '::type', '::props', '::deprecated', '::array-type', '::readwrite'].includes(dataKey) ? data[dataKey]['::type'] === 'array' || data[dataKey]['::type'] === 'object' ? $`${this.generateTree(data[dataKey]['::type'] === 'array' ? data[dataKey]['::props'] : data[dataKey], data[dataKey]['::type'], data[dataKey]['::array-type'] || '', dataKey, data[dataKey]['::description'], newSchemaLevel, newIndentLevel, data[dataKey]['::readwrite'] ? data[dataKey]['::readwrite'] : '')}` : '' : $`${this.generateTree(data[dataKey]['::type'] === 'array' ? data[dataKey]['::props'] : data[dataKey], data[dataKey]['::type'], data[dataKey]['::array-type'] || '', dataKey, data[dataKey]['::description'], newSchemaLevel, newIndentLevel, data[dataKey]['::readwrite'] ? data[dataKey]['::readwrite'] : '')}`}
2985729908
`)}
2985829909
`}
2985929910
</div>
@@ -29862,7 +29913,7 @@ class SchemaTree extends lit_element_s {
2986229913
} // For Primitive types and array of Primitives
2986329914

2986429915

29865-
const [type, primitiveReadOrWrite, constraint, defaultValue, allowedValues, pattern, schemaDescription,, deprecated] = data.split('~|~');
29916+
const [type, primitiveReadOrWrite, constraint, defaultValue, allowedValues, pattern, schemaDescription, schemaTitle, deprecated] = data.split('~|~');
2986629917

2986729918
if (primitiveReadOrWrite === '🆁' && this.schemaHideReadOnly === 'true') {
2986829919
return;
@@ -29907,7 +29958,7 @@ class SchemaTree extends lit_element_s {
2990729958
${defaultValue ? $`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>Default: </span>${defaultValue}</div>` : ''}
2990829959
${allowedValues ? $`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>Allowed: </span>${allowedValues}</div>` : ''}
2990929960
${pattern ? $`<div style='display:inline-block; line-break: anywhere; margin-right:8px'><span class='bold-text'>Pattern: </span>${pattern}</div>` : ''}
29910-
${schemaDescription ? $`<span class="m-markdown-small">${unsafe_html_o(marked(schemaDescription))}</span>` : ''}
29961+
${schemaDescription ? $`<span class="m-markdown-small">${unsafe_html_o(marked(`${schemaTitle ? `**${schemaTitle}:**` : ''} ${schemaDescription}`))}</span>` : ''}
2991129962
</div>
2991229963
</div>
2991329964
`;
@@ -30667,7 +30718,7 @@ class ApiRequest extends lit_element_s {
3066730718
let schemaAsObj;
3066830719
let reqBodyExamples = [];
3066930720

30670-
if (this.selectedRequestBodyType.includes('json') || this.selectedRequestBodyType.includes('xml') || this.selectedRequestBodyType.includes('text')) {
30721+
if (this.selectedRequestBodyType.includes('json') || this.selectedRequestBodyType.includes('xml') || this.selectedRequestBodyType.includes('text') || this.selectedRequestBodyType.includes('jose')) {
3067130722
// Generate Example
3067230723
if (reqBody.mimeType === this.selectedRequestBodyType) {
3067330724
reqBodyExamples = generateExample(reqBody.schema, reqBody.mimeType, reqBody.examples, reqBody.example, false, true, 'text', false);
@@ -30734,7 +30785,7 @@ class ApiRequest extends lit_element_s {
3073430785
} // Generate Schema
3073530786

3073630787

30737-
if (reqBody.mimeType.includes('json') || reqBody.mimeType.includes('xml') || reqBody.mimeType.includes('text')) {
30788+
if (reqBody.mimeType.includes('json') || reqBody.mimeType.includes('xml') || reqBody.mimeType.includes('text') || this.selectedRequestBodyType.includes('jose')) {
3073830789
schemaAsObj = schemaInObjectNotation(reqBody.schema, {});
3073930790

3074030791
if (this.schemaStyle === 'table') {
@@ -30778,7 +30829,7 @@ class ApiRequest extends lit_element_s {
3077830829
</div>
3077930830
${this.request_body.description ? $`<div class="m-markdown" style="margin-bottom:12px">${unsafe_html_o(marked(this.request_body.description))}</div>` : ''}
3078030831

30781-
${this.selectedRequestBodyType.includes('json') || this.selectedRequestBodyType.includes('xml') || this.selectedRequestBodyType.includes('text') ? $`
30832+
${this.selectedRequestBodyType.includes('json') || this.selectedRequestBodyType.includes('xml') || this.selectedRequestBodyType.includes('text') || this.selectedRequestBodyType.includes('jose') ? $`
3078230833
<div class="tab-panel col" style="border-width:0 0 1px 0;">
3078330834
<div class="tab-buttons row" @click="${e => {
3078430835
if (e.target.tagName.toLowerCase() === 'button') {
@@ -31881,7 +31932,7 @@ class SchemaTable extends lit_element_s {
3188131932
<div class='object-body'>
3188231933
${Array.isArray(data) && data[0] ? $`${this.generateTree(data[0], 'xxx-of-option', '', '::ARRAY~OF', '', newSchemaLevel, newIndentLevel, '')}` : $`
3188331934
${Object.keys(data).map(dataKey => $`
31884-
${['::description', '::type', '::props', '::deprecated', '::array-type', '::readwrite'].includes(dataKey) ? data[dataKey]['::type'] === 'array' || data[dataKey]['::type'] === 'object' ? $`${this.generateTree(data[dataKey]['::type'] === 'array' ? data[dataKey]['::props'] : data[dataKey], data[dataKey]['::type'], data[dataKey]['::array-type'] || '', dataKey, data[dataKey]['::description'], newSchemaLevel, newIndentLevel, data[dataKey]['::readwrite'] ? data[dataKey]['::readwrite'] : '')}` : '' : $`${this.generateTree(data[dataKey]['::type'] === 'array' ? data[dataKey]['::props'] : data[dataKey], data[dataKey]['::type'], data[dataKey]['::array-type'] || '', dataKey, data[dataKey]['::description'], newSchemaLevel, newIndentLevel, data[dataKey]['::readwrite'] ? data[dataKey]['::readwrite'] : '')}`}
31935+
${['::title', '::description', '::type', '::props', '::deprecated', '::array-type', '::readwrite'].includes(dataKey) ? data[dataKey]['::type'] === 'array' || data[dataKey]['::type'] === 'object' ? $`${this.generateTree(data[dataKey]['::type'] === 'array' ? data[dataKey]['::props'] : data[dataKey], data[dataKey]['::type'], data[dataKey]['::array-type'] || '', dataKey, data[dataKey]['::description'], newSchemaLevel, newIndentLevel, data[dataKey]['::readwrite'] ? data[dataKey]['::readwrite'] : '')}` : '' : $`${this.generateTree(data[dataKey]['::type'] === 'array' ? data[dataKey]['::props'] : data[dataKey], data[dataKey]['::type'], data[dataKey]['::array-type'] || '', dataKey, data[dataKey]['::description'], newSchemaLevel, newIndentLevel, data[dataKey]['::readwrite'] ? data[dataKey]['::readwrite'] : '')}`}
3188531936
`)}
3188631937
`}
3188731938
<div>
@@ -31926,7 +31977,7 @@ class SchemaTable extends lit_element_s {
3192631977
${defaultValue ? $`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Default: </span>${defaultValue}</div>` : ''}
3192731978
${allowedValues ? $`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Allowed: </span>${allowedValues}</div>` : ''}
3192831979
${pattern ? $`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Pattern: </span>${pattern}</div>` : ''}
31929-
${schemaDescription ? $`<span class="m-markdown-small">${unsafe_html_o(marked(schemaDescription))}</span>` : ''}
31980+
${schemaDescription ? $`<span class="m-markdown-small">${unsafe_html_o(marked(`${schemaTitle ? `**${schemaTitle}:**` : ''} ${schemaDescription}`))}</span>` : ''}
3193031981
</div>
3193131982
</div>
3193231983
`;
@@ -42016,7 +42067,7 @@ Prism.languages.js = Prism.languages.javascript;
4201642067
/******/
4201742068
/******/ /* webpack/runtime/getFullHash */
4201842069
/******/ (() => {
42019-
/******/ __webpack_require__.h = () => ("5c0e179872605ca38c72")
42070+
/******/ __webpack_require__.h = () => ("27ebe4f6ce7b32ad2722")
4202042071
/******/ })();
4202142072
/******/
4202242073
/******/ /* 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: 98 additions & 98 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)