[Core, HTML2] Rendered docs are incomplete (#7510)

Co-authored-by: Malachi Jones <malachi.jones@metaswitch.com>
This commit is contained in:
Jim Schubert 2020-09-25 09:07:18 -04:00 committed by GitHub
parent f608803a40
commit cb4b03fcf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 724 additions and 599 deletions

View File

@ -103,29 +103,34 @@
}); });
function findNode(id, currentNode) { function findNode(id, currentNode) {
return (Object.keys(currentNode)[0] === id) ? currentNode : findNodeInChildren(id, currentNode); var currentChild,
} result;
function findNodeInChildren(id, currentNode) { if ( Object.keys(currentNode)[0] == id) {
for (let prop in currentNode) { return currentNode;
if (currentNode.hasOwnProperty(prop)) { } else {
let currentChild = currentNode[prop]; // Use a for loop instead of forEach to avoid nested functions
if (id === prop) { // Otherwise "return" will not work properly
for(var propt in currentNode){
if (currentNode.hasOwnProperty(propt)) {
currentChild = currentNode[propt]
if (id == propt) {
return currentChild; return currentChild;
} else { } else {
// Search in the current child // Search in the current child
if (typeof(currentChild) === 'object') { if (typeof(currentChild) === 'object') {
let result = findNode(id, currentChild); result = findNode(id, currentChild);
if (result !== false) { if (result != false) {
return result; return result;
} }
} }
} }
} }
} }
// The node has not been found and we have no more options
return false; return false;
} }
}
</script> </script>
<style type="text/css"> <style type="text/css">
{{>fonts}} {{>fonts}}

View File

@ -4,6 +4,7 @@
<script> <script>
$(document).ready(function() { $(document).ready(function() {
var schemaWrapper = {{{jsonSchema}}}; var schemaWrapper = {{{jsonSchema}}};
var schema = findNode('schema',schemaWrapper).schema; var schema = findNode('schema',schemaWrapper).schema;
if (!schema) { if (!schema) {
schema = schemaWrapper.schema; schema = schemaWrapper.schema;

View File

@ -0,0 +1 @@
index.html

View File

@ -1 +1 @@
3.0.0-SNAPSHOT 5.0.0-SNAPSHOT

View File

@ -189,8 +189,8 @@ font-style: italic;
<li>in schema (model) member descriptions</li> <li>in schema (model) member descriptions</li>
</ol> </ol>
</div> </div>
<div class="app-desc">More information: <a href="https://helloreverb.com">https://helloreverb.com</a></div> <div class="app-desc">More information: <a href="https://openapi-generator.tech">https://openapi-generator.tech</a></div>
<div class="app-desc">Contact Info: <a href="hello@helloreverb.com">hello@helloreverb.com</a></div> <div class="app-desc">Contact Info: <a href="team@openapitools.org">team@openapitools.org</a></div>
<div class="app-desc">Version: 0.1.0</div> <div class="app-desc">Version: 0.1.0</div>
<div class="app-desc">BasePath:/v1</div> <div class="app-desc">BasePath:/v1</div>
<div class="license-info">All rights reserved</div> <div class="license-info">All rights reserved</div>
@ -226,7 +226,7 @@ font-style: italic;
<div class="field-items"> <div class="field-items">
<div class="param">seed (required)</div> <div class="param">seed (required)</div>
<div class="param-desc"><span class="param-type">Query Parameter</span> &mdash; A random number <em>seed</em>. </div> <div class="param-desc"><span class="param-type">Query Parameter</span> &mdash; A random number <em>seed</em>. default: null </div>
</div> <!-- field-items --> </div> <!-- field-items -->
@ -242,8 +242,8 @@ font-style: italic;
<div class="example-data-content-type">Content-Type: */*</div> <div class="example-data-content-type">Content-Type: */*</div>
<pre class="example"><code>{ <pre class="example"><code>{
"sequence" : 1, "sequence" : 1,
"seed" : 6.02745618307040320615897144307382404804229736328125, "seed" : 6.027456183070403,
"value" : 0.80082819046101150206595775671303272247314453125 "value" : 0.8008281904610115
}</code></pre> }</code></pre>
<h3 class="field-label">Produces</h3> <h3 class="field-label">Produces</h3>

View File

@ -0,0 +1 @@
index.html

View File

@ -190,7 +190,6 @@ font-style: italic;
<h2>Access</h2> <h2>Access</h2>
<ol> <ol>
<li>APIKey KeyParamName:api_key KeyInQuery:false KeyInHeader:true</li> <li>APIKey KeyParamName:api_key KeyInQuery:false KeyInHeader:true</li>
<li>APIKey KeyParamName:AUTH_KEY KeyInQuery:false KeyInHeader:false</li>
<li>OAuth AuthorizationUrl:http://petstore.swagger.io/api/oauth/dialogTokenUrl:</li> <li>OAuth AuthorizationUrl:http://petstore.swagger.io/api/oauth/dialogTokenUrl:</li>
</ol> </ol>

View File

@ -0,0 +1 @@
index.html

File diff suppressed because it is too large Load Diff