Skip to content

Commit

Permalink
Feat: Rebuilding getting started component (#687) (#782)
Browse files Browse the repository at this point in the history
* 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 <benjamin.granadosm@gmail.com>

* 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 <alokgupta1560@gmail.com>
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 <jdesrosi@gmail.com>
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] <support@github.com>
    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] <support@github.com>
    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] <support@github.com>
    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] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 753017b
Author: Benjamin Granados <40007659+benjagm@users.noreply.github.com>
Date:   Wed Jul 24 14:15:25 2024 +0200

    New slack redirect

commit 8f099f4
Author: Dhairya Majmudar <124715224+DhairyaMajmudar@users.noreply.github.com>
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 <40007659+benjagm@users.noreply.github.com>
Date:   Wed Jul 24 09:46:39 2024 +0200

    Add docs help component (#820)

commit a58bd36
Author: Benjamin Granados <40007659+benjagm@users.noreply.github.com>
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 <benjamin.granadosm@gmail.com>

    * 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 <benjamin.granadosm@gmail.com>

    * 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 <ayush@betalectic.com>
    Co-authored-by: Benjamin Granados <benjamin.granadosm@gmail.com>

    * 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 <benjamin.granadosm@gmail.com>

    * 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 <benjamin.granadosm@gmail.com>

    * 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 <benjamin.granadosm@gmail.com>

    * 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 <benjamin.granadosm@gmail.com>

    * 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 <40007659+benjagm@users.noreply.github.com>

    * Update pages/overview/welcome/index.page.tsx

    Co-authored-by: Benjamin Granados <40007659+benjagm@users.noreply.github.com>

    * Remove data duplication and fix intro text

    ---------

    Co-authored-by: Benjamin Granados <40007659+benjagm@users.noreply.github.com>
    Co-authored-by: Benjamin Granados <benjamin.granadosm@gmail.com>

    * 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 <40007659+benjagm@users.noreply.github.com>

    * 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 <40007659+benjagm@users.noreply.github.com>

    * Update data/faq.json

    Co-authored-by: Benjamin Granados <40007659+benjagm@users.noreply.github.com>

    * Update data/faq.json

    Co-authored-by: Benjamin Granados <40007659+benjagm@users.noreply.github.com>

    * Update pages/overview/faq/index.page.tsx

    ---------

    Co-authored-by: Benjamin Granados <40007659+benjagm@users.noreply.github.com>

    * 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 <relequestual@gmail.com>

    * 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 <relequestual@gmail.com>

    * Fix the menu links

    * Update the JSON Schema calendar link

    * Change ambassadors image

    ---------

    Co-authored-by: Michael Obubelebra Amachree <amachree9630@gmail.com>
    Co-authored-by: Akshay Bagai <100753870+Akshaybagai52@users.noreply.github.com>
    Co-authored-by: Tamanna <96949249+TamannaVerma99@users.noreply.github.com>
    Co-authored-by: Ayush Nautiyal <78146753+ayushnau@users.noreply.github.com>
    Co-authored-by: AyushNautiyalDeveloper <ayush@betalectic.com>
    Co-authored-by: VivekJaiswal18 <96608169+VivekJaiswal18@users.noreply.github.com>
    Co-authored-by: Neeraj Saini <118799941+officeneerajsaini@users.noreply.github.com>
    Co-authored-by: Dhairya Majmudar <124715224+DhairyaMajmudar@users.noreply.github.com>
    Co-authored-by: Dhairya Majmudar <2022kuec2045@iiitkota.ac.in>
    Co-authored-by: Blessing Ene Anyebe <60541622+kwennB@users.noreply.github.com>
    Co-authored-by: Ben Hutton <relequestual@gmail.com>

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] <support@github.com>
    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] <support@github.com>
    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] <support@github.com>
    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] <support@github.com>
    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] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit af4ba88
Author: Benjamin Granados <40007659+benjagm@users.noreply.github.com>
Date:   Mon Jul 22 14:04:44 2024 +0200

    Add new sponsors (#814)

commit 71a18df
Author: Alok Gupta <alokgupta1560@gmail.com>
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 <jv@jviotti.com>
Date:   Tue Jul 16 12:35:24 2024 -0400

    Add JSON Toolkit as a C++ implementation (#761)

    Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

commit a842501
Author: Zeel Rajodiya <jeelrajodiyajeel@gmail.com>
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 <joostholslag@users.noreply.github.com>
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] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Benjamin Granados <40007659+benjagm@users.noreply.github.com>

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] <support@github.com>
    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] <support@github.com>
    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] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 605bbb3
Author: Alok Gupta <alokgupta1560@gmail.com>
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] <support@github.com>
    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] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 81de1e4
Author: Benjamin Granados <40007659+benjagm@users.noreply.github.com>
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] <support@github.com>
    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] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 7241449
Author: Tabah Baridule M <dulemartins07@gmail.com>
Date:   Wed Jun 26 16:56:00 2024 +0100

    Update pages/understanding-json-schema/structuring.md

    Co-authored-by: Jason Desrosiers <jdesrosi@gmail.com>

commit bd7ddb2
Author: Tabah Baridule M. <dulemartins07@gmail.com>
Date:   Tue Jun 25 15:51:14 2024 +0100

    Update structuring.md

commit 3a29a33
Author: Tabah Baridule M. <dulemartins07@gmail.com>
Date:   Tue Jun 25 15:49:36 2024 +0100

    The URI-references without fragment was remove

commit 43dd3f9
Author: Tabah Baridule M. <dulemartins07@gmail.com>
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 <124715224+DhairyaMajmudar@users.noreply.github.com>
Co-authored-by: Dhairya Majmudar <2022kuec2045@iiitkota.ac.in>
  • Loading branch information
3 people authored Jul 29, 2024
1 parent 2e899cc commit edfb406
Show file tree
Hide file tree
Showing 20 changed files with 717 additions and 54 deletions.
258 changes: 258 additions & 0 deletions components/GettingStarted.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
import React, { useState, useEffect } from 'react';
import { atomOneDark } from 'react-syntax-highlighter/dist/cjs/styles/hljs';
import Highlight from 'react-syntax-highlighter';
import JSZip from 'jszip';
import { saveAs } from 'file-saver';

async function fetchData() {
const response = await fetch('/data/getting-started-examples.json');
const data = await response.json();

const defaultSchemaData = data.find((data: any) => data.default === true);

const schemaResp = await fetch(defaultSchemaData.file);
const schemaData = await schemaResp.json();

const defaultInstanceData = defaultSchemaData.instances.find(
(instance: any) => instance.default === true,
);

const instanceResp = await fetch(defaultInstanceData.file);
const instanceData = await instanceResp.json();

return {
data,
schemaData,
instanceData,
initialInstance: defaultSchemaData.instances,
initialDetails: [defaultInstanceData.details, defaultInstanceData.valid],
};
}

interface SchemaOption {
file: string;
instances: InstanceOption[];
}

interface InstanceOption {
file: string;
details: string;
valid: string;
}

const GettingStarted = () => {
useEffect(() => {
fetchData()
.then(
({
data,
schemaData,
instanceData,
initialInstance,
initialDetails,
}) => {
setOptions(data);
setFetchedSchema(schemaData);
setFetchedInstance(instanceData);
setInstances(initialInstance);
setDetails(initialDetails);
},
)
.catch((e) => console.log('Error: ', e));
}, []);

const [options, setOptions] = useState<SchemaOption[]>([]);
const [instances, setInstances] = useState<InstanceOption[]>([]);
const [details, setDetails] = useState<string[]>(['', '']);
const [fetchedSchema, setFetchedSchema] = useState();
const [fetchedInstance, setFetchedInstance] = useState();

const handleSchemaChange = async (
e: React.ChangeEvent<HTMLSelectElement>,
) => {
const selectedSchema = options.find(
(schema) => schema.file === e.target.value,
);

if (selectedSchema) {
const schemaResponse = await fetch(e.target.value);
const schData = await schemaResponse.json();

setFetchedSchema(schData);
setInstances(selectedSchema.instances);

const instResp = await fetch(selectedSchema.instances[0].file);
const instData = await instResp.json();
setFetchedInstance(instData);
} else {
setInstances([]);
setFetchedSchema(null!);
}
};

const handleInstanceChange = async (
e: React.ChangeEvent<HTMLSelectElement>,
) => {
const selectedInstance = instances.find(
(instance) => instance.file === e.target.value,
) as InstanceOption;

if (selectedInstance) {
const instanceResponse = await fetch(e.target.value);
const instanceData = await instanceResponse.json();

setFetchedInstance(instanceData);
setDetails([selectedInstance.details, selectedInstance.valid]);
} else {
setFetchedInstance(undefined);
}
};

const createZip = async () => {
try {
const zip = new JSZip();
zip.file('schema.json', JSON.stringify(fetchedSchema, null, 2));
zip.file('instance.json', JSON.stringify(fetchedInstance, null, 2));

zip.generateAsync({ type: 'blob' }).then((content) => {
saveAs(content, 'getting-started-examples.zip');
});
} catch (e) {
console.log('Error zipping files', e);
}
};

return (
<>
<div className='relative'>
<div className='flex flex-col'>
<div className='flex items-end flex-row justify-between mt-5 mb-3 '>
<h2 className='text-h6 font-semibold mb-1'>JSON Schema</h2>
<div className='select-wrap'>
<label className='mr-2 max-sm:text-[12px]'>
Select a Schema:
</label>
<select
name='Select a JSON Schema Validator'
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'
id='Examples'
onChange={handleSchemaChange}
>
{options.map((option: any, id: number) => (
<option key={id} value={option.file}>
{option.name}
</option>
))}
</select>
</div>
</div>

<div className='overflow-x-auto flex-basis-0 max-w-full min-w-0 shrink lg:max-w-[800px] xl:max-w-[900px]'>
<Highlight
wrapLines={true}
wrapLongLines={true}
customStyle={{
borderRadius: 10,
paddingTop: 15,
paddingBottom: 10,
paddingLeft: 10,
marginBottom: 20,
maxWidth: '100%',
}}
lineNumberStyle={{
marginRight: 10,
}}
style={atomOneDark}
showLineNumbers
startingLineNumber={1}
lineProps={() => {
const isHighlighted = false;
return {
className: `${isHighlighted ? 'bg-code-editor-dark-highlight block ml-10 w-full' : ''} pr-8`,
};
}}
codeTagProps={{
className: 'mr-8',
}}
>
{JSON.stringify(fetchedSchema, null, 2)}
</Highlight>
</div>
</div>

<div className='flex flex-col'>
<div className='flex items-end flex-row justify-between mt-5 mb-3 '>
<h2 className='text-h6 font-semibold mb-1'>JSON Instance</h2>
<div className='select-wrap'>
<label className='mr-2 max-sm:text-[12px]'>
Select an Instance:
</label>
<select
name='Select a JSON Schema Validator'
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'
id='Examples'
onChange={handleInstanceChange}
>
{instances.map((instance: any, id: number) => (
<option key={id} value={instance.file}>
{instance.name}
</option>
))}
</select>
</div>
</div>
<div className='overflow-x-auto flex-basis-0 max-w-full min-w-0 shrink lg:max-w-[800px] xl:max-w-[900px]'>
<Highlight
wrapLines={true}
wrapLongLines={true}
customStyle={{
borderRadius: 10,
paddingTop: 15,
paddingBottom: 10,
paddingLeft: 10,
marginBottom: 20,
maxWidth: '100%',
}}
lineNumberStyle={{
marginRight: 10,
}}
style={atomOneDark}
showLineNumbers
startingLineNumber={1}
lineProps={() => {
const isHighlighted = false;
return {
className: `${isHighlighted ? 'bg-code-editor-dark-highlight block ml-10 w-full' : ''} pr-8`,
};
}}
codeTagProps={{
className: 'mr-8',
}}
>
{JSON.stringify(fetchedInstance, null, 2)}
</Highlight>
</div>
<h2 className='text-h6 font-semibold'>Validation Result</h2>
<div className='flex bg-[#282c34] justify-between items-center text-white font-medium flex-row border p-5 rounded-xl'>
<p>{details[0]}</p>

{details[1] ? (
<img src='/icons/green-tick.svg' alt='green tick' />
) : (
<img src='/icons/red-cross.svg' alt='red cross' />
)}
</div>
</div>

<button
className='absolute right-0 my-4 text-[17px] bg-startBlue text-white px-3 py-1 rounded'
onClick={createZip}
>
Download
</button>
</div>
</>
);
};

export default GettingStarted;
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
"axios": "1.7.2",
"classnames": "^2.3.1",
"feed": "^4.2.2",
"file-saver": "^2.0.5",
"gray-matter": "^4.0.3",
"js-yaml": "^4.1.0",
"jszip": "^3.10.1",
"markdown-to-jsx": "^7.4.7",
"moment": "2.29.4",
"next": "14.2.5",
Expand All @@ -47,6 +49,7 @@
},
"devDependencies": {
"@next/eslint-plugin-next": "^14.0.1",
"@types/file-saver": "^2.0.7",
"@types/js-yaml": "^4.0.5",
"@types/node": "^20.0.0",
"@types/react": "18.3.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ title: Creating your first schema
section: docs
---

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

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

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.

<tableofcontent depth={2} />

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

## Validate JSON data against the schema

This section describes how to validate JSON data against the product catalog schema.
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>.

This example JSON data matches the product catalog schema:
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.

```json
{
"productId": 1,
"productName": "An ice sculpture",
"price": 12.50,
"tags": [ "cold", "ice" ],
"dimensions": {
"length": 7.0,
"width": 12.0,
"height": 9.5
},
"warehouseLocation": {
"latitude": -78.75,
"longitude": 20.4
}
}
```
![How JSON Schema works](https://json-schema.org/img/json_schema.svg)

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

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.
47 changes: 47 additions & 0 deletions pages/learn/getting-started-step-by-step/index.page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React from 'react';
import fs from 'fs';

import { getLayout } from '~/components/Sidebar';
import Head from 'next/head';
import { Headline1 } from '~/components/Headlines';
import matter from 'gray-matter';
import StyledMarkdown from '~/components/StyledMarkdown';
import { SectionContext } from '~/context';
import { DocsHelp } from '~/components/DocsHelp';
import GettingStarted from '~/components/GettingStarted';

export async function getStaticProps() {
const block1 = fs.readFileSync(
'pages/learn/getting-started-step-by-step/getting-started-step-by-step.md',
'utf-8',
);
const block2 = fs.readFileSync(
'pages/learn/getting-started-step-by-step/next-steps.md',
'utf-8',
);
const { content: block1Content } = matter(block1);
const { content: block2Content } = matter(block2);
return {
props: {
blocks: [block1Content, block2Content],
},
};
}

export default function StyledValidator({ blocks }: { blocks: any[] }) {
const newTitle = 'Creating your first schema';

return (
<SectionContext.Provider value='docs'>
<Head>
<title>{newTitle}</title>
</Head>
<Headline1>{newTitle}</Headline1>
<StyledMarkdown markdown={blocks[0]} />
<GettingStarted />
<StyledMarkdown markdown={blocks[1]} />
<DocsHelp />
</SectionContext.Provider>
);
}
StyledValidator.getLayout = getLayout;
12 changes: 12 additions & 0 deletions pages/learn/getting-started-step-by-step/next-steps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Getting Started Next Steps
section: docs
---

## What Next?

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:
* Learn more about JSON Schema by visiting the [reference documentation](../understanding-json-schema).
* Explore the details of the current version of the Spec [2020-12](https://json-schema.org/specification).

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.
Loading

0 comments on commit edfb406

Please sign in to comment.