|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | + <title>Project Details</title> |
| 7 | + <!-- Bootstrap CSS --> |
| 8 | + <link href=" https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel=" stylesheet" > |
| 9 | + <!-- Bootstrap Icons --> |
| 10 | + <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet"> |
| 11 | + <link rel="stylesheet" href="/css/styles.css"> |
| 12 | + <!-- Custom Styles --> |
| 13 | + <style> |
| 14 | + body { |
| 15 | + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; |
| 16 | + background-color: #f4f4f9; |
| 17 | + color: #343a40; |
| 18 | + padding-top: 56px; |
| 19 | + } |
| 20 | + a{ |
| 21 | + text-decoration: none; |
| 22 | + } |
| 23 | + .site-main, .sidebar{ |
| 24 | + background: #fff; |
| 25 | + |
| 26 | + } |
| 27 | + .sidebar{ |
| 28 | + margin-right: 12px; |
| 29 | + padding: 12px; |
| 30 | + } |
| 31 | + |
| 32 | + .package-image { |
| 33 | + max-width: 120px; |
| 34 | + max-height: 120px; |
| 35 | + object-fit: contain; |
| 36 | + } |
| 37 | + .stat-row { |
| 38 | + display: flex; |
| 39 | + justify-content: space-between; |
| 40 | + margin: 1rem 0; |
| 41 | + gap: 1rem; |
| 42 | + } |
| 43 | + .stat-box { |
| 44 | + text-align: center; |
| 45 | + flex: 1; |
| 46 | + border: 1px solid #ddd; |
| 47 | + border-radius: 8px; |
| 48 | + padding: 0.5rem; |
| 49 | + font-size: 0.9rem; |
| 50 | + } |
| 51 | + .stat-box i { |
| 52 | + font-size: 1.4rem; |
| 53 | + margin-bottom: 0.25rem; |
| 54 | + display: block; |
| 55 | + } |
| 56 | + .breadcrumbs { |
| 57 | + margin-bottom: 1.5rem; |
| 58 | + background: #fff; |
| 59 | + padding: 0.5rem 1rem; |
| 60 | + border-radius: 5px; |
| 61 | + } |
| 62 | + .metadata-item { |
| 63 | + display: flex; |
| 64 | + align-items: center; |
| 65 | + margin-bottom: 0.5rem; |
| 66 | + } |
| 67 | + .metadata-item i { |
| 68 | + font-size: 1.2rem; |
| 69 | + margin-right: 0.5rem; |
| 70 | + color: #6c757d; |
| 71 | + } |
| 72 | + </style> |
| 73 | +</head> |
| 74 | +<body> |
| 75 | + <!-- Navbar --> |
| 76 | + <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top"> |
| 77 | + <div class="container"> |
| 78 | + <a class="navbar-brand" href="#"> |
| 79 | + <i class="bi bi-box-seam me-2"></i>CodehimBlog |
| 80 | + </a> |
| 81 | + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> |
| 82 | + <span class="navbar-toggler-icon"></span> |
| 83 | + </button> |
| 84 | + <div class="collapse navbar-collapse" id="navbarNav"> |
| 85 | + <ul class="navbar-nav ms-auto"> |
| 86 | + <li class="nav-item"> |
| 87 | + <a class="nav-link" href="#"><i class="bi bi-house-door me-1"></i>Home</a> |
| 88 | + </li> |
| 89 | + <li class="nav-item"> |
| 90 | + <a class="nav-link" href="#"><i class="bi bi-box me-1"></i>Projects</a> |
| 91 | + </li> |
| 92 | + <li class="nav-item"> |
| 93 | + <a class="nav-link" href="#"><i class="bi bi-book me-1"></i>Docs</a> |
| 94 | + </li> |
| 95 | + <li class="nav-item"> |
| 96 | + <a class="nav-link" href="#"><i class="bi bi-envelope me-1"></i>Contact</a> |
| 97 | + </li> |
| 98 | + </ul> |
| 99 | + </div> |
| 100 | + </div> |
| 101 | + </nav> |
| 102 | + |
| 103 | + <!-- Breadcrumbs --> |
| 104 | + <div class="container mt-4 breadcrumbs"> |
| 105 | + <nav aria-label="breadcrumb"> |
| 106 | + <ol class="breadcrumb mb-0"> |
| 107 | + <li class="breadcrumb-item"><a href="#">Home</a></li> |
| 108 | + <li class="breadcrumb-item"><a href="#">Projects</a></li> |
| 109 | + <li class="breadcrumb-item active" aria-current="page">json-schema-tools</li> |
| 110 | + </ol> |
| 111 | + </nav> |
| 112 | + </div> |
| 113 | + |
| 114 | + <!-- Main Content --> |
| 115 | + <div class="container mt-4"> |
| 116 | + <div class="row"> |
| 117 | + <!-- Sidebar --> |
| 118 | + <aside class="col-md-4"> |
| 119 | + <div class="sidebar"> |
| 120 | + <div class="sidebar-item"> |
| 121 | + <h5>Owner</h5> |
| 122 | + <div class="d-flex align-items-center"> |
| 123 | + <img src="https://avatars.githubusercontent.com/u/314135?v=4" alt="Owner Avatar" class="rounded-circle me-2" style="width: 40px; height: 40px;"> |
| 124 | + <a href="https://github.com/cloudflare" target="_blank" id="ownerName">cloudflare</a> |
| 125 | + </div> |
| 126 | + </div> |
| 127 | + <div class="sidebar-item"> |
| 128 | + <h5>Metadata</h5> |
| 129 | + <div class="metadata-item"> |
| 130 | + <i class="bi bi-calendar"></i> |
| 131 | + <strong>Created At:</strong> <span id="createdAt">April 5, 2018</span> |
| 132 | + </div> |
| 133 | + <div class="metadata-item"> |
| 134 | + <i class="bi bi-pencil-square"></i> |
| 135 | + <strong>Last Updated:</strong> <span id="updatedAt">October 13, 2024</span> |
| 136 | + </div> |
| 137 | + <div class="metadata-item"> |
| 138 | + <i class="bi bi-code-slash"></i> |
| 139 | + <strong>Language:</strong> <span id="language">JavaScript</span> |
| 140 | + </div> |
| 141 | + <div class="metadata-item"> |
| 142 | + <i class="bi bi-box-arrow-in-down"></i> |
| 143 | + <strong>Size:</strong> <span id="repoSize">1.55 MB</span> |
| 144 | + </div> |
| 145 | + </div> |
| 146 | + </div> |
| 147 | + </aside> |
| 148 | + |
| 149 | + <!-- Main Details --> |
| 150 | + <main class="col-md-8 site-main"> |
| 151 | + <!-- Project Name & Description --> |
| 152 | + <h1 id="packageName">json-schema-tools</h1> |
| 153 | + <p id="packageDescription" class="text-muted">Packages for working with JSON Schema and JSON Hyper-Schema</p> |
| 154 | + |
| 155 | + <!-- Statistics --> |
| 156 | + <div class="stat-row"> |
| 157 | + <div class="stat-box"> |
| 158 | + <i class="bi bi-star-fill text-warning"></i> |
| 159 | + <span id="stargazersCount">321</span> |
| 160 | + <p>Stars</p> |
| 161 | + </div> |
| 162 | + <div class="stat-box"> |
| 163 | + <i class="bi bi-arrow-repeat text-secondary"></i> |
| 164 | + <span id="forksCount">30</span> |
| 165 | + <p>Forks</p> |
| 166 | + </div> |
| 167 | + <div class="stat-box"> |
| 168 | + <i class="bi bi-exclamation-circle text-danger"></i> |
| 169 | + <span id="openIssuesCount">37</span> |
| 170 | + <p>Open Issues</p> |
| 171 | + </div> |
| 172 | + </div> |
| 173 | + |
| 174 | + <!-- Action Buttons --> |
| 175 | + <div class="mb-4"> |
| 176 | + <a href="#" target="_blank" class="btn btn-success me-2" id="homepageBtn"> |
| 177 | + <i class="bi bi-house-door me-2"></i>Visit Homepage |
| 178 | + </a> |
| 179 | + <a href="/archive/refs/heads/main.zip" class="btn btn-primary me-2" id="downloadBtn"> |
| 180 | + <i class="bi bi-cloud-download me-2"></i>Download ZIP |
| 181 | + </a> |
| 182 | + <a href="" target="_blank" class="btn btn-outline-secondary" id="githubBtn"> |
| 183 | + <i class="bi bi-github me-2"></i>Fork on GitHub |
| 184 | + </a> |
| 185 | + </div> |
| 186 | + |
| 187 | + <!-- Tabs --> |
| 188 | + <ul class="nav nav-tabs" id="infoTabs" role="tablist"> |
| 189 | + <li class="nav-item" role="presentation"> |
| 190 | + <button class="nav-link active" id="installation-tab" data-bs-toggle="tab" data-bs-target="#installation" type="button" role="tab" aria-controls="installation" aria-selected="true"> |
| 191 | + <i class="bi bi-file-earmark-text"></i> Readme |
| 192 | + </button> |
| 193 | + </li> |
| 194 | + <li class="nav-item" role="presentation"> |
| 195 | + <button class="nav-link" id="dependencies-tab" data-bs-toggle="tab" data-bs-target="#dependencies" type="button" role="tab" aria-controls="dependencies" aria-selected="false"> |
| 196 | + <i class="bi bi-diagram-2-fill me-2"></i> Dependencies |
| 197 | + </button> |
| 198 | + </li> |
| 199 | + <li class="nav-item" role="presentation"> |
| 200 | + <button class="nav-link" id="changelog-tab" data-bs-toggle="tab" data-bs-target="#changelog" type="button" role="tab" aria-controls="changelog" aria-selected="false"> |
| 201 | + <i class="bi bi-journal-text me-2"></i> Changelog |
| 202 | + </button> |
| 203 | + </li> |
| 204 | + <li class="nav-item" role="presentation"> |
| 205 | + <button class="nav-link" id="contributors-tab" data-bs-toggle="tab" data-bs-target="#contributors" type="button" role="tab" aria-controls="contributors" aria-selected="false"> |
| 206 | + <i class="bi bi-people me-2"></i> Contributors |
| 207 | + </button> |
| 208 | + </li> |
| 209 | + </ul> |
| 210 | + |
| 211 | + <div class="tab-content mt-3" id="infoTabsContent"> |
| 212 | + <div class="tab-pane fade show active" id="installation" role="tabpanel" aria-labelledby="installation-tab"> |
| 213 | + <h1 id="jsonschematools">JSON Schema Tools</h1> |
| 214 | +<p>This is a monorepo of packages for working with |
| 215 | +<a href="http://json-schema.org">JSON Schema and JSON Hyper-Schema</a>, |
| 216 | +built using <a href="https://github.com/lerna/lerna">Lerna</a> and |
| 217 | +<a href="https://yarnpkg.com/lang/en/docs/workspaces/">Yarn Workspaces</a>.</p> |
| 218 | +<p>The repo includes everything from generic utilities to small applications |
| 219 | +built on these and other packages.</p> |
| 220 | +<p>The packages are intended for general use, so |
| 221 | +while they may support some Cloudflare extensions to JSON Schema, |
| 222 | +they should all be usable with schemas that rely only on the |
| 223 | +standard keywords and features.</p> |
| 224 | +<h2 id="notethatthesepackageshavenotyetreachedastableinterface">Note that these packages have not yet reached a stable interface</h2> |
| 225 | +<p>Interfaces will change and packages will be refactored until each package |
| 226 | +reaches a 1.0 status. This will likely occur once JSON Schema <a href="https://github.com/json-schema-org/json-schema-spec/milestone/6">draft-08</a>, which |
| 227 | +will have some very significant new features, is finalized. In particular, |
| 228 | +the concept of a Schema Vocabulary appears in several locations but is neither |
| 229 | +well nor consistently managed in the current code. Draft-08 will formalize |
| 230 | +that concept.</p> |
| 231 | +<p>If you are interested in building on these packages, please file an issue indicating what you need to use and we will work to ensure reasonable levels of support as we finalize the interfaces.</p> |
| 232 | +<h2 id="thepackages">The packages</h2> |
| 233 | +<p>Packages fall into a few categories. Currently, the packages in this repository |
| 234 | +focus on static manipulation and processing of schemas, in particular for |
| 235 | +generating API documentation. The following diagram gives an overview of how this |
| 236 | +and potentially other kinds of static processing work:</p> |
| 237 | +<p><img src="docs/static-processing.png" alt="A possible json-schema-tools data flow for static schema processing would likely involve the walker and transform packages, which can produce schemas suitable for use in applications such as the Doca API documentation system." title="Static processing data flows" /></p> |
| 238 | +<p>Additional packages will likely add runtime functionality, including automated API |
| 239 | +testing support based on JSON Hyper-Schema.</p> |
| 240 | +<h3 id="cloudflarejsonschemawalker"><code>@cloudflare/json-schema-walker</code></h3> |
| 241 | +<p><a href="workspaces/json-schema-walker/README.md"><code>json-schema-walker</code></a> is the most fundamental static schema processing package: it is aware of subschema applicators and uses that knowledge to walk over a schema and make callbacks before and/or after visiting any subschemas.</p> |
| 242 | +<p>Most schema transformations work by changing a schema object after its subschemas have been visited, so that all transformations are guaranteed to have already been applied to any subschemas.</p> |
| 243 | +<p>There are variants for visiting all schemas including the root, as well as for only visiting subschemas.</p> |
| 244 | +<h3 id="cloudflarejsonschematransform"><code>@cloudflare/json-schema-transform</code></h3> |
| 245 | +<p><a href="workspaces/json-schema-transform/README.md"><code>json-schema-transform</code></a> is a collection of utility functions, most of which are either callbacks intended for use with <code>json-schema -walker</code>, or make use of <code>json-schema-walker</code> internally. This package will eventually include transforms for converting one draft to another.</p> |
| 246 | +<p>Among other things, this makes replacements for the internals of the deprecated <code>json-schema-example-loader</code> package available outside of Webpack. See <code>json-schema-apidoc-loader</code> for use with Webpack.</p> |
| 247 | +<h3 id="cloudflarejsonhyperschema"><code>@cloudflare/json-hyper-schema</code></h3> |
| 248 | +<p><a href="workspaces/json-hyper-schema/README.md"><code>json-hyper-schema</code></a> is an implementation of the JSON Hyper-Schema specification, supporting both static (currently) and dynamic (in the future) use of Hyper-Schemas. Eventually, we hope to build a fully-featured hyperclient based on this package.</p> |
| 249 | +<p>Currently, this just includes some utilities for looking up link description objects and resolving URI Templates from an instance. Some of these utilities are replacements for internals of the deprecated <code>json-schema-example-loader</code>.</p> |
| 250 | +<h3 id="cloudflarejsonschematest"><code>@cloudflare/json-schema-test</code></h3> |
| 251 | +<p><em>This package has not yet been created.</em></p> |
| 252 | +<p>Applies schema validation to API requests and responses. This will primarily leverage JSON Hyper-Schema but other utilities such as a <a href="https://facebook.github.io/jest/">Jest</a> matcher for regular schema validation will be included.</p> |
| 253 | +<h2 id="applicationsandapplicationsupport">Applications and application support</h2> |
| 254 | +<p>Currently, the only application provided is an API documentation system known as "Doca". This is a refactored and re-designed version of <a href="https://github.com/cloudflare/doca">our existing Doca suite</a></p> |
| 255 | +<h3 id="cloudflaredoca"><code>@cloudflare/doca</code></h3> |
| 256 | +<p>Scaffolding system to generate API documentation apps.</p> |
| 257 | +<p>Replaces the existing <code>doca</code> package, which is now deprecated.</p> |
| 258 | +<h3 id="cloudflaredocadefaulttheme"><code>@cloudflare/doca-default-theme</code></h3> |
| 259 | +<p>The default UI for documentation apps scaffolded by <code>@cloudflare/doca</code>.</p> |
| 260 | +<p>Will eventually fully replace <code>doca-bootstrap-theme</code>, but currently this is a bare-bones display of the processed JSON Schemas. It is provided mainly for debugging purposes and as a starting point for 3rd-party UI themes.</p> |
| 261 | +<h3 id="cloudflarejsonschemarefloader"><code>@cloudflare/json-schema-ref-loader</code></h3> |
| 262 | +<p><a href="https://webpack.js.org/">Webpack</a> loader that uses <code>json-schema-transform</code> and other packages to load schemas written in JSON, JSON5, YAML, or JavaScript formats and dereference all <code>$ref</code> occurrences. All referenced schemas are added as dependencies.</p> |
| 263 | +<p>Currently this loader can only be used with schemas that do not have any cyclic references as dereferencing is the only option for loading.</p> |
| 264 | +<p>Replaces <code>json-schema-loader</code></p> |
| 265 | +<h3 id="cloudflarejsonschemaapidocloader"><code>@cloudflare/json-schema-apidoc-loader</code></h3> |
| 266 | +<p><a href="https://webpack.js.org/">Webpack</a> loader that uses <code>json-schema-transform</code> and other packages to convert de-referenced (no <code>$ref</code>s) into a form suitable for generating documentation, including examples.</p> |
| 267 | +<p>Replaces <code>json-schema-example-loader</code></p> |
| 268 | +<h2 id="installation">Installation</h2> |
| 269 | +<h3 id="installingandusingasinglepackage">Installing and using a single package</h3> |
| 270 | +<p>Find the package in the <a href="workspaces"><code>workspaces/</code> directory</a> and |
| 271 | +open its README.md for documentation.</p> |
| 272 | +<h2 id="installingthemonorepo">Installing the monorepo</h2> |
| 273 | +<p>Please use recent versions of lerna (2+), node (6+) and yarn (v1+). |
| 274 | +Simply clone the repository and run <code>lerna bootstrap</code>, which will |
| 275 | +use yarn. A known good version of yarn is included in |
| 276 | +the <code>scripts</code> directory and configured in this repository's <code>.yarnrc</code>.</p> |
| 277 | + </div> |
| 278 | + <div class="tab-pane fade" id="dependencies" role="tabpanel" aria-labelledby="dependencies-tab"> |
| 279 | + <h5>Dependencies</h5> |
| 280 | + <ul id="dependenciesList"> |
| 281 | + <li>No dependencies listed.</li> |
| 282 | + </ul> |
| 283 | + </div> |
| 284 | + <div class="tab-pane fade" id="changelog" role="tabpanel" aria-labelledby="changelog-tab"> |
| 285 | + <h5>Changelog</h5> |
| 286 | + <ul id="changelogList"> |
| 287 | + <p>No changelog available.</p> |
| 288 | + </ul> |
| 289 | + </div> |
| 290 | + <div class="tab-pane fade" id="contributors" role="tabpanel" aria-labelledby="contributors-tab"> |
| 291 | + <h5>Contributors</h5> |
| 292 | + <ul id="contributorsList"> |
| 293 | + <li>handrews (100 contributions)</li><li>manatarms (3 contributions)</li><li>0xflotus (1 contributions)</li><li>dbemiller (1 contributions)</li><li>jackwilsdon (1 contributions)</li><li>tajo (1 contributions)</li><li>zackproser (1 contributions)</li> |
| 294 | + </ul> |
| 295 | + </div> |
| 296 | + </div> |
| 297 | + </main> |
| 298 | + </div> |
| 299 | + </div> |
| 300 | + |
| 301 | + <!-- Footer --> |
| 302 | + <footer class="bg-dark text-white text-center py-3"> |
| 303 | + <div class="container"> |
| 304 | + <p class="mb-0">© 2024 Package Hub Pro - Powered by Bootstrap</p> |
| 305 | + </div> |
| 306 | + </footer> |
| 307 | + |
| 308 | + <!-- Bootstrap Bundle JS --> |
| 309 | + <script src=" https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" ></script> |
| 310 | + <script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script> |
| 311 | +</body> |
| 312 | +</html> |
0 commit comments