Skip to content

Commit edfb406

Browse files
Feat: Rebuilding getting started component (#687) (#782)
* Feat: Rebuilding getting started component (#687) * adding componet * adding data * connecting with data * Pushed data changes * Fix:getting started data fetching problem * updating component rendering * adjusting layout * update: changing interating logics * update: changing file location * fix: minor fixes * schema data fetching * fixing workflow * adding fetch testing * replacing code editor * feat: enabling instnaces and moving to new component * fix: state rendering problem solved * feat:adding text and icons * fix: instances fix * fixing text alignment * fix: instances fix * Refactoring and improvements * removing some codes * Refactoring component and bug fixes * Add plausible events * Update package.json * adding better messaging --------- Co-authored-by: Benjamin Granados <[email protected]> * Change font sizes for code editors * feat: adding download button * adding zip install * added more examples * Squashed commit of the following: commit 2e899cc Author: Alok Gupta <[email protected]> Date: Mon Jul 29 16:12:12 2024 +0530 chore(documentation) : updated docs for setting up environment variables (#797) * Added docs for setting up env variables * Updated env docs commit b06a316 Author: Jason Desrosiers <[email protected]> Date: Mon Jul 29 03:41:28 2024 -0700 Fix bundling docs bug (#822) commit 9f65d1e Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Jul 29 12:32:33 2024 +0200 chore(deps): bump @typescript-eslint/eslint-plugin from 6.13.1 to 6.21.0 (#833) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.13.1 to 6.21.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.21.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit f49db67 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Jul 29 12:32:14 2024 +0200 chore(deps): bump husky from 9.0.11 to 9.1.3 (#834) Bumps [husky](https://github.com/typicode/husky) from 9.0.11 to 9.1.3. - [Release notes](https://github.com/typicode/husky/releases) - [Commits](typicode/husky@v9.0.11...v9.1.3) --- updated-dependencies: - dependency-name: husky dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit f7407b8 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Jul 29 12:31:56 2024 +0200 chore(deps): bump prettier from 3.2.5 to 3.3.3 (#835) Bumps [prettier](https://github.com/prettier/prettier) from 3.2.5 to 3.3.3. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@3.2.5...3.3.3) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit acb797e Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Jul 29 12:31:30 2024 +0200 chore(deps): bump axios from 1.6.0 to 1.7.2 (#836) Bumps [axios](https://github.com/axios/axios) from 1.6.0 to 1.7.2. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.6.0...v1.7.2) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 753017b Author: Benjamin Granados <[email protected]> Date: Wed Jul 24 14:15:25 2024 +0200 New slack redirect commit 8f099f4 Author: Dhairya Majmudar <[email protected]> Date: Wed Jul 24 13:39:33 2024 +0530 Feat: Refactoring toc styles (#796) * refactoring toc * updating es * adding heading * adding heading commit 16369d3 Author: Benjamin Granados <[email protected]> Date: Wed Jul 24 09:46:39 2024 +0200 Add docs help component (#820) commit a58bd36 Author: Benjamin Granados <[email protected]> Date: Wed Jul 24 09:03:39 2024 +0200 Web release 3 (#655) * Standardize List Display with Card Component (#433) (#460) * Standardize List Display with Card Component (#433) * Addressed comments, added images, and implemented new styles * Increased padding on the x-axis * feat: added Faq section (#534) * Fix faq * Added Case Studies page in Overview Section (#473) * updated UI of blog-page * Added Case Studies Page * fixed linting errors * Added casestudies * changing index.page.tsx * Delete components/CustomComponent.tsx * Delete pages/overview/casestudies.md * removed unnecessary changes * removed unnecessary files * fixed bug * removed changes * removed unnecessary files * Pushing last changes. --------- Co-authored-by: Benjamin Granados <[email protected]> * feat: added resource section (#509) * fixed * feat: added resource section * feat: added resource section * revert changes cd6d848 * revert changes 65e9f3e * revert changes 877b0f0 * revert changes 74711cd * fix: fixed the width issue * revert change * fix: added resource icon * Tiny changes to adjust look and feel. * Last changes to fix dark theme --------- Co-authored-by: Benjamin Granados <[email protected]> * Feat: Add the Newsletter feature to the website. (#489) * initialize the Test directory. * Added the subscribe button. * Added the subscribe page. * Added the newsletter page. * changed name to newsletter. * removed the unwated code. * removed the unwated components. * decreased the horizontal width and changed the color. * decreased the font size. * Added the changes for the newsletter banner. * Added the newletter component to landing page. * added the color for input. * Added the required horizontal padding. * Added the required horizontal padding. for newsletter page. * Add changes to make it work with mailchimp * added the yarn file back. * Added yarn.lock file. * Update yarn.lock * linted the newsletter.tsx * linted newsletter * fix the index.page * Small improvement in page layout. * Fix dark theme behavior * . --------- Co-authored-by: AyushNautiyalDeveloper <[email protected]> Co-authored-by: Benjamin Granados <[email protected]> * Added welcome page (#566) * added welcome page * Pushed some changes to changes - Better location in sidebar - Changes to move what is json schema into getting started - move page inside overview --------- Co-authored-by: Benjamin Granados <[email protected]> * Added Use-cases page (#589) * added use-cases page, modified card component * fix * Added some changes to better merge with the dev branch. --------- Co-authored-by: Benjamin Granados <[email protected]> * Change docs link * fix: spacing between buttons (#575) * docs: added definition of json hyper-schema * fixed * fix: spacing b/w buttons * fix: added spacing in mobile design * fix: spacing on tablet screen * fix: spacing on less than 300px screen * community-page (#646) * community-page * Some final changes for the community page --------- Co-authored-by: Benjamin Granados <[email protected]> * Update Sidebar.tsx * Add resources file * Update Sidebar.tsx * Update case-studies.json * Text colours for dark theme * New version of the implementers page * Feat: Replacing Axios to fs fetching in resources page (#657) * cleaning * changing axios to fs * Remove articles from sidebar --------- Co-authored-by: Benjamin Granados <[email protected]> * Improve Case Studies and Use Cases welcome messages * adding codeowners * Fixing bugs and adding back lost files * fix sidebar dropdown for FAQ * community page major changes and faq bug fix * community page bug fixes and responsive issues in several pages * Update index.page.tsx (#684) * Update index.page.tsx Edited the placeholder texts for the welcome page. * fixed lint error * Edited wordings for the Welcome page of release 3 * Update pages/overview/welcome/index.page.tsx Co-authored-by: Benjamin Granados <[email protected]> * Update pages/overview/welcome/index.page.tsx Co-authored-by: Benjamin Granados <[email protected]> * Remove data duplication and fix intro text --------- Co-authored-by: Benjamin Granados <[email protected]> Co-authored-by: Benjamin Granados <[email protected]> * Feat: Removing resources and newletter from web-release-3 branch (#698) * removing newsletter * removing resources * removing resources.yml file * removing resources from welcomee page --------- Co-authored-by: Benjamin Granados <[email protected]> * case-studies bug fix and hover delay fix * adding ts comment * Small corrections * Update blogs link * Ambassadors button aligned to the left * Feat: Fixing responsive bugs from community page * community page bug fixes * Added uses cases texts * Last changes to use-cases * Add html to the use cases definition * feat:adding html parser for use-cases page * removing links from images * improved FAQ description text (#709) * improved FAQ description text * Updated FAQ general questions * Updated FAQ description text for fix one-sentence bug * Update data/faq.json Co-authored-by: Benjamin Granados <[email protected]> * Update data/faq.json Co-authored-by: Benjamin Granados <[email protected]> * Update data/faq.json Co-authored-by: Benjamin Granados <[email protected]> * Update pages/overview/faq/index.page.tsx --------- Co-authored-by: Benjamin Granados <[email protected]> * Improvement for case studies * merge confilts * removing merge conflicts * Fix:community card gap * Align with main branch * Align with main branch * Align with main branch * Update pages/overview/what-is-jsonschema.md Co-authored-by: Ben Hutton <[email protected]> * Remove welcome data file * Move welcome outside overview section * Change welcome text * Feat: Replaced axios with fetch * moved path to function * Updating community filters * Update pages/community/index.page.tsx Co-authored-by: Ben Hutton <[email protected]> * Fix the menu links * Update the JSON Schema calendar link * Change ambassadors image --------- Co-authored-by: Michael Obubelebra Amachree <[email protected]> Co-authored-by: Akshay Bagai <[email protected]> Co-authored-by: Tamanna <[email protected]> Co-authored-by: Ayush Nautiyal <[email protected]> Co-authored-by: AyushNautiyalDeveloper <[email protected]> Co-authored-by: VivekJaiswal18 <[email protected]> Co-authored-by: Neeraj Saini <[email protected]> Co-authored-by: Dhairya Majmudar <[email protected]> Co-authored-by: Dhairya Majmudar <[email protected]> Co-authored-by: Blessing Ene Anyebe <[email protected]> Co-authored-by: Ben Hutton <[email protected]> commit aacf741 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Jul 24 08:41:05 2024 +0200 chore(deps): bump @docsearch/react from 3.5.2 to 3.6.1 (#811) Bumps [@docsearch/react](https://github.com/algolia/docsearch) from 3.5.2 to 3.6.1. - [Release notes](https://github.com/algolia/docsearch/releases) - [Changelog](https://github.com/algolia/docsearch/blob/main/CHANGELOG.md) - [Commits](algolia/docsearch@v3.5.2...v3.6.1) --- updated-dependencies: - dependency-name: "@docsearch/react" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit c90385b Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Jul 24 08:40:47 2024 +0200 chore(deps): bump @types/react-syntax-highlighter (#812) Bumps [@types/react-syntax-highlighter](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-syntax-highlighter) from 15.5.10 to 15.5.13. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-syntax-highlighter) --- updated-dependencies: - dependency-name: "@types/react-syntax-highlighter" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit e78dfaf Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Jul 24 08:40:27 2024 +0200 chore(deps): bump eslint-plugin-n from 16.3.1 to 16.6.2 (#810) Bumps [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) from 16.3.1 to 16.6.2. - [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases) - [Changelog](https://github.com/eslint-community/eslint-plugin-n/blob/master/CHANGELOG.md) - [Commits](eslint-community/eslint-plugin-n@16.3.1...16.6.2) --- updated-dependencies: - dependency-name: eslint-plugin-n dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 674943c Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Jul 24 08:40:03 2024 +0200 chore(deps): bump Renato66/auto-label from 3.0.0 to 3.1.0 (#809) Bumps [Renato66/auto-label](https://github.com/renato66/auto-label) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/renato66/auto-label/releases) - [Commits](Renato66/auto-label@v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: Renato66/auto-label dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 4d947f5 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Jul 24 08:39:35 2024 +0200 chore(deps): bump eslint-plugin-react from 7.33.2 to 7.35.0 (#813) Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.33.2 to 7.35.0. - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md) - [Commits](jsx-eslint/eslint-plugin-react@v7.33.2...v7.35.0) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit af4ba88 Author: Benjamin Granados <[email protected]> Date: Mon Jul 22 14:04:44 2024 +0200 Add new sponsors (#814) commit 71a18df Author: Alok Gupta <[email protected]> Date: Tue Jul 16 22:08:08 2024 +0530 Chore(github-actions) : add CI/CD workflows guidelines and improve naming conventions (#789) * chore(ci.yml) improve naming of ci.yml workflow * chore(issue.yml) : improve workflow steps, jobs name for better clarity and consistency * chore(link.yml & pr_target.yml) : Improve docs * renamed links.yml and stale.yml * Added workflow guidelines documentation commit 10bb5d4 Author: Juan Cruz Viotti <[email protected]> Date: Tue Jul 16 12:35:24 2024 -0400 Add JSON Toolkit as a C++ implementation (#761) Signed-off-by: Juan Cruz Viotti <[email protected]> commit a842501 Author: Zeel Rajodiya <[email protected]> Date: Tue Jul 16 22:04:47 2024 +0530 Enchantment Dark Mode Toggle shows a popup (#735) * Refactor DarkModeToggle component to include a theme selection dropdown * Refactor DarkModeToggle component to include a theme selection dropdown Fix dark mode toggle icon rendering issue commit eda0dcf Author: Joost Holslag <[email protected]> Date: Tue Jul 16 18:31:38 2024 +0200 remove trailing comma from getting-started-step-by-step.md (#800) commit 8f18c3a Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Jul 16 18:29:22 2024 +0200 chore(deps): bump react and @types/react (#744) Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) and [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react). These dependencies needed to be updated together. Updates `react` from 18.2.0 to 18.3.1 - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react) Updates `@types/react` from 18.2.37 to 18.3.3 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: react dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Benjamin Granados <[email protected]> commit fa59c06 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Jul 16 16:27:55 2024 +0200 chore(deps): bump next from 14.1.1 to 14.2.5 (#794) Bumps [next](https://github.com/vercel/next.js) from 14.1.1 to 14.2.5. - [Release notes](https://github.com/vercel/next.js/releases) - [Changelog](https://github.com/vercel/next.js/blob/canary/release.js) - [Commits](vercel/next.js@v14.1.1...v14.2.5) --- updated-dependencies: - dependency-name: next dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 43e3654 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Jul 16 16:27:03 2024 +0200 chore(deps): bump @types/node from 20.10.1 to 20.14.10 (#798) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.10.1 to 20.14.10. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit d30dd69 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Jul 16 16:26:31 2024 +0200 chore(deps): bump markdown-to-jsx from 7.3.2 to 7.4.7 (#799) Bumps [markdown-to-jsx](https://github.com/quantizor/markdown-to-jsx) from 7.3.2 to 7.4.7. - [Release notes](https://github.com/quantizor/markdown-to-jsx/releases) - [Changelog](https://github.com/quantizor/markdown-to-jsx/blob/main/CHANGELOG.md) - [Commits](quantizor/markdown-to-jsx@v7.3.2...v7.4.7) --- updated-dependencies: - dependency-name: markdown-to-jsx dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 605bbb3 Author: Alok Gupta <[email protected]> Date: Tue Jul 16 19:19:49 2024 +0530 Added two workflows for fetching contributor and project roadmap data (#781) * github-actions : added sync.contributors.yml * github-actions : Added sync-project-roadmap.yml commit e9d84d0 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu Jul 11 08:21:52 2024 +0200 chore(deps): bump next-themes from 0.2.1 to 0.3.0 (#743) Bumps [next-themes](https://github.com/pacocoursey/next-themes) from 0.2.1 to 0.3.0. - [Release notes](https://github.com/pacocoursey/next-themes/releases) - [Commits](https://github.com/pacocoursey/next-themes/commits/v0.3.0) --- updated-dependencies: - dependency-name: next-themes dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit f7b499e Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu Jul 11 08:21:38 2024 +0200 chore(deps): bump actions/github-script from 6 to 7 (#740) Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](actions/github-script@v6...v7) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 81de1e4 Author: Benjamin Granados <[email protected]> Date: Mon Jul 8 17:25:06 2024 +0200 Add new sopnsor (#793) commit 2b5b44e Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Jul 8 11:03:58 2024 +0200 chore(deps): bump eslint-plugin-promise from 6.1.1 to 6.4.0 (#787) Bumps [eslint-plugin-promise](https://github.com/eslint-community/eslint-plugin-promise) from 6.1.1 to 6.4.0. - [Release notes](https://github.com/eslint-community/eslint-plugin-promise/releases) - [Changelog](https://github.com/eslint-community/eslint-plugin-promise/blob/main/CHANGELOG.md) - [Commits](eslint-community/eslint-plugin-promise@v6.1.1...v6.4.0) --- updated-dependencies: - dependency-name: eslint-plugin-promise dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit ae2a377 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Jul 8 11:02:13 2024 +0200 chore(deps): bump Renato66/auto-label from 2.3.0 to 3.0.0 (#788) Bumps [Renato66/auto-label](https://github.com/renato66/auto-label) from 2.3.0 to 3.0.0. - [Release notes](https://github.com/renato66/auto-label/releases) - [Commits](Renato66/auto-label@v2.3.0...v3.0.0) --- updated-dependencies: - dependency-name: Renato66/auto-label dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 7241449 Author: Tabah Baridule M <[email protected]> Date: Wed Jun 26 16:56:00 2024 +0100 Update pages/understanding-json-schema/structuring.md Co-authored-by: Jason Desrosiers <[email protected]> commit bd7ddb2 Author: Tabah Baridule M. <[email protected]> Date: Tue Jun 25 15:51:14 2024 +0100 Update structuring.md commit 3a29a33 Author: Tabah Baridule M. <[email protected]> Date: Tue Jun 25 15:49:36 2024 +0100 The URI-references without fragment was remove commit 43dd3f9 Author: Tabah Baridule M. <[email protected]> Date: Mon Apr 22 18:00:34 2024 +0100 Updated the `$id` and included a Draft-specific info box section --------- Co-authored-by: Dhairya Majmudar <[email protected]> Co-authored-by: Dhairya Majmudar <[email protected]>
1 parent 2e899cc commit edfb406

20 files changed

+717
-54
lines changed

components/GettingStarted.tsx

+258
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
import React, { useState, useEffect } from 'react';
2+
import { atomOneDark } from 'react-syntax-highlighter/dist/cjs/styles/hljs';
3+
import Highlight from 'react-syntax-highlighter';
4+
import JSZip from 'jszip';
5+
import { saveAs } from 'file-saver';
6+
7+
async function fetchData() {
8+
const response = await fetch('/data/getting-started-examples.json');
9+
const data = await response.json();
10+
11+
const defaultSchemaData = data.find((data: any) => data.default === true);
12+
13+
const schemaResp = await fetch(defaultSchemaData.file);
14+
const schemaData = await schemaResp.json();
15+
16+
const defaultInstanceData = defaultSchemaData.instances.find(
17+
(instance: any) => instance.default === true,
18+
);
19+
20+
const instanceResp = await fetch(defaultInstanceData.file);
21+
const instanceData = await instanceResp.json();
22+
23+
return {
24+
data,
25+
schemaData,
26+
instanceData,
27+
initialInstance: defaultSchemaData.instances,
28+
initialDetails: [defaultInstanceData.details, defaultInstanceData.valid],
29+
};
30+
}
31+
32+
interface SchemaOption {
33+
file: string;
34+
instances: InstanceOption[];
35+
}
36+
37+
interface InstanceOption {
38+
file: string;
39+
details: string;
40+
valid: string;
41+
}
42+
43+
const GettingStarted = () => {
44+
useEffect(() => {
45+
fetchData()
46+
.then(
47+
({
48+
data,
49+
schemaData,
50+
instanceData,
51+
initialInstance,
52+
initialDetails,
53+
}) => {
54+
setOptions(data);
55+
setFetchedSchema(schemaData);
56+
setFetchedInstance(instanceData);
57+
setInstances(initialInstance);
58+
setDetails(initialDetails);
59+
},
60+
)
61+
.catch((e) => console.log('Error: ', e));
62+
}, []);
63+
64+
const [options, setOptions] = useState<SchemaOption[]>([]);
65+
const [instances, setInstances] = useState<InstanceOption[]>([]);
66+
const [details, setDetails] = useState<string[]>(['', '']);
67+
const [fetchedSchema, setFetchedSchema] = useState();
68+
const [fetchedInstance, setFetchedInstance] = useState();
69+
70+
const handleSchemaChange = async (
71+
e: React.ChangeEvent<HTMLSelectElement>,
72+
) => {
73+
const selectedSchema = options.find(
74+
(schema) => schema.file === e.target.value,
75+
);
76+
77+
if (selectedSchema) {
78+
const schemaResponse = await fetch(e.target.value);
79+
const schData = await schemaResponse.json();
80+
81+
setFetchedSchema(schData);
82+
setInstances(selectedSchema.instances);
83+
84+
const instResp = await fetch(selectedSchema.instances[0].file);
85+
const instData = await instResp.json();
86+
setFetchedInstance(instData);
87+
} else {
88+
setInstances([]);
89+
setFetchedSchema(null!);
90+
}
91+
};
92+
93+
const handleInstanceChange = async (
94+
e: React.ChangeEvent<HTMLSelectElement>,
95+
) => {
96+
const selectedInstance = instances.find(
97+
(instance) => instance.file === e.target.value,
98+
) as InstanceOption;
99+
100+
if (selectedInstance) {
101+
const instanceResponse = await fetch(e.target.value);
102+
const instanceData = await instanceResponse.json();
103+
104+
setFetchedInstance(instanceData);
105+
setDetails([selectedInstance.details, selectedInstance.valid]);
106+
} else {
107+
setFetchedInstance(undefined);
108+
}
109+
};
110+
111+
const createZip = async () => {
112+
try {
113+
const zip = new JSZip();
114+
zip.file('schema.json', JSON.stringify(fetchedSchema, null, 2));
115+
zip.file('instance.json', JSON.stringify(fetchedInstance, null, 2));
116+
117+
zip.generateAsync({ type: 'blob' }).then((content) => {
118+
saveAs(content, 'getting-started-examples.zip');
119+
});
120+
} catch (e) {
121+
console.log('Error zipping files', e);
122+
}
123+
};
124+
125+
return (
126+
<>
127+
<div className='relative'>
128+
<div className='flex flex-col'>
129+
<div className='flex items-end flex-row justify-between mt-5 mb-3 '>
130+
<h2 className='text-h6 font-semibold mb-1'>JSON Schema</h2>
131+
<div className='select-wrap'>
132+
<label className='mr-2 max-sm:text-[12px]'>
133+
Select a Schema:
134+
</label>
135+
<select
136+
name='Select a JSON Schema Validator'
137+
className='p-2 border dark:border-slate-300 border-slate-800 dark:bg-slate-900 rounded-md max-sm:text-[12px] plausible-event-name==activation-explore-tools'
138+
id='Examples'
139+
onChange={handleSchemaChange}
140+
>
141+
{options.map((option: any, id: number) => (
142+
<option key={id} value={option.file}>
143+
{option.name}
144+
</option>
145+
))}
146+
</select>
147+
</div>
148+
</div>
149+
150+
<div className='overflow-x-auto flex-basis-0 max-w-full min-w-0 shrink lg:max-w-[800px] xl:max-w-[900px]'>
151+
<Highlight
152+
wrapLines={true}
153+
wrapLongLines={true}
154+
customStyle={{
155+
borderRadius: 10,
156+
paddingTop: 15,
157+
paddingBottom: 10,
158+
paddingLeft: 10,
159+
marginBottom: 20,
160+
maxWidth: '100%',
161+
}}
162+
lineNumberStyle={{
163+
marginRight: 10,
164+
}}
165+
style={atomOneDark}
166+
showLineNumbers
167+
startingLineNumber={1}
168+
lineProps={() => {
169+
const isHighlighted = false;
170+
return {
171+
className: `${isHighlighted ? 'bg-code-editor-dark-highlight block ml-10 w-full' : ''} pr-8`,
172+
};
173+
}}
174+
codeTagProps={{
175+
className: 'mr-8',
176+
}}
177+
>
178+
{JSON.stringify(fetchedSchema, null, 2)}
179+
</Highlight>
180+
</div>
181+
</div>
182+
183+
<div className='flex flex-col'>
184+
<div className='flex items-end flex-row justify-between mt-5 mb-3 '>
185+
<h2 className='text-h6 font-semibold mb-1'>JSON Instance</h2>
186+
<div className='select-wrap'>
187+
<label className='mr-2 max-sm:text-[12px]'>
188+
Select an Instance:
189+
</label>
190+
<select
191+
name='Select a JSON Schema Validator'
192+
className='p-2 border dark:border-slate-300 border-slate-800 dark:bg-slate-900 rounded-md max-sm:text-[12px] plausible-event-name==activation-explore-tools'
193+
id='Examples'
194+
onChange={handleInstanceChange}
195+
>
196+
{instances.map((instance: any, id: number) => (
197+
<option key={id} value={instance.file}>
198+
{instance.name}
199+
</option>
200+
))}
201+
</select>
202+
</div>
203+
</div>
204+
<div className='overflow-x-auto flex-basis-0 max-w-full min-w-0 shrink lg:max-w-[800px] xl:max-w-[900px]'>
205+
<Highlight
206+
wrapLines={true}
207+
wrapLongLines={true}
208+
customStyle={{
209+
borderRadius: 10,
210+
paddingTop: 15,
211+
paddingBottom: 10,
212+
paddingLeft: 10,
213+
marginBottom: 20,
214+
maxWidth: '100%',
215+
}}
216+
lineNumberStyle={{
217+
marginRight: 10,
218+
}}
219+
style={atomOneDark}
220+
showLineNumbers
221+
startingLineNumber={1}
222+
lineProps={() => {
223+
const isHighlighted = false;
224+
return {
225+
className: `${isHighlighted ? 'bg-code-editor-dark-highlight block ml-10 w-full' : ''} pr-8`,
226+
};
227+
}}
228+
codeTagProps={{
229+
className: 'mr-8',
230+
}}
231+
>
232+
{JSON.stringify(fetchedInstance, null, 2)}
233+
</Highlight>
234+
</div>
235+
<h2 className='text-h6 font-semibold'>Validation Result</h2>
236+
<div className='flex bg-[#282c34] justify-between items-center text-white font-medium flex-row border p-5 rounded-xl'>
237+
<p>{details[0]}</p>
238+
239+
{details[1] ? (
240+
<img src='/icons/green-tick.svg' alt='green tick' />
241+
) : (
242+
<img src='/icons/red-cross.svg' alt='red cross' />
243+
)}
244+
</div>
245+
</div>
246+
247+
<button
248+
className='absolute right-0 my-4 text-[17px] bg-startBlue text-white px-3 py-1 rounded'
249+
onClick={createZip}
250+
>
251+
Download
252+
</button>
253+
</div>
254+
</>
255+
);
256+
};
257+
258+
export default GettingStarted;

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
"axios": "1.7.2",
2626
"classnames": "^2.3.1",
2727
"feed": "^4.2.2",
28+
"file-saver": "^2.0.5",
2829
"gray-matter": "^4.0.3",
2930
"js-yaml": "^4.1.0",
31+
"jszip": "^3.10.1",
3032
"markdown-to-jsx": "^7.4.7",
3133
"moment": "2.29.4",
3234
"next": "14.2.5",
@@ -47,6 +49,7 @@
4749
},
4850
"devDependencies": {
4951
"@next/eslint-plugin-next": "^14.0.1",
52+
"@types/file-saver": "^2.0.7",
5053
"@types/js-yaml": "^4.0.5",
5154
"@types/node": "^20.0.0",
5255
"@types/react": "18.3.3",

pages/learn/getting-started-step-by-step.md renamed to pages/learn/getting-started-step-by-step/getting-started-step-by-step.md

+8-23
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ title: Creating your first schema
33
section: docs
44
---
55

6-
JSON Schema is a vocabulary that you can use to annotate and validate JSON documents. This tutorial guides you through the process of creating a JSON Schema document.
6+
JSON Schema is a vocabulary that you can use to annotate and validate JSON documents. This tutorial guides you through the process of creating a JSON Schema.
77

8-
After you create the JSON Schema document, you can validate the example data against your schema using a validator in a language of your choice. See <userevent type='plausible-event-name=activation-explore-tools'>[Tools](https://json-schema.org/implementations)</userevent> for a current list of supported validators.
8+
After creating your JSON Schema, you can then validate example data against your schema by using a validator in a language of your choice. Please, visit <userevent type='plausible-event-name=activation-explore-tools'>[Tools](https://json-schema.org/implementations#validators)</userevent> and select the validator that better suit your needs.
9+
10+
If you already know how to create JSON Schemas and you are looking for different JSON Schema use cases like schema generation, code generation, documentation, UI generation or JSON Schema processing or conversion, please visit <userevent type='plausible-event-name=activation-explore-tools'>[Tools](https://json-schema.org/implementations)</userevent> and explore the amazing tooling available in the JSON Schema Ecosystem.
911

1012
<tableofcontent depth={2} />
1113

@@ -573,28 +575,11 @@ With the external schema reference, the overall schema looks like this:
573575

574576
## Validate JSON data against the schema
575577

576-
This section describes how to validate JSON data against the product catalog schema.
578+
Now that you have your JSON Schema is time to validate [JSON data](https://json-schema.org/learn/glossary#instance) against it using a <userevent type='plausible-event-name=activation-explore-tools'>[JSON Schema Validator](https://json-schema.org/implementations#validators)</userevent>.
577579

578-
This example JSON data matches the product catalog schema:
580+
A Validator is a tool that implements the JSON Schema specification. All validators works in a similar way: they take a JSON Schema and a JSON Instance as input and they returns the validation result as output.
579581

580-
```json
581-
{
582-
"productId": 1,
583-
"productName": "An ice sculpture",
584-
"price": 12.50,
585-
"tags": [ "cold", "ice" ],
586-
"dimensions": {
587-
"length": 7.0,
588-
"width": 12.0,
589-
"height": 9.5
590-
},
591-
"warehouseLocation": {
592-
"latitude": -78.75,
593-
"longitude": 20.4
594-
}
595-
}
596-
```
582+
![How JSON Schema works](https://json-schema.org/img/json_schema.svg)
597583

598-
To validate this JSON data against the product catalog JSON Schema, you can use any validator of your choice. In addition to command-line and browser tools, validation tools are available in a wide range of languages, including Java, Python, .NET, and many others. To find a validator that’s right for your project, see <userevent type='plausible-event-name=activation-explore-tools'>[Tools](https://json-schema.org/implementations)</userevent>.
584+
To try it yourself, please visit <userevent type='plausible-event-name=activation-explore-tools'>[Tools](https://json-schema.org/implementations#validators)</userevent> and select the validator that better suit your needs, our use the editors available below to explore the different Schemas and Instances and see the different validation results.
599585

600-
Use the example JSON data as the input data and the product catalog JSON Schema as the schema. Your validation tool compares the data against the schema, and if the data meets all the requirements defined in the schema, validation is successful.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import React from 'react';
2+
import fs from 'fs';
3+
4+
import { getLayout } from '~/components/Sidebar';
5+
import Head from 'next/head';
6+
import { Headline1 } from '~/components/Headlines';
7+
import matter from 'gray-matter';
8+
import StyledMarkdown from '~/components/StyledMarkdown';
9+
import { SectionContext } from '~/context';
10+
import { DocsHelp } from '~/components/DocsHelp';
11+
import GettingStarted from '~/components/GettingStarted';
12+
13+
export async function getStaticProps() {
14+
const block1 = fs.readFileSync(
15+
'pages/learn/getting-started-step-by-step/getting-started-step-by-step.md',
16+
'utf-8',
17+
);
18+
const block2 = fs.readFileSync(
19+
'pages/learn/getting-started-step-by-step/next-steps.md',
20+
'utf-8',
21+
);
22+
const { content: block1Content } = matter(block1);
23+
const { content: block2Content } = matter(block2);
24+
return {
25+
props: {
26+
blocks: [block1Content, block2Content],
27+
},
28+
};
29+
}
30+
31+
export default function StyledValidator({ blocks }: { blocks: any[] }) {
32+
const newTitle = 'Creating your first schema';
33+
34+
return (
35+
<SectionContext.Provider value='docs'>
36+
<Head>
37+
<title>{newTitle}</title>
38+
</Head>
39+
<Headline1>{newTitle}</Headline1>
40+
<StyledMarkdown markdown={blocks[0]} />
41+
<GettingStarted />
42+
<StyledMarkdown markdown={blocks[1]} />
43+
<DocsHelp />
44+
</SectionContext.Provider>
45+
);
46+
}
47+
StyledValidator.getLayout = getLayout;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Getting Started Next Steps
3+
section: docs
4+
---
5+
6+
## What Next?
7+
8+
Now that you know how to create a JSON Schema and use it to validate JSON data, we'd invite you to continue your JSON Schema journey:
9+
* Learn more about JSON Schema by visiting the [reference documentation](../understanding-json-schema).
10+
* Explore the details of the current version of the Spec [2020-12](https://json-schema.org/specification).
11+
12+
If you already know how to create JSON Schemas and you are looking for different JSON Schema use cases like schema generation, code generation, documentation, UI generation or JSON Schema processing or conversion, please visit <userevent type='plausible-event-name=activation-explore-tools'>[Tools](https://json-schema.org/implementations)</userevent> and explore the amazing tooling available in the JSON Schema Ecosystem.

0 commit comments

Comments
 (0)