()
| 58 | } |
| 59 | |
| 60 | render() { |
| 61 | const { |
| 62 | info, |
| 63 | url, |
| 64 | host, |
| 65 | basePath, |
| 66 | getComponent, |
| 67 | externalDocs, |
| 68 | selectedServer, |
| 69 | url: specUrl, |
| 70 | } = this.props |
| 71 | const version = info.get("version") |
| 72 | const description = info.get("description") |
| 73 | const title = info.get("title") |
| 74 | const termsOfServiceUrl = safeBuildUrl( |
| 75 | info.get("termsOfService"), |
| 76 | specUrl, |
| 77 | { selectedServer } |
| 78 | ) |
| 79 | const contactData = info.get("contact") |
| 80 | const licenseData = info.get("license") |
| 81 | const rawExternalDocsUrl = externalDocs && externalDocs.get("url") |
| 82 | const externalDocsUrl = safeBuildUrl(rawExternalDocsUrl, specUrl, { |
| 83 | selectedServer, |
| 84 | }) |
| 85 | const externalDocsDescription = |
| 86 | externalDocs && externalDocs.get("description") |
| 87 | |
| 88 | const Markdown = getComponent("Markdown", true) |
| 89 | const Link = getComponent("Link") |
| 90 | const VersionStamp = getComponent("VersionStamp") |
| 91 | const OpenAPIVersion = getComponent("OpenAPIVersion") |
| 92 | const InfoUrl = getComponent("InfoUrl") |
| 93 | const InfoBasePath = getComponent("InfoBasePath") |
| 94 | const License = getComponent("License") |
| 95 | const Contact = getComponent("Contact") |
| 96 | |
| 97 | return ( |
| 98 | <div className="info"> |
| 99 | <hgroup className="main"> |
| 100 | <h1 className="title"> |
| 101 | {title} |
| 102 | <span> |
| 103 | {version && <VersionStamp version={version} />} |
| 104 | <OpenAPIVersion oasVersion="2.0" /> |
| 105 | </span> |
| 106 | </h1> |
| 107 | {host || basePath ? ( |
| 108 | <InfoBasePath host={host} basePath={basePath} /> |
| 109 | ) : null} |
| 110 | {url && <InfoUrl getComponent={getComponent} url={url} />} |
| 111 | </hgroup> |
| 112 | |
| 113 | <div className="description"> |
| 114 | <Markdown source={description} /> |
| 115 | </div> |
| 116 | |
| 117 | {termsOfServiceUrl && ( |
nothing calls this directly
no test coverage detected