diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index 481c85d24..52a77469b 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -35,16 +35,6 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - - name: Cache Next Build - uses: actions/cache@v4 - with: - path: | - ${{ steps.yarn-cache-dir-path.outputs.dir }} - ${{ github.workspace }}/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}- - - name: Setup Node.js uses: actions/setup-node@v4 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45db6aa01..6c9d90e03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: run: yarn run test:coverage:all - name: Upload coverage report to Codecov - uses: codecov/codecov-action@v5.0.2 + uses: codecov/codecov-action@v5.1.2 with: token: ${{ secrets.CODECOV_TOKEN }} name: ${{ env.CODECOV_UNIQUE_NAME }} diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml index 9510d6303..8b0df89be 100644 --- a/.github/workflows/issue.yml +++ b/.github/workflows/issue.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Auto Label Issue - uses: Renato66/auto-label@v3.1.0 + uses: Renato66/auto-label@v3.1.1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} ignore-comments: true diff --git a/.github/workflows/production-deployment.yml b/.github/workflows/production-deployment.yml index feb48ac94..5480e59a0 100644 --- a/.github/workflows/production-deployment.yml +++ b/.github/workflows/production-deployment.yml @@ -26,16 +26,6 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - name: Cache Next Build - uses: actions/cache@v4 - with: - path: | - ${{ steps.yarn-cache-dir-path.outputs.dir }} - ${{ github.workspace }}/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}- - - name: Setup Node.js uses: actions/setup-node@v4 with: diff --git a/CONTRIBUTING-docs.md b/CONTRIBUTING-docs.md index a202e6bf0..7f7093478 100644 --- a/CONTRIBUTING-docs.md +++ b/CONTRIBUTING-docs.md @@ -64,6 +64,22 @@ After you have been assigned to an issue, fork the [json-schema-org/website](htt To propose modifications to our documentation that do not have an issue in the [documentation board](https://github.com/orgs/json-schema-org/projects/16), you can [create a GitHub issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-an-issue#creating-an-issue-from-a-repository) and use the *Documentation* template to describe the changes. After that, you can decide whether you want to work on the changes yourself or let someone else claim the issue. If you decide to work on the issue, assign it to yourself and commit the changes to a new branch. +## Add metadata to newly created markdown files +Metadata helps organize content and maintain consistency across all pages in the documentation. It also provides key information about the file, such as its title, author, and the last updated date. + +When contributing to the documentation, it is essential to include metadata in every new markdown file. Metadata is critical for successfully building and rendering the file locally. Without it, the file may fail to render correctly or cause errors in the documentation system. + +### Example of metadata in a new markdown file +Every new `.md` file should start with a YAML front matter block. Here's an example: +--- + title: "Your Page Title" + section: "docs" # Can be used to categorize the content + date: "YYYY-MM-DD" # Optional: Date when the page was created or last updated + author: "Your Name" # Optional: Your name if you're the author + tags: ["tag1", "tag2"] # Optional: Tags to categorize the page +--- +To add the front matter metadata, copy and paste the example above at the top of your .md file and replace the details with the information of your document. + ## Create a Pull Request To submit your work to review by the community, open a draft pull request to the `main` upstream branch, and add the issue your pull request solves. Add @json-schema-org/docs-team as a reviewer of your pull request, and let us know in the #documentation Slack channel your pull request is ready for review. diff --git a/INSTALLATION.md b/INSTALLATION.md index be3b2cb03..f78296c42 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -4,7 +4,7 @@ This guide provides step-by-step instructions for installing the JSON Schema Web ## Table of Contents -1. [Setting Up the Project](#setting-up-the-project) +1. [Setting Up the Project](#setting-up-project) - [Requirements](#requirements) - [Cloning the Repository](#cloning-the-repository) - [Setting Up Environment Variables](#setting-up-environment-variables) diff --git a/README.md b/README.md index bd735eebf..e165ec321 100644 --- a/README.md +++ b/README.md @@ -20,15 +20,15 @@

# πŸ‘‹ Welcome to the JSON Schema website -This repository contains the sources of JSON Schema website: +This repository contains the source code of the JSON Schema website: -* It's powered by Next.js, -* It uses Tailwind CSS framework, -* It's build and deployed with Netlify. +* Powered by Next.js, +* Uses the Tailwind CSS framework, +* Built and deployed with Netlify. -## Setting up Project +## Setting up the Project -Please refer to the [INSTALLATION.md](./INSTALLATION.md) file for instructions on how to set up the project on your local machine. +Please refer to [INSTALLATION.md](./INSTALLATION.md) for instructions on how to set up the project for local development. ## Project structure @@ -37,41 +37,42 @@ This repository has the following structure: ```text - β”œβ”€β”€ .github # Definitions of GitHub workflows, pull request and issue templates + β”œβ”€β”€ .github # Definitions of GitHub workflows, pull request, and issue templates β”œβ”€β”€ components # Various generic components such as "Button", "Figure", etc. - β”œβ”€β”€ data # JSON Schema Implementations. + β”œβ”€β”€ data # JSON Schema implementations β”œβ”€β”€ styles # Various CSS files - β”œβ”€β”€ lib # Various JS code for preparing static data to render in pages - β”œβ”€β”€ pages # Website's pages source. It includes raw markdown files and React page templates. + β”œβ”€β”€ lib # Various JS code for preparing static data to render on pages + β”œβ”€β”€ pages # Website's pages source, including raw markdown files and React page templates β”‚ β”œβ”€β”€ overview # JSON Schema initiative docs β”‚ β”œβ”€β”€ blog # Blog posts β”‚ β”œβ”€β”€ learn # JSON Schema docs β”‚ └── implementations # Various pages to describe tools - β”œβ”€β”€ public # Data for site metadata and static blog such as images + β”œβ”€β”€ public # Data for site metadata and static assets such as images β”œβ”€β”€ next.config.js # Next.js configuration file ``` ## Contribute - Here are some areas where you can contribute to the website: -- Blogs posts -- Case Studies + +- Blog posts +- Case studies - Design -- Documentation +- Documentation improvements - Website enhancements -- Add a new JSON Schema Implementation +- Add a new JSON Schema implementation - JSON Schema Landscape -To figure out a good first issue to work on, join our Slack workspace and visit the `#contribute` channel. This channel is specifically designed for onboarding and supporting new contributors. +To identify good first issues to work on, join our Slack workspace and visit the `#contribute` channel. This channel is specifically designed for onboarding and supporting new contributors. You should also check out our [Contributing guidelines](./CONTRIBUTING.md). ### Contributors -Thanks goes to these wonderful people who contributed to this website: - - +Thanks to these wonderful people who contributed to this website: +
+
+ Made with [contributors-img](https://contrib.rocks). @@ -83,19 +84,20 @@ Thanks goes to these wonderful people who contributed to this website: ### Backers **Thank you to all our backers!** + [![Backers](https://opencollective.com/json-schema/backers.svg)](https://opencollective.com/json-schema/backers.svg?avatarHeight=90) ## Connect with the JSON Schema Community

- JSON Schema Slack - JSON Schema Twitter - JSON Schema LinkedIn - JSON Schema YouTube + JSON Schema Slack + JSON Schema Twitter + JSON Schema LinkedIn + JSON Schema YouTube

## Inspired by -This document has been inspired by [AsyncAPI website README.md](https://github.com/asyncapi/website/blob/master/README.md). +This document was inspired by [AsyncAPI website README.md](https://github.com/asyncapi/website/blob/master/README.md). ## License -The contents of this repository are [licensed under](./LICENSE) either the BSD 3-clause license *or* the Academic Free License v3.0. +The contents of this repository are licensed under either the BSD 3-clause license *or* the Academic Free License v3.0. See [LICENSE](./LICENSE). diff --git a/_includes/community b/_includes/community index 06eb0ef74..b81462a65 160000 --- a/_includes/community +++ b/_includes/community @@ -1 +1 @@ -Subproject commit 06eb0ef7410a7eb345311e5ef7438e83423dd51a +Subproject commit b81462a65d1f9d4941edfa8a4eff8189c2ef1068 diff --git a/components/AmbassadorsBanner.tsx b/components/AmbassadorsBanner.tsx new file mode 100644 index 000000000..68514fb21 --- /dev/null +++ b/components/AmbassadorsBanner.tsx @@ -0,0 +1,35 @@ +import Link from 'next/link'; +import React from 'react'; + +const AmbassadorBanner: React.FC = () => { + return ( +
+
+

+ Become a JSON Schema Ambassador +

+

+ The JSON Schema Ambassador program is now open for applications! If + you're selected, you'll join JSON Schema's mission of helping + community members all over the world build the future of JSON Schema. +

+
+ + Become Ambassador + + + Learn More + +
+
+
+ ); +}; + +export default AmbassadorBanner; diff --git a/components/AmbassadorsCard.tsx b/components/AmbassadorsCard.tsx new file mode 100644 index 000000000..ad287ce64 --- /dev/null +++ b/components/AmbassadorsCard.tsx @@ -0,0 +1,219 @@ +import React, { useState } from 'react'; +import Image from 'next/image'; + +interface Contribution { + title: string; + date?: { + month: string; + year: number; + }; + link: string; + type: string; +} + +export interface Ambassador { + img?: string; + name?: string; + title?: string; + bio?: string; + company?: string; + country?: string; + github?: string; + twitter?: string; + mastodon?: string; + linkedin?: string; + contributions?: Contribution[]; +} + +type SocialIcons = 'github' | 'twitter' | 'mastodon' | 'linkedin'; + +const getSocialMediaUrl = ( + platform: SocialIcons, + username: string | undefined, +) => { + const baseUrls: Record = { + github: 'https://github.com/', + twitter: 'https://twitter.com/', + mastodon: 'https://fosstodon.org/', + linkedin: 'https://www.linkedin.com/in/', + }; + return username ? baseUrls[platform] + username : undefined; +}; + +const SocialIcon = ({ platform }: { platform: SocialIcons }) => { + const icons: Record = { + github: ( + + + + ), + twitter: ( + + + + ), + linkedin: ( + + + + + + ), + mastodon: ( + + + + ), + }; + return icons[platform]; +}; + +const AmbassadorCard = ({ ambassador }: { ambassador: Ambassador }) => { + const [showContributions, setShowContributions] = useState(false); + const [imgSrc, setImgSrc] = useState( + ambassador.img || '/api/placeholder/400/320', + ); + + const { + name = 'Ambassador', + title, + bio, + company, + country, + contributions = [], + } = ambassador; + + const SocialIconss: SocialIcons[] = [ + 'github', + 'twitter', + 'mastodon', + 'linkedin', + ]; + + return ( +
+
+
+
+
+ + {`${name} setImgSrc(`/img/ambassadors/${name}.jpg`)} + /> + +
+

+ {name} +

+ {title && ( +

{title}

+ )} + {bio && ( +

+ {bio} +

+ )} + {(company || country) && ( +

+ {company} + {company && country && ', '} + {country} +

+ )} + +
+ {SocialIconss.map((platform) => { + const username = ambassador[platform]; + return username ? ( + + + + ) : null; + })} +
+ + {contributions.length > 0 && ( + + )} + + {showContributions && contributions.length > 0 && ( +
+

+ Contributions +

+
    + {contributions.map((contribution, index) => ( +
  • + {contribution.title} + {contribution.date && + ` (${contribution.date.month} ${contribution.date.year})`}{' '} + - + + {contribution.type} + +
  • + ))} +
+
+ )} +
+
+ ); +}; + +export default AmbassadorCard; diff --git a/components/AmbassadorsList.tsx b/components/AmbassadorsList.tsx new file mode 100644 index 000000000..0328f4772 --- /dev/null +++ b/components/AmbassadorsList.tsx @@ -0,0 +1,41 @@ +import React from 'react'; + +interface AmbassadorsLink { + title: string; + icon: string; + details: string; +} + +interface AmbassadorsListProps { + ambassadorList: { + contents: AmbassadorsLink[]; + }; +} + +const AmbassadorList = ({ ambassadorList }: AmbassadorsListProps) => { + return ( + + ); +}; + +export default AmbassadorList; diff --git a/components/Card.tsx b/components/Card.tsx index 3502d3831..5900682d3 100644 --- a/components/Card.tsx +++ b/components/Card.tsx @@ -36,7 +36,11 @@ const CardBody = ({
{image && ( - + )}
diff --git a/components/DocTable.tsx b/components/DocTable.tsx index 770a660ca..8b668261a 100644 --- a/components/DocTable.tsx +++ b/components/DocTable.tsx @@ -4,50 +4,53 @@ import Link from 'next/link'; const DocTable = ({ frontmatter }: any) => { return ( <> -
- +
+
+
Specification Details
+
+
- - + - - - - + + - - + - - -
- Specification +
+ Specification + - {' '} {frontmatter.Specification}
- Published - - {frontmatter.Published} +
+ Published {frontmatter.Published}
- Authors +
+ Authors - {frontmatter.authors.map((author: string, index: number) => { - return
{author}
; - })} +
+ {frontmatter.authors.map((author: string, index: number) => ( + + {author} + {index < frontmatter.authors.length - 1 ? ', ' : ''} + + ))}
- Metaschema + + Metaschema + {frontmatter.Metaschema} diff --git a/components/Layout.tsx b/components/Layout.tsx index d2e5287d7..3a3b5bbd6 100644 --- a/components/Layout.tsx +++ b/components/Layout.tsx @@ -137,18 +137,26 @@ const MainNavLink = ({ className?: string; }) => { const router = useRouter(); + const isActiveNav = extractPathWithoutFragment(router.asPath) === uri; + return ( {label} @@ -201,7 +209,7 @@ const MainNavigation = () => { @@ -290,7 +298,11 @@ const MobileNav = () => { isActive={section === 'docs'} /> - + +*/ + +export default function NextPrevButton({ + prevLabel, + prevURL, + nextLabel, + nextURL, +}: any) { + return ( +
+ {prevURL && prevLabel ? ( +
+
+ +
+ prev icon +
+ Go Back +
+
+
+ {prevLabel} +
+ +
+
+ ) : ( +
+ )} + + {nextURL && nextLabel ? ( +
+
+ +
+ next icon +
+ Up Next +
+
+
+ {nextLabel} +
+ +
+
+ ) : ( +
+ )} +
+ ); +} diff --git a/components/NextPrevButton.tsx b/components/NextPrevButton.tsx deleted file mode 100644 index 6c88b641c..000000000 --- a/components/NextPrevButton.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import Image from 'next/image'; -import React from 'react'; -import Link from 'next/link'; - -/* -To use this component: -1) Add prev and next metadata to the markdown page following this format: - ---- -title: Creating your first schema -section: docs -prev: - label: prev - url: '#1' -next: - label: Miscellaneous examples - url: '#2' ---- - -2) Add the component to the typescript page: - -import NextPrevButton from '~/components/NextPrevButton'; - -3) Add the component to the body of the page: - - -*/ - -export default function NextPrevButton({ - prevLabel, - prevURL, - nextLabel, - nextURL, -}: any) { - return ( -
-
-
- -
- prev icon -
Go Back
-
-
- {prevLabel} -
- -
-
- -
-
- -
- next icon -
Up Next
-
-
- {nextLabel} -
- -
-
-
- ); -} diff --git a/components/StyledMarkdown.tsx b/components/StyledMarkdown.tsx index a56cd48ee..53f771545 100644 --- a/components/StyledMarkdown.tsx +++ b/components/StyledMarkdown.tsx @@ -191,6 +191,16 @@ const StyledMarkdownBlock = ({ markdown }: { markdown: string }) => {

), }, + specialBox: { + component: ({ children }) => { + return ( +
+ {children} +
+ ); + }, + }, + a: { component: ({ children, href, title, className }) => { if (!href) return children; @@ -509,8 +519,8 @@ const StyledMarkdownBlock = ({ markdown }: { markdown: string }) => {
menu-icon @@ -552,11 +562,8 @@ export function TableOfContentMarkdown({ return ( - - ● - {children} ); @@ -572,7 +579,7 @@ export function TableOfContentMarkdown({ return ( {children} @@ -668,6 +675,7 @@ export function TableOfContentMarkdown({ 'figure', 'Bigquote', 'Regularquote', + 'specialBox', ), }, }} diff --git a/context.ts b/context.ts index a091c1cb3..2d7bbee79 100644 --- a/context.ts +++ b/context.ts @@ -20,6 +20,7 @@ export const SectionContext = React.createContext< | 'getting-started' | 'reference' | 'roadmap' + | 'ambassador' >(null); export const BlockContext = React.createContext(null); export const FullMarkdownContext = React.createContext(null); diff --git a/data/ambassadors-contributions.json b/data/ambassadors-contributions.json new file mode 100644 index 000000000..9bc6cab4c --- /dev/null +++ b/data/ambassadors-contributions.json @@ -0,0 +1,56 @@ +{ + "contents": [ + { + "title": "Written content", + "details": "Write guides, step-by-step tutorials, community documentation, JSON Schema blog posts, and beyond.", + "icon": "/img/ambassadors/illustrations/content.png" + }, + { + "title": "Podcasts and Videos", + "details": "Produce educational videos, podcasts or livestreams speaking about JSON Schema.", + "icon": "/img/ambassadors/illustrations/video.png" + }, + { + "title": "Give talks", + "details": "Speak at meetups and conferences; we'll help with slides, abstract submissions, and travel budget.", + "icon": "/img/ambassadors/illustrations/speaker.png" + }, + { + "title": "JSON Schema Contributions", + "details": "Collaborate with the JSON Schema community via diverse contributions and improvements.", + "icon": "/img/ambassadors/illustrations/contributing.png" + }, + { + "title": "Ecosystem Impact", + "details": "Promote JSON Schema adoption in other ecosystems.", + "icon": "/img/ambassadors/illustrations/ecosystem.png" + }, + { + "title": "Gather Case Studies", + "details": "Collaborate in the production of case-studies.", + "icon": "/img/ambassadors/illustrations/case-studies.png" + } + ], + "tokens": [ + { + "emoji": "πŸ—ΊοΈ", + "title": "Travel", + "details": "Ambassadors are provided free entry to JSON conferences." + }, + { + "emoji": "🌟", + "title": "Recognition", + "details": "Ambassadors receive community-wide recognition." + }, + { + "emoji": "🎁", + "title": "Special Swags", + "details": "Community members recognize you by gifting you exclusive JSON Ambassador swag." + }, + { + "emoji": "🧰", + "title": "Workshop Swags", + "details": "Ambassadors are gifted swag from JSON conferences and workshops." + } + ] +} diff --git a/data/ambassadors.json b/data/ambassadors.json new file mode 120000 index 000000000..c31a66dcb --- /dev/null +++ b/data/ambassadors.json @@ -0,0 +1 @@ +../_includes/community/programs/ambassadors/ambassadors.json \ No newline at end of file diff --git a/data/case-studies.json b/data/case-studies.json index dd4510d46..66daf24ce 100644 --- a/data/case-studies.json +++ b/data/case-studies.json @@ -61,5 +61,14 @@ "lang": "URL1", "url": "/blog/posts/w3c-wot-case-study" } + }, + { + "title": "JSON Schema deduplicated complex logic and validation at Cookpad", + "summary": "Learn how Cookpad used JSON Schema to reduce incomplete input of newly registered items from 10% to 0%.", + "logo": "/img/logos/cookpad-logo.png", + "links": { + "lang": "URL1", + "url": "/blog/posts/cookpad-case-study-en" + } } ] diff --git a/data/hyper-libraries-obsolete.yml b/data/hyper-libraries-obsolete.yml deleted file mode 100644 index 10a55c4a8..000000000 --- a/data/hyper-libraries-obsolete.yml +++ /dev/null @@ -1,15 +0,0 @@ -- name: JavaScript - implementations: - - name: Jsonary - url: "http://jsonary.com/" - license: MIT - date-draft: [] - draft: [4] -- name: Python - implementations: - - name: Core API Hyper-Schema codec - url: "https://github.com/core-api/python-jsonhyperschema-codec" - notes: "Draft-06+ progress: issue [12](https://github.com/core-api/python-jsonhyperschema-codec/issues/12)" - date-draft: [] - draft: [4] - license: BSD-2-Clause diff --git a/data/tooling-data.schema.json b/data/tooling-data.schema.json index b91ae2365..75d0d435c 100644 --- a/data/tooling-data.schema.json +++ b/data/tooling-data.schema.json @@ -121,7 +121,7 @@ "C#", "Go", "C++", - "JavaScript", + "JavaScript", "Julia" ] ] @@ -280,6 +280,11 @@ "description": "The date when the tool was most recently updated. The date should be in the format YYYY-MM-DD, representing the year, month, and day of the update.", "type": "string", "format": "date" + }, + "status": { + "description": "Current status of the project, indicating its phase of development or maintenance.", + "type": "string", + "enum": ["active", "obsolete"] } }, "required": ["name", "toolingTypes"], diff --git a/data/tooling-data.yaml b/data/tooling-data.yaml index 46c551e64..710113da9 100644 --- a/data/tooling-data.yaml +++ b/data/tooling-data.yaml @@ -1106,6 +1106,7 @@ supportedDialects: draft: ['4', '6', '7'] lastUpdated: '2020-11-30' + status: 'obsolete' - name: php-json-schema-bench description: 'Comparative benchmark for JSON-schema PHP validators using JSON-Schema Test Suite and z-schema/JSCK.' @@ -2435,3 +2436,614 @@ supportedDialects: draft: ['7'] lastUpdated: '2024-10-24' + +- name: Jsonary + description: 'Quickly assemble clients for JSON-based APIs (powered by JSON Schema)' + toolingTypes: ['hyper-schema'] + languages: ['Javascript'] + license: 'MIT' + source: 'https://github.com/jsonary-js/jsonary' + supportedDialects: + draft: ['4'] + status: 'obsolete' + lastUpdated: '2015-05-08' + +- name: Core API Hyper-Schema codec + description: 'A JSON Hyperschema codec for Core API.' + toolingTypes: ['hyper-schema'] + languages: ['Python'] + maintainers: + - name: 'Tom Christie' + username: 'tomchristie' + platform: 'github' + license: 'BSD-2-Clause' + source: 'https://github.com/core-api/python-jsonhyperschema-codec' + supportedDialects: + draft: ['4'] + status: 'obsolete' + lastUpdated: '2018-02-27' + +- name: NJsonSchema + description: 'JSON Schema reader, generator and validator for .NET' + toolingTypes: [validator] + languages: ['.NET'] + license: 'Ms-PL' + source: http://NJsonSchema.org + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: Manatee.Json + toolingTypes: ['validator'] + languages: ['.NET'] + license: MIT + source: https://github.com/gregsdennis/Manatee.Json + supportedDialects: + draft: ['4', '6', '7'] + status: 'obsolete' + +- name: WJElement + toolingTypes: ['validator'] + languages: ['C'] + license: 'AGPL-3.0' + source: https://github.com/netmail-open/wjelement + supportedDialects: + draft: ['3', '4'] + toolingListingNotes: 'Draft-06+ progress: issue 17' + status: 'obsolete' + +- name: wjelement-cpp + toolingTypes: ['validator'] + languages: ['C++'] + license: 'AGPL-3.0' + source: https://github.com/petehug/wjelement-cpp + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: Header-only C++ library for JSON Schema validation + toolingTypes: ['validator'] + languages: ['C++'] + license: BSD-2-Clause + source: https://github.com/tristanpenman/valijson + supportedDialects: + draft: ['3', '4'] + status: 'obsolete' + +- name: Modern C++ JSON schema validator + toolingTypes: ['validator'] + languages: ['C++'] + license: MIT + source: https://github.com/pboettch/json-schema-validator + supportedDialects: + draft: ['4'] + toolingListingNotes: 'based on JSON for Modern C++' + status: 'obsolete' + +- name: scjsv + toolingTypes: ['validator'] + languages: ['Clojure'] + license: 'EPL-1.0' + source: https://github.com/metosin/scjsv + supportedDialects: + draft: ['4'] + toolingListingNotes: '(wrapper for java-json-tools/json-schema-validator)' + status: 'obsolete' + +- name: json-schema validator + toolingTypes: ['validator'] + languages: ['Clojure'] + license: MIT + source: https://github.com/tatut/json-schema + supportedDialects: + draft: ['3', '4'] + status: 'obsolete' + +- name: JSCK + toolingTypes: ['validator'] + languages: ['CoffeeScript'] + license: MIT + source: https://github.com/pandastrike/jsck + supportedDialects: + draft: ['3', '4'] + status: 'obsolete' + +- name: json_schema + toolingTypes: ['validator'] + languages: ['Dart'] + license: 'BSL-1.0' + source: https://github.com/patefacio/json_schema + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: Elixir JSON Schema validator + toolingTypes: ['validator'] + languages: ['Elixir'] + license: MIT + source: https://github.com/jonasschmidt/ex_json_schema + supportedDialects: + draft: ['4'] + toolingListingNotes: 'Draft-06+ progress: issue 24; branch multi-draft-support' + status: 'obsolete' + +- name: validate-json + toolingTypes: ['validator'] + languages: ['Go'] + license: GPL-2.0 + source: https://github.com/cesanta/validate-json + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: hjsonschema + toolingTypes: ['validator'] + languages: ['Haskell'] + license: MIT + source: https://github.com/seagreen/hjsonschema + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: json-schema-validator + toolingTypes: ['validator'] + languages: ['Java'] + license: 'LGPL-3.0' + source: https://github.com/java-json-tools/json-schema-validator + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: jsonschema + toolingTypes: ['validator'] + languages: ['JavaScript'] + license: MIT + source: https://github.com/tdegrunt/jsonschema + supportedDialects: + draft: ['4'] + toolingListingNotes: 'for Node.js' + status: 'obsolete' + +- name: tv4 + toolingTypes: ['validator'] + languages: ['JavaScript'] + license: 'MIT' + source: http://geraintluff.github.com/tv4/ + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: is-my-json-valid + toolingTypes: ['validator'] + languages: ['JavaScript'] + license: 'MIT' + source: https://github.com/mafintosh/is-my-json-valid + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: JaySchema + toolingTypes: ['validator'] + languages: ['JavaScript'] + license: 'BSD-3-Clause' + source: https://github.com/natesilva/jayschema + supportedDialects: + draft: ['4'] + toolingListingNotes: 'for Node.js' + status: 'obsolete' + +- name: z-schema + toolingTypes: ['validator'] + languages: ['JavaScript'] + license: 'MIT' + source: https://github.com/zaggino/z-schema + supportedDialects: + draft: ['4'] + toolingListingNotes: 'for Node.js' + status: 'obsolete' + +- name: direct-schema + toolingTypes: ['validator'] + languages: ['JavaScript'] + license: 'BSD-3-Clause' + source: http://github.com/IreneKnapp/direct-schema + supportedDialects: + draft: ['3'] + status: 'obsolete' + +- name: JSV + toolingTypes: ['validator'] + languages: ['JavaScript'] + license: 'BSD-3-Clause' + source: http://github.com/garycourt/JSV + supportedDialects: + draft: ['1', '2', '3'] + status: 'obsolete' + +- name: json-schema + toolingTypes: ['validator'] + languages: ['JavaScript'] + license: 'BSD-3-Clause' + source: https://github.com/kriszyp/json-schema + supportedDialects: + draft: ['4'] + toolingListingNotes: 'part of the [Persevere](http://github.com/kriszyp/json-schema) project' + status: 'obsolete' + +- name: schema.js + toolingTypes: ['validator'] + languages: ['JavaScript'] + license: 'MIT' + source: https://github.com/akidee/schema.js + supportedDialects: + draft: ['2'] + status: 'obsolete' + +- name: json-gate + toolingTypes: ['validator'] + languages: ['JavaScript'] + license: 'MIT' + source: https://github.com/oferei/json-gate + supportedDialects: + draft: ['3'] + status: 'obsolete' + +- name: JSEN + toolingTypes: ['validator'] + languages: ['JavaScript'] + license: 'MIT' + source: https://github.com/bugventure/jsen + supportedDialects: + draft: ['3'] + toolingListingNotes: 'for Node.js' + status: 'obsolete' + +- name: Skeemas + toolingTypes: ['validator'] + languages: ['JavaScript'] + license: 'MIT' + source: https://github.com/ericgj/json-schema-valid + supportedDialects: + draft: ['3', '4'] + status: 'obsolete' + +- name: Jassi + toolingTypes: ['validator'] + languages: ['JavaScript'] + license: 'GPL-3.0' + source: https://github.com/iclanzan/jassi + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: json-schema-valid + toolingTypes: ['validator'] + languages: ['JavaScript'] + license: 'MIT' + source: https://github.com/ericgj/json-schema-valid + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: jsv4-php + toolingTypes: ['validator'] + languages: ['PHP'] + license: 'MIT' + source: https://github.com/geraintluff/jsv4-php + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: JVal + toolingTypes: ['validator'] + languages: ['PHP'] + license: 'MIT' + source: https://github.com/stefk/jval + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: JSON Guard + toolingTypes: ['validator'] + languages: ['PHP'] + license: 'MIT' + source: https://github.com/thephpleague/json-guard + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: JSV::Validator + toolingTypes: ['validator'] + languages: ['Perl'] + license: MIT + source: https://metacpan.org/module/JSV::Validator + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: postgres-json-schema + toolingTypes: ['validator'] + languages: ['PostgreSQL'] + license: 'PostgreSQL' + source: https://github.com/gavinwahl/postgres-json-schema + supportedDialects: + draft: ['4'] + toolingListingNotes: 'PL/pgSQL implementation, no remote (http) references' + status: 'obsolete' + +- name: json_schema + toolingTypes: ['validator'] + languages: ['Ruby'] + license: MIT + source: https://github.com/brandur/json_schema + supportedDialects: + draft: ['4'] + toolingListingNotes: 'Schema parser and validator, with hyper-schema support' + status: 'obsolete' + +- name: json-schema + toolingTypes: ['validator'] + languages: ['Ruby'] + license: MIT + source: https://github.com/hoxworth/json-schema + supportedDialects: + draft: ['1', '2', '3', '4'] + status: 'obsolete' + +- name: valico + toolingTypes: ['validator'] + languages: ['Rust'] + license: MIT + source: https://github.com/rustless/valico + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: json-schema-parser + toolingTypes: ['validator'] + languages: ['Scala'] + license: Apache-2.0 + source: https://github.com/VoxSupplyChain/json-schema-parser + supportedDialects: + draft: ['4'] + toolingListingNotes: 'Schema parser and validator' + status: 'obsolete' + +- name: JSONSchema + toolingTypes: ['validator'] + languages: ['Swift'] + license: BSD-3-Clause + source: https://github.com/kylef/JSONSchema.swift + supportedDialects: + draft: ['4'] + status: 'obsolete' + +- name: 'JSL' + description: 'a Python DSL for defining JSON Schemas' + toolingTypes: [code-to-schema] + languages: ['Python'] + license: 'BSD-3-Clause' + source: 'https://github.com/aromanovich/jsl' + status: 'obsolete' + +- name: 'json-schema-generator' + description: 'Node.js library usable both as a CLI util and as a Node module' + toolingTypes: [code-to-schema] + languages: ['JavaScript'] + license: 'MIT' + source: 'https://github.com/krg7880/json-schema-generator' + status: 'obsolete' + +- name: 'Typson' + toolingTypes: ['code-to-schema'] + languages: ['TypeScript'] + source: 'https://github.com/lbovet/typson' + license: 'Apache-2.0' + status: 'obsolete' + +- name: 'JSON Schema Generator' + description: 'Free extension' + toolingTypes: ['code-to-schema', 'editor-plugins'] + homepage: 'https://visualstudiogallery.msdn.microsoft.com/b4515ef8-a518-41ca-b48c-bb1fd4e6faf7' + status: 'obsolete' + +- name: 'API-Add-In' + description: 'Sparx EA extension for exporting JSON Schema from UML models' + toolingTypes: ['code-to-schema'] + source: 'https://github.com/bayeslife/api-add-in' + status: 'obsolete' + +- name: 'json-schema-generator' + description: 'JSON-Schema + fake data generators' + toolingTypes: ['schema-to-data'] + languages: ['JavaScript'] + source: 'https://github.com/json-schema-faker' + license: 'MIT' + status: 'obsolete' + +- name: 'DJsonSchema' + description: 'JSON Schema reader and code generator for Delphi' + toolingTypes: ['schema-to-code'] + languages: ['Delphi'] + source: 'https://github.com/schlothauer-wauer/DJsonSchema' + license: 'MIT' + status: 'obsolete' + +- name: 'aeson-schema' + description: 'Generates code for a parser' + toolingTypes: ['schema-to-code'] + languages: ['Haskell'] + source: 'https://github.com/Fuuzetsu/aeson-schema' + license: 'MIT' + status: 'obsolete' + +- name: 'autoparse' + toolingTypes: ['schema-to-code'] + languages: ['Ruby'] + source: 'https://github.com/google/autoparse' + license: 'Apache-2.0' + status: 'obsolete' + +- name: 'json-schema-codegen' + description: 'Tool and SBT plugin for generating Scala, TypeScript models and parsers from JSON-Schema definitions, supports draft 4' + toolingTypes: ['schema-to-code'] + languages: ['Scala'] + source: 'https://github.com/VoxSupplyChain/json-schema-codegen' + license: 'Apache-2.0' + status: 'obsolete' + +- name: 'Argus' + description: 'Macros for building models from JSON Schemas' + toolingTypes: ['schema-to-code'] + languages: ['Scala'] + source: 'https://github.com/aishfenton/argus' + license: 'MIT' + status: 'obsolete' + +- name: 'Bric-Γ -brac' + description: 'Generates idiomatic swift structs and parser/serializer from JSON schemas' + toolingTypes: ['schema-to-code'] + languages: ['Swift'] + source: 'https://github.com/glimpseio/BricBrac' + license: 'MIT' + status: 'obsolete' + +- name: 'gojsonschema' + description: 'Golang package for generating Golang structs, support for Draft 4. [Demo](http://json.golang.chinazt.cc)' + toolingTypes: ['schema-to-code'] + languages: ['Go'] + source: 'https://github.com/andy-zhangtao/gojsonschema' + homepage: 'http://json.golang.chinazt.cc' + license: 'Apache-2.0' + status: 'obsolete' + +- name: 'JSON Editor' + toolingTypes: ['schema-to-web-UI'] + languages: ['JavaScript'] + source: 'https://github.com/jdorn/json-editor' + license: 'MIT' + status: 'obsolete' + +- name: 'JSONForms' + description: 'Developed by EclipseSource' + toolingTypes: ['schema-to-web-UI'] + languages: ['JavaScript'] + homepage: 'https://jsonforms.io' + license: 'MIT' + status: 'obsolete' + +- name: 'Jsonary' + toolingTypes: ['schema-to-web-UI'] + languages: ['JavaScript'] + homepage: 'https://jsonary.com/' + license: 'MIT' + status: 'obsolete' + +- name: 'Metawidget' + toolingTypes: ['schema-to-web-UI'] + languages: ['JavaScript'] + homepage: 'https://metawidget.org/' + license: 'LGPL-2.1' + status: 'obsolete' + +- name: 'pure-form webcomponent' + toolingTypes: ['schema-to-web-UI'] + languages: ['JavaScript'] + source: 'https://github.com/john-doherty/pure-form' + license: 'MIT' + status: 'obsolete' + +- name: 'Liquid XML Studio 2016' + description: 'Graphical JSON schema editor for draft 4, context-sensitive IntelliSense for JSON documents' + toolingTypes: ['editor'] + homepage: 'https://www.liquid-technologies.com/json-schema-editor' + status: 'obsolete' + +- name: 'ReSharper 2016.1' + description: 'Code completion, inspections, and quick fixes for JSON schema in Visual Studio 2010 - 2015, including support for JSON Path and regular expressions for schema editing. Supports draft-4' + toolingTypes: ['editor'] + homepage: 'https://www.jetbrains.com/resharper/' + status: 'obsolete' + +- name: 'Visual Studio 2013' + description: 'Auto-completion and tooltips based on JSON schema draft 3 and draft 4' + toolingTypes: ['editor'] + homepage: 'http://www.visualstudio.com/' + status: 'obsolete' + +- name: 'JSON Schema Editor' + description: 'An intuitive editor for JSON schema online' + toolingTypes: ['editor'] + homepage: 'https://json-schema-editor.tangramjs.com' + status: 'obsolete' + +- name: 'JSON Editor (Tangram)' + description: 'An online, schema-aware editor for JSON document' + toolingTypes: ['editor'] + homepage: 'https://json-editor.tangramjs.com' + status: 'obsolete' + +- name: 'JSON Schema Compatibility' + description: 'Converts draft 3 to draft 4' + toolingTypes: ['util-draft-migration'] + languages: ['JavaScript'] + source: 'https://github.com/geraintluff/json-schema-compatability' + license: 'CC0-1.0' + status: 'obsolete' + +- name: 'Matic' + toolingTypes: ['documentation'] + languages: ['JavaScript'] + source: 'https://github.com/mattyod/matic' + license: 'MIT' + status: 'obsolete' + +- name: 'Docson' + toolingTypes: ['documentation'] + languages: ['JavaScript'] + source: 'https://github.com/lbovet/docson' + license: 'Apache-2.0' + status: 'obsolete' + +- name: 'doca' + description: 'See @cloudflare/doca for draft-06+ support' + toolingTypes: ['documentation'] + languages: ['JavaScript'] + source: 'https://github.com/cloudflare/doca/' + license: 'BSD-2-Clause' + status: 'obsolete' + +- name: 'prmd' + toolingTypes: ['documentation'] + languages: ['JavaScript'] + source: 'https://github.com/interagent/prmd' + license: 'MIT' + status: 'obsolete' + +- name: 'Dojo' + description: 'Supports some aspects of JSON Schema' + toolingTypes: ['util-general-processing'] + languages: ['JavaScript'] + homepage: 'https://www.dojotoolkit.org/' + license: 'AFL-2.1 OR BSD-3-Clause' + status: 'obsolete' + +- name: 'JSON Schema Random' + toolingTypes: ['schema-to-data'] + languages: ['JavaScript'] + source: 'https://github.com/andreineculau/json-schema-random' + license: 'Apache-2.0' + status: 'obsolete' + +- name: protoc-gen-jsonschema + description: 'JsonSchema generator plugin for Google Protocol Buffers' + toolingTypes: ['model-to-schema'] + languages: ['Protocol Buffers'] + maintainers: + - name: 'Uanid' + username: 'uanid' + platform: 'github' + license: 'Apache-2.0' + source: 'https://github.com/pubg/protoc-gen-jsonschema' + supportedDialects: + draft: ['4', '6', '7', '2019-09', '2020-12'] \ No newline at end of file diff --git a/data/validator-libraries-obsolete.yml b/data/validator-libraries-obsolete.yml deleted file mode 100644 index 127fb16e6..000000000 --- a/data/validator-libraries-obsolete.yml +++ /dev/null @@ -1,250 +0,0 @@ -- name: .NET - anchor-name: dotnet - implementations: - - name: NJsonSchema - url: http://NJsonSchema.org - date-draft: [] - draft: [4] - license: Ms-PL - - name: Manatee.Json - url: https://github.com/gregsdennis/Manatee.Json - date-draft: [2019-09] - draft: [7, 6, 4] - license: MIT -- name: C - implementations: - - name: WJElement - url: https://github.com/netmail-open/wjelement - date-draft: [] - draft: [4, 3] - license: LGPL-3.0 - notes: "Draft-06+ progress: issue [17](https://github.com/netmail-open/wjelement/issues/17#issuecomment-390899432)" -- name: C++ - anchor-name: cpp - implementations: - - name: wjelement-cpp - url: https://github.com/petehug/wjelement-cpp - date-draft: [] - draft: [4] - license: LGPLv3 - - name: Header-only C++ library for JSON Schema validation - url: https://github.com/tristanpenman/valijson - date-draft: [] - draft: [4, 3] - license: BSD-2-Clause - - name: Modern C++ JSON schema validator - url: https://github.com/pboettch/json-schema-validator - notes: "based on JSON for Modern C++" - date-draft: [] - draft: [4] - license: "MIT" -- name: Clojure - implementations: - - name: scjsv - url: https://github.com/metosin/scjsv - notes: "(wrapper for [java-json-tools/json-schema-validator](https://github.com/java-json-tools/json-schema-validator))" - date-draft: [] - draft: [4] - license: Eclipse Public License v1.0 - - name: json-schema validator - url: https://github.com/tatut/json-schema - date-draft: [] - draft: [3, 4] - license: MIT -- name: CoffeeScript - implementations: - - name: JSCK - url: https://github.com/pandastrike/jsck - date-draft: [] - draft: [4, 3] - license: MIT -- name: Dart - implementations: - - name: json_schema - url: https://github.com/patefacio/json_schema - date-draft: [] - draft: [4] - license: BSL-1.0 -- name: Elixir - implementations: - - name: Elixir JSON Schema validator - url: https://github.com/jonasschmidt/ex_json_schema - date-draft: [] - draft: [4] - notes: "Draft-06+ progress: issue [24](https://github.com/jonasschmidt/ex_json_schema/issues/24); branch [multi-draft-support](https://github.com/jonasschmidt/ex_json_schema/tree/multi-draft-support)" - license: MIT -- name: Go - implementations: - - name: validate-json - url: https://github.com/cesanta/validate-json - date-draft: [] - draft: [4] - license: GPLv2 -- name: Haskell - implementations: - - name: hjsonschema - url: https://github.com/seagreen/hjsonschema - date-draft: [] - draft: [4] - license: MIT -- name: Java - implementations: - - name: json-schema-validator - url: https://github.com/java-json-tools/json-schema-validator - date-draft: [] - draft: [4] - license: LGPLv3 -- name: JavaScript - implementations: - - name: jsonschema - url: https://github.com/tdegrunt/jsonschema - notes: "for Node.js" - date-draft: [] - draft: [4] - license: MIT - - name: tv4 - url: http://geraintluff.github.com/tv4/ - date-draft: [] - draft: [4] - license: Public Domain, MIT - - name: is-my-json-valid - url: https://github.com/mafintosh/is-my-json-valid - date-draft: [] - draft: [4] - license: MIT - - name: JaySchema - url: https://github.com/natesilva/jayschema - notes: "for Node.js" - date-draft: [] - draft: [4] - license: BSD - - name: z-schema - url: https://github.com/zaggino/z-schema - notes: "for Node.js" - date-draft: [] - draft: [4] - license: MIT - - name: direct-schema - url: http://github.com/IreneKnapp/direct-schema - date-draft: [] - draft: [3] - license: "BSD" - - name: JSV - url: http://github.com/garycourt/JSV - date-draft: [] - draft: [1, 2, 3] - license: "BSD" - - name: json-schema - url: https://github.com/kriszyp/json-schema - date-draft: [] - draft: [4] - notes: "part of the [Persevere](http://github.com/kriszyp/json-schema) project" - license: AFL, BSD - - name: schema.js - url: https://github.com/akidee/schema.js - date-draft: [] - draft: [2] - license: "MIT" - - name: json-gate - url: https://github.com/oferei/json-gate - date-draft: [] - draft: [3] - license: "MIT" - - name: JSEN - url: https://github.com/bugventure/jsen - notes: "for Node.js" - date-draft: [] - draft: [4] - license: "MIT" - - name: Skeemas - url: https://github.com/ericgj/json-schema-valid - date-draft: [] - draft: [3, 4] - license: MIT - - name: Jassi - url: https://github.com/iclanzan/jassi - date-draft: [] - draft: [4] - license: GPLv3 - - name: json-schema-valid - url: https://github.com/ericgj/json-schema-valid - date-draft: [] - draft: [4] - license: MIT -- name: PHP - implementations: - - name: json-schema - url: https://github.com/justinrainbow/json-schema - date-draft: [] - draft: [4, 3] - license: "Berkeley" - - name: jsv4-php - url: https://github.com/geraintluff/jsv4-php - date-draft: [] - draft: [4] - license: Public Domain, MIT - - name: JVal - url: https://github.com/stefk/jval - date-draft: [] - draft: [4] - license: "MIT" - - name: JSON Guard - url: https://github.com/thephpleague/json-guard - date-draft: [] - draft: [4] - license: "MIT" - - name: Swaggest Json Schema - url: https://github.com/swaggest/php-json-schema - date-draft: [] - draft: [4] - license: "MIT" -- name: Perl - implementations: - - name: JSV::Validator - url: https://metacpan.org/module/JSV::Validator - date-draft: [] - draft: [4] - license: "MIT" -- name: PostgreSQL - implementations: - - name: postgres-json-schema - url: https://github.com/gavinwahl/postgres-json-schema - notes: "PL/pgSQL implementation, no remote (http) references" - date-draft: [] - draft: [4] - license: PostgreSQL -- name: Ruby - implementations: - - name: json_schema - url: https://github.com/brandur/json_schema - notes: "Schema parser and validator, with hyper-schema support" - date-draft: [] - draft: [4] - license: MIT - - name: json-schema - url: https://github.com/hoxworth/json-schema - date-draft: [] - draft: [4, 3, 2, 1] - license: MIT -- name: Rust - implementations: - - name: valico - url: https://github.com/rustless/valico - date-draft: [] - draft: [4] - license: MIT -- name: Scala - implementations: - - name: json-schema-parser - url: https://github.com/VoxSupplyChain/json-schema-parser - notes: "Schema parser and validator" - date-draft: [] - draft: [4] - license: Apache 2.0 -- name: Swift - implementations: - - name: JSONSchema - url: https://github.com/kylef/JSONSchema.swift - date-draft: [] - draft: [4] - license: BSD-3-Clause diff --git a/lib/calendarUtils.ts b/lib/calendarUtils.ts new file mode 100644 index 000000000..269b7bd0a --- /dev/null +++ b/lib/calendarUtils.ts @@ -0,0 +1,106 @@ +import moment from 'moment-timezone'; + +export async function fetchRemoteICalFile(url: string): Promise { + try { + const response = await fetch(url, { method: 'GET', mode: 'no-cors' }); + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + return await response.text(); + } catch (error) { + console.error('Error fetching iCal file:', error); + return null; + } +} + +export function printEventsForNextWeeks(icalData: { [x: string]: any }) { + const arrayDates = []; + if (!icalData) { + console.error('iCal data is empty or invalid.'); + return; + } + + // Calculate the range of dates for the next 12 weeks from today + const today = moment().startOf('day'); + const nextTwelveWeeksEnd = moment().add(12, 'weeks').endOf('day'); + + // Loop through the events in the iCal data + for (const k in icalData) { + const event = icalData[k]; + + if (event.type === 'VEVENT') { + const title = event.summary; + + const timezoneL = moment.tz.guess(); // Default to UTC if timezone information is not provided + + const startDate = moment.tz(event.start, timezoneL); + + // Complicated case - if an RRULE exists, handle multiple recurrences of the event. + if (event.rrule !== undefined) { + const dates = event.rrule.between( + today.toDate(), + nextTwelveWeeksEnd.toDate(), + true, + ); + + // Loop through the set of date entries to see which recurrences should be printed. + for (const date of dates) { + const startDate = moment.tz(date, timezoneL); + const eventtimezone = event.start.tz; + const owntimezone = moment.tz.guess(); + const eventOffset = moment.tz(eventtimezone).utcOffset(); + const localOffset = moment.tz(owntimezone).utcOffset(); + const offsetDifference = localOffset - eventOffset; + + // Check if the event falls within the next 4 weeks from today + if (startDate.isBetween(today, nextTwelveWeeksEnd, undefined, '[]')) { + const dateTimezone = moment.tz.zone(event.start.tz); + let offset; + if (dateTimezone && offsetDifference) + offset = offsetDifference - dateTimezone.utcOffset(date); + + const newDate = moment(date).subtract(offset, 'minutes').toDate(); + + const start = moment(newDate); + const utcDate = start.utc(); + + const time = utcDate.format('MMMM Do YYYY, HH:mm'); + const day = utcDate.format('D'); + const parsedStartDate = utcDate.format('YYYY-MM-DD HH:mm:ss'); + arrayDates.push({ + title, + time, + day, + timezone: 'UTC', + parsedStartDate, + }); + } + } + } else { + // Simple case - no recurrences, just print out the calendar event. + if (startDate.isBetween(today, nextTwelveWeeksEnd, undefined, '[]')) { + const utcDate = startDate.utc(); + + const time = utcDate.format('MMMM Do YYYY, HH:mm'); + const day = utcDate.format('D'); + const parsedStartDate = utcDate.format('YYYY-MM-DD HH:mm:ss'); + arrayDates.push({ + title, + time, + day, + timezone: 'UTC', + parsedStartDate, + }); + } + } + } + } + + arrayDates.sort( + (x, y) => + new Date(x.parsedStartDate).getTime() - + new Date(y.parsedStartDate).getTime(), + ); + + return arrayDates; +} diff --git a/package.json b/package.json index 903bb5017..e1de179bb 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "jsonpath": "^1.1.1", "jszip": "^3.10.1", "markdown-to-jsx": "^7.6.2", - "moment": "2.29.4", + "moment": "2.30.1", "next": "14.2.14", "next-sitemap": "^4.2.3", "next-themes": "^0.3.0", @@ -49,7 +49,7 @@ "react-syntax-highlighter": "^15.6.1", "react-text-truncate": "^0.19.0", "reading-time": "^1.5.0", - "slate": "^0.110.2", + "slate": "^0.112.0", "slate-react": "^0.108.0", "slugify": "^1.6.5", "yarn": "1.22.22", @@ -57,9 +57,9 @@ "zustand": "^5.0.0" }, "devDependencies": { - "@babel/core": "^7.25.2", + "@babel/core": "^7.26.0", "@babel/preset-env": "^7.26.0", - "@cypress/code-coverage": "^3.13.2", + "@cypress/code-coverage": "^3.13.6", "@next/eslint-plugin-next": "^14.0.1", "@svgr/webpack": "^8.1.0", "@types/babel__core": "^7", @@ -92,7 +92,7 @@ "postcss": "^8.4.41", "prettier": "3.3.3", "tailwindcss": "^3.3.5", - "typescript": "5.2.2", + "typescript": "5.7.2", "webpack": "^5.94.0" }, "babel": { diff --git a/pages/ambassadors/index.page.tsx b/pages/ambassadors/index.page.tsx new file mode 100644 index 000000000..259d32035 --- /dev/null +++ b/pages/ambassadors/index.page.tsx @@ -0,0 +1,120 @@ +import React from 'react'; +import { getLayout } from '~/components/SiteLayout'; +import { SectionContext } from '~/context'; + +import ambassadorList from '~/data/ambassadors-contributions.json'; +import ambassadorsBanner from '~/public/img/community/ambassadors.png'; + +import Image from 'next/image'; + +import fs from 'fs'; + +import AmbassadorBanner from '~/components/AmbassadorsBanner'; +import AmbassadorCard, { type Ambassador } from '~/components/AmbassadorsCard'; +import AmbassadorList from '~/components/AmbassadorsList'; + +export async function getStaticProps() { + const ambassadorData = fs.readFileSync('data/ambassadors.json', 'utf-8'); + + return { + props: { + ambassadorData, + }, + }; +} + +export default function ambassadorPages({ + ambassadorData, +}: { + ambassadorData: any; +}) { + return ( + +
+
+
+

+ Become a JSON Schema Ambassador +

+

+ The JSON Schema Ambassadors Program recognizes the people who + drive adoption, innovation, and knowledge sharing in the JSON + Schema community. +

+ +
+ +
+ Ambassadors Banner +
+
+
+
+

+ JSON Schema Ambassador Contributions +

+

+ Ambassadors are passionate about JSON Schema. They share their + interest, expertise, and excitement within their communities to + help others build better software. +

+
+
+ + +
+

+ Join These JSON Schema Ambassadors
+

+ Learn and share knowledge with community members. +

+

+
+
+
+ {JSON.parse(ambassadorData).map( + (ambassador: Ambassador, index: number) => ( + + ), + )} +
+
+
+ +
+
+
+ ); +} + +ambassadorPages.getLayout = getLayout; diff --git a/pages/blog/index.page.tsx b/pages/blog/index.page.tsx index 4eaa2a77e..67aaf5e74 100644 --- a/pages/blog/index.page.tsx +++ b/pages/blog/index.page.tsx @@ -299,40 +299,22 @@ export default function StaticMarkdownPage({ items-center `} > -
+
{(frontmatter.authors || []).map( - (author: Author, index: number) => { - const sizeClass = - frontmatter.authors.length > 2 - ? 'h-8 w-8' - : 'h-11 w-11'; - return ( -
- ); - }, + (author: Author, index: number) => ( +
2 + ? 'h-8 w-8' + : 'h-11 w-11' + }`} + style={{ + backgroundImage: `url(${author.photo})`, + zIndex: 10 - index, + }} + /> + ), )}
diff --git a/pages/blog/posts/apidays-paris-2024-recap.md b/pages/blog/posts/apidays-paris-2024-recap.md new file mode 100644 index 000000000..0a50c3923 --- /dev/null +++ b/pages/blog/posts/apidays-paris-2024-recap.md @@ -0,0 +1,79 @@ +--- +title: "JSON Schema conference: A milestone event at Apidays Paris 2024" +date: "2024-12-19" +tags: + - News +type: Community +cover: /img/posts/2024/apidays-paris-2024-recap/json-schema-conference.png +authors: + - name: Valeria Hernandez + photo: /img/avatars/valeria.webp + twitter: valeriahhdez + byline: Technical writer +excerpt: "Apidays Paris 2024 was the venue for a significant milestone for our project: the first-ever JSON Schema Conference." +--- +## Introduction +[Apidays Paris](https://www.apidays.global/paris/), the flagship event of the apidays family, returned this year with a focus on "The Future API Stack for Mass Innovation." This annual gathering of API enthusiasts, developers, and industry leaders brought together experts to discuss the latest trends and best practices in API design, API development, and API management. + +This year's agenda highlighted the increasing role of AI in API development, exploring how AI can be used to automate tasks, improve API design, and enhance API performance. +Continuing our successful partnership with [AsyncAPI](https://www.asyncapi.com/en) and [OpenAPI](https://www.openapis.org/), this year's event marked a significant milestone with the inaugural JSON Schema conference track. This dedicated track, sponsored by [Octue](https://www.octue.com/), delved deep into the world of JSON Schema, exploring its role in API design, validation, and documentation. + +## The first JSON Schema conference + +The inaugural [JSON Schema conference track](https://conference.json-schema.org/) at apidays Paris 2024 was a resounding success. As part of the larger conference theme "The Future API Stack for Mass Innovation," the track showcased JSON Schema's crucial role in modern API development and data contract design. + +
+ Five people standing at a booth labeled 'Standards'. They are smiling and looking at the camera. From left to right, their names are Benjamin Granados, Thomas Clark, Andreas Eberhart, Juan Cruz Viotti, and Ben Hutton. +
Community members at the standards booth shared with AsyncAPI, OpenAPI, and GraphQL. From left to right: Benjamin Granados (community manager), Thomas Clark (Octue CEO), Andreas Eberhart (JSON Schema ambassador), Juan Cruz Viotti (TSC member), and Ben Hutton (TSC member).
+
+
+ +[Ten comprehensive presentations](https://conference.json-schema.org/sessions/) spanned the spectrum of JSON Schema applications, from foundational concepts to cutting-edge implementations. The list of talks included: + +- JSON Schema for data design and contract, client and code generation by Tom Collins (DVLA, UK Gov) +- IEC standards: Toward digital standards with JSON Schema by Thomas Clark (Octue CEO, conference sponsor) +- Introducing Strands - a JSON Schema repository by Thomas Clark +- JSON Schema: powering FINOS architecture as code by James Gough (Morgan Stanley) +- Generic and extensible web of things manager using JSON Schema and AI by Andreas Eberhart (Dashjoin, JSON Schema ambassador) +- High-performance JSON Schema validation in .NET by Matthew Adams (Endjin, TSC member) +- JSON schema and relational databases: bridging the gap by Loic Lefèvre (Oracle) +- Applying software engineering practices to JSON Schemas by Juan Cruz Viotti (Sourcemeta CEO, TSC member) +- The state of JSON schema by Benjamin Granados (Celonis, TSC member) +- Unlocking dynamic frontend development through JSON Schema by Neha Singla (Apple) + +Three major themes recurred throughout the track: data design and standardization, tooling infrastructure, and modern application integration. Particularly notable was the emphasis on JSON Schema's role in AI integration and automated API development, aligning perfectly with the broader conference focus on AI's increasing importance in the API landscape. + +Octue's sponsorship significantly bolstered the track's success, demonstrating their commitment to the JSON Schema community. This support enabled a diverse range of speakers to share their expertise and experiences. + +Audience engagement exceeded expectations. Attendees from various industries and organizations - such as fintech, renewable energy, IT, and government - participated in robust Q&A sessions after each presentation. The discussions revealed both the growing adoption of JSON Schema across different sectors and the community's hunger for more knowledge about its practical applications. + +
+ Loic Lefevre presenting on stage at the APIDays Paris 2024 conference. The audience is seated in rows of chairs, facing the stage. +
A room full of people listening to LoΓ―c LefΓ¨vre’s engaging presentation on utilizing JSON schemas to manage relational databases.
+
+
+ +Looking ahead, this first dedicated track has laid a strong foundation for future JSON Schema events. The feedback highlighted the need to further showcase JSON Schema's versatility across different use cases, and plans are underway to expand and enhance next year's track. This successful launch not only validates JSON Schema's importance in modern API development but also signals the beginning of a new chapter in the community's growth and evolution. + +## Collaboration with organizations + +The success of the JSON Schema track at apidays Paris 2024 highlighted the vital role of community collaboration in our growth. It also demonstrated how organizations collaborating with JSON Schema gain more than just visibility - they become part of a broader movement toward standardized, high-quality API development. + +Here's how your organization can benefit: +- **Standardization & interoperability**: Ensure seamless data exchange and API integration. +- **Improved data quality**: Minimize errors with robust data validation. +- **Enhanced API design**: Streamline development with clear and concise schemas. +- **Increased productivity**: Automate tasks and boost efficiency with JSON Schema tools. + +Here’s how you can become part of the initiative: +- [Be an ambassador](https://github.com/json-schema-org/community/tree/main/programs/ambassadors): Share your JSON Schema expertise and champion its adoption. +- [Become a sponsor](https://json-schema.org/overview/sponsors): Gain visibility and support the standard's growth. +- [Contribute to the project](https://github.com/json-schema-org): Help us shape the future of JSON Schema development. +- [Join our Slack workspace](https://json-schema.org/slack): Connect with the vibrant JSON Schema community. + + +Together, we can build a more robust and interoperable API ecosystem. + +A final thank you to Octue for sponsoring the conference, apidays Paris for hosting it, the organizers for their dedication and hard work, and the attendees for your valuable input and insightful questions. On behalf of JSON Schema, we look forward to seeing you again next year! + +Acknowledgments: The author would like to thank Onyedikachi Hope, Ben Hutton, and Benjamin Granados for their valuable feedback, which enhanced the quality of this article. diff --git a/pages/blog/posts/applicability-json-schema-fundamentals-part-1.md b/pages/blog/posts/applicability-json-schema-fundamentals-part-1.md index ece4b13ae..d83c61260 100644 --- a/pages/blog/posts/applicability-json-schema-fundamentals-part-1.md +++ b/pages/blog/posts/applicability-json-schema-fundamentals-part-1.md @@ -1,6 +1,6 @@ --- -title: "It all starts with applicability - JSON Schema Fundamentals part 1" -date: "2022-03-21" +title: 'It all starts with applicability - JSON Schema Fundamentals part 1' +date: '2022-03-21' tags: - Fundamentals type: Engineering @@ -10,14 +10,13 @@ authors: photo: /img/avatars/benhutton.webp link: https://www.x.com/relequestual byline: JSON Schema Specification Lead @Postman -excerpt: "We explore the fundamental JSON Schema concepts: Applicability, Subschemas, and Assertion Boolean Logic - Everyone needs good fundamentals." +excerpt: 'We explore the fundamental JSON Schema concepts: Applicability, Subschemas, and Assertion Boolean Logic - Everyone needs good fundamentals.' --- "Validation begins by applying the root Schema to the complete instance document. Applicator keywords apply subschemas to the instance location." - Borrowed from [JSON Schema in 5 minutes](https://json-schema.org/blog/posts/json-schema-in-5-minutes). The primary use case for JSON Schema is validation. Therefore it's imperative to understand precisely how the validation process happens. Let's take a little time to properly grasp the fundamental JSON Schema concept of Applicability. - # Applicator keywords JSON Schema consists of many keywords. These keywords can be broken down into categories, one of which is "applicator". In the physical sense, an "applicator" is a thing you use to introduce one substance to another. For example, a cloth might be used to introduce polish to a nice wooden table. The cloth is the applicator. The polish is applied to the table via the cloth. @@ -30,23 +29,21 @@ The validation process for JSON Schema begins with applying the whole JSON Schem A JSON Schema may be a Boolean or an Object. In the introductory article mentioned above, we noted how a Boolean Schema of `true` or `false` resulted in the same assertion result (true and false respectivly) regardless of the instance data. We also noted how the equivalent Object Schemas were `{ }` and `{ "not": { } }` respectively. (The `not` keyword inverts the assertion result.) -
+

Vocabulary check

An "assertion" is a statement of fact. This is used in reference to the result of testing in Computing. The test might be called "X is 1". If the test passes, the assertion is true!

-
+ When we talk about the whole Schema in terms of application, we usually refer to it as the "root Schema". This is because the other Schemas which are applied to specific instance locations are different, and we call them "subschemas". Differentiating between the root Schema and subschemas allows us to communicate with clarity which JSON Schema we're talking about, and when to use the Schema as part of the validation process. -
+

The following examples assume to be using JSON Schema 2020-12. Where there are things you should know about previous versions (or drafts) of JSON Schema, it will be highlighted.

-
- + # Subschema application - Validating Objects and Arrays If your JSON instance is an Object or an Array, you'll likely want to validate the values of the Object or the items in the Array. In this introduction, you'll be using the `properties` and `items` keywords, and subschemas. - ## Validating Objects Let's jump into an example. Here's our instance data. @@ -85,6 +82,8 @@ OK, let's check our Schema does all we need it to. What happens when our instanc "isEmailConfirmed": "true" } // isEmailConfirmed should be a Boolean, not a string. + + // Will cause validation error. ``` @@ -98,7 +97,7 @@ We need to make sure we define the appropriate constraint if we want any keys to "email": { "type": "string" }, "isEmailConfirmed": { "type": "boolean" } }, - "required": [ "id", "name", "email" ] + "required": ["id", "name", "email"] } ``` @@ -112,6 +111,8 @@ We can now be confident that if our required fields are missing, validation will "isEmaleConfirmed": "true" } // Typo for key "isEmaleConfirmed". + + // Validates because of applicability. ``` @@ -127,16 +128,16 @@ Luckily, picking this up with our Schema is simple. The `additionalProperties` k "email": { "type": "string" }, "isEmailConfirmed": { "type": "boolean" } }, - "required": [ "id", "name", "email" ], + "required": ["id", "name", "email"], "additionalProperties": false } ``` The value of `additionalProperties` is not just a Boolean, but a Schema. This subschema value is applied to all values of the instance object that are not defined in the `properties` object in our example. You could use `additionalProperties` to allow additional properties, but constrain their values to be a String. -
+

There is a little simplification here to help us understand the concept we're looking to learn. If you want to dig a little deeper, check out our learning resources on `additionalProperties`.

-
+ Finally, what if we expect an Object, but are given an Array or another non-object type? @@ -149,6 +150,8 @@ Finally, what if we expect an Object, but are given an Array or another non-obje "isEmaleConfirmed": "true" } ] + + // An array is not an object... ``` @@ -165,7 +168,7 @@ The three keywords we've explored so far, `properties`, `required`, and `additio "email": { "type": "string" }, "isEmailConfirmed": { "type": "boolean" } }, - "required": [ "id", "name", "email" ], + "required": ["id", "name", "email"], "additionalProperties": false } ``` @@ -174,12 +177,11 @@ In summary, for the soundest validation, we must express all the constraints we Note, `type` takes an Array of types. It may be that your instance is allowed to be an Object or an Array, and constraints for both can be defined within the same Schema Object. - ## Validating Arrays -
+

In this introduction, we're only going to be covering how things work for JSON Schema 2020-12. If you're using a previous version, including "draft-7" or prior, you will likely benefit from digging a little deeper into the learning resources for Array validation.

-
+ Let's step back to our previous example data, where we were provided with an Array as opposed to an Object. Let's say our data is now only allowed to be an Array. @@ -195,7 +197,7 @@ To validate every item in the array, we need to use the `items` keyword. The `it "email": { "type": "string" }, "isEmailConfirmed": { "type": "boolean" } }, - "required": [ "id", "name", "email" ], + "required": ["id", "name", "email"], "additionalProperties": false } } @@ -205,7 +207,6 @@ As with the applicability rules of `properties`, the value Schema of `items` is There are other keywords that are applicable to arrays, but If I continue to explain all of them in detail, this article might start to turn into a reference book! Moving on... - # Apply but modify - Boolean logic with subschemas JSON Schema applicator keywords can do more than just apply a subschema and take the resulting Boolean assertion. Applicator keywords can conditionally apply subschemas, and combine or modify any resulting assertions using boolean logic. @@ -222,18 +223,19 @@ This sounds simple, but let's look at some examples. ```json caption="allOf/example1.schema.json" { - "allOf": [ true, true, true] + "allOf": [true, true, true] } ``` ```json caption="allOf/example2.schema.json" { - "allOf": [ true, false, true] + "allOf": [true, false, true] } ``` -
+ +

Remember: A Boolean is a valid schema that always produces the assertion result of its value, regardless of the instance data.

-
+ Our first "allOf" example shows the array having three subschemas, which are all `true`. The results are combined using the boolean logic AND operator. The resulting assertion from the `allOf` keyword is `true`. @@ -243,16 +245,15 @@ The `true` and `false` Boolean Schemas in this example could be any subschemas t Let's take the two examples again, but use `anyOf` rather than `allOf`. - ```json caption="anyOf/example1.schema.json" { - "anyOf": [ true, true, true] + "anyOf": [true, true, true] } ``` ```json caption="anyOf/example2.schema.json" { - "anyOf": [ true, false, true] + "anyOf": [true, false, true] } ``` @@ -329,7 +330,8 @@ Let's go back to our array of people data, modify it, and say it represents an a "email": "bob@example.com", "isStudent": true, "year": 1 - }, { + }, + { "name": "Alice", "email": "alice@example.com", "isTeacher": true, @@ -343,7 +345,7 @@ To start, let's do the same as we did when creating our first schema. Copy the i ```json caption="oneOf/example1.schema.json" { "items": { - "oneOf":[ + "oneOf": [ { "properties": { "name": { "type": "string" }, @@ -351,7 +353,8 @@ To start, let's do the same as we did when creating our first schema. Copy the i "isStudent": { "type": "boolean" }, "year": { "type": "number" } } - }, { + }, + { "properties": { "name": { "type": "string" }, "email": { "type": "string" }, @@ -376,7 +379,7 @@ Yikes! That's not what we want! But why isn't it working? Why isn't the instance passing validation? -__What do we know?__ +**What do we know?** The validator is "failing fast". This means it's stopping after the first error. @@ -430,4 +433,4 @@ All feedback is welcome. If you have questions or comments, you can find me on t - [JSON Schema live playground (hyperjump validator) for all drafts (from draft-04)](https://json-schema.hyperjump.io) - [Links to RFC specification documents](/specification) -Photo by Heidi Fin on [Unsplash](https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) \ No newline at end of file +Photo by Heidi Fin on [Unsplash](https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) diff --git a/pages/community/index.page.tsx b/pages/community/index.page.tsx index 6e3eae9ae..11692b016 100644 --- a/pages/community/index.page.tsx +++ b/pages/community/index.page.tsx @@ -11,7 +11,10 @@ import { GetStaticProps } from 'next'; import Card from '~/components/Card'; import Image from 'next/image'; import ical from 'node-ical'; -import moment from 'moment-timezone'; +import { + fetchRemoteICalFile, + printEventsForNextWeeks, +} from '../../lib/calendarUtils'; export const getStaticProps: GetStaticProps = async () => { const PATH = 'pages/blog/posts'; @@ -35,19 +38,6 @@ export const getStaticProps: GetStaticProps = async () => { }) .slice(0, 5); - async function fetchRemoteICalFile(url: string) { - try { - const response = await fetch(url, { method: 'GET', mode: 'no-cors' }); - if (!response.ok) { - throw new Error(`HTTP error! status: ${response.status}`); - } - const data = await response.text(); - return data; - } catch (error) { - console.error('Error fetching iCal file:', error); - return null; - } - } const remoteICalUrl = 'https://calendar.google.com/calendar/ical/json.schema.community%40gmail.com/public/basic.ics'; const datesInfo = await fetchRemoteICalFile(remoteICalUrl) @@ -61,88 +51,6 @@ export const getStaticProps: GetStaticProps = async () => { }, }; }; -function printEventsForNextWeeks(icalData: { [x: string]: any }) { - const arrayDates = []; - if (!icalData) { - console.error('iCal data is empty or invalid.'); - return; - } - - const today = moment().startOf('day'); - const nextFourWeeksEnd = moment().add(12, 'weeks').endOf('day'); - - for (const event of Object.values(icalData)) { - if (event.type === 'VEVENT') { - const title = event.summary; - - const timezoneL = moment.tz.guess(); - const startDate = moment.tz(event.start, timezoneL); - - if (event.rrule !== undefined) { - const dates = event.rrule.between( - today.toDate(), - nextFourWeeksEnd.toDate(), - true, - ); - - for (const date of dates) { - const startDate = moment.tz(date, timezoneL); - - if (startDate.isBetween(today, nextFourWeeksEnd, undefined, '[]')) { - const dateTimezone = moment.tz.zone(event.start.tz); - const localTimezone = moment.tz.guess(); - const tz = - event.rrule.origOptions.tzid === localTimezone - ? event.rrule.origOptions.tzid - : localTimezone; - const timezone = moment.tz.zone(tz); - let offset; - if (timezone && dateTimezone) - offset = timezone.utcOffset(date) - dateTimezone.utcOffset(date); - const newDate = moment(date).add(offset, 'minutes').toDate(); - - const start = moment(newDate); - const utcDate = start.utc(); - - const time = utcDate.format('MMMM Do YYYY, h:mm a'); - const day = utcDate.format('D'); - const parsedStartDate = utcDate.format('YYYY-MM-DD HH:mm:ss'); - arrayDates.push({ - title, - time, - day, - timezone: 'UTC', - parsedStartDate, - }); - } - } - } else { - if (startDate.isBetween(today, nextFourWeeksEnd, undefined, '[]')) { - const utcDate = startDate.utc(); - - const time = utcDate.format('MMMM Do YYYY, h:mm a'); - const day = utcDate.format('D'); - const parsedStartDate = startDate.format('YYYY-MM-DD HH:mm:ss'); - arrayDates.push({ - title, - time, - day, - timezone: 'UTC', - parsedStartDate, - }); - } - } - } - } - - arrayDates.sort( - (x, y) => - new Date(x.parsedStartDate).getTime() - - new Date(y.parsedStartDate).getTime(), - ); - - return arrayDates; -} export default function communityPages(props: any) { const blogPosts = props.blogPosts; diff --git a/pages/draft-06/index.md b/pages/draft-06/index.md index 117c1974a..1f27c6264 100644 --- a/pages/draft-06/index.md +++ b/pages/draft-06/index.md @@ -9,7 +9,7 @@ Specification: 'https://json-schema.org/draft-06/draft-wright-json-schema-01.htm ### Draft-06 Documents -- Validation:Β [draft-wright-json-schema-validation-01](https://json-scheclsma.org/draft-06/draft-wright-json-schema-validation-01.html)Β ([changes](https://json-schema.org/draft-06/draft-wright-json-schema-validation-01.html#rfc.appendix.B)) ([schema migration FAQ](https://json-schema.org/draft-06/json-schema-release-notes)) +- Validation:Β [draft-wright-json-schema-validation-01](https://json-schema.org/draft-06/draft-wright-json-schema-validation-01.html)Β ([changes](https://json-schema.org/draft-06/draft-wright-json-schema-validation-01.html#rfc.appendix.B)) ([schema migration FAQ](https://json-schema.org/draft-06/json-schema-release-notes)) - Hyper-Schema:Β [draft-wright-json-schema-hyperschema-01](https://json-schema.org/draft-06/draft-wright-json-schema-hyperschema-01.html)Β ([changes](https://json-schema.org/draft-06/draft-wright-json-schema-hyperschema-01.html#rfc.appendix.B)) ([hyper-schema migration FAQ](https://json-schema.org/draft-06/json-hyper-schema-release-notes)) - [JSON Schema meta-schema](https://json-schema.org/draft-06/schema) - [JSON Hyper-Schema meta-schema](https://json-schema.org/draft-06/hyper-schema) diff --git a/pages/index.page.tsx b/pages/index.page.tsx index d6314337c..0b4dd2e9c 100644 --- a/pages/index.page.tsx +++ b/pages/index.page.tsx @@ -7,13 +7,15 @@ const PATH = 'pages/blog/posts'; import readingTime from 'reading-time'; import Link from 'next/link'; import TextTruncate from 'react-text-truncate'; - +import { + fetchRemoteICalFile, + printEventsForNextWeeks, +} from '../lib/calendarUtils'; import { Headline4 } from '~/components/Headlines'; import { GetStaticProps } from 'next'; /* eslint-disable */ import ical from 'node-ical'; -import moment from 'moment-timezone'; import { useTheme } from 'next-themes'; // apiKey and appId are set in the .env.local file @@ -33,32 +35,17 @@ export const getStaticProps: GetStaticProps = async () => { ); const { data: frontmatter, content } = matter(fullFileName); return { - slug: slug, + slug, frontmatter, content, }; }) - .sort((a, b) => { - const dateA = new Date(a.frontmatter.date).getTime(); - const dateB = new Date(b.frontmatter.date).getTime(); - return dateA < dateB ? 1 : -1; - }) + .sort( + (a, b) => + new Date(b.frontmatter.date).getTime() - + new Date(a.frontmatter.date).getTime(), + ) .slice(0, 5); - - // Function to fetch the remote iCal file - async function fetchRemoteICalFile(url: string) { - try { - const response = await fetch(url, { method: 'GET', mode: 'no-cors' }); - if (!response.ok) { - throw new Error(`HTTP error! status: ${response.status}`); - } - const data = await response.text(); - return data; - } catch (error) { - console.error('Error fetching iCal file:', error); - return null; - } - } // Example usage: const remoteICalUrl = 'https://calendar.google.com/calendar/ical/json.schema.community%40gmail.com/public/basic.ics'; // Replace with the actual URL @@ -74,99 +61,7 @@ export const getStaticProps: GetStaticProps = async () => { }, }; }; -// Function to filter and print events for the next weeks from today -function printEventsForNextWeeks(icalData: { [x: string]: any }) { - const arrayDates = []; - if (!icalData) { - console.error('iCal data is empty or invalid.'); - return; - } - - // Calculate the range of dates for the next 12 weeks from today - const today = moment().startOf('day'); - const nextFourWeeksEnd = moment().add(12, 'weeks').endOf('day'); - - // Loop through the events in the iCal data - for (const k in icalData) { - const event = icalData[k]; - - if (event.type === 'VEVENT') { - const title = event.summary; - - const timezoneL = moment.tz.guess(); // Default to UTC if timezone information is not provided - const startDate = moment.tz(event.start, timezoneL); - - // Complicated case - if an RRULE exists, handle multiple recurrences of the event. - if (event.rrule !== undefined) { - // For recurring events, get the set of event start dates that fall within the range - // of dates we're looking for. - const dates = event.rrule.between( - today.toDate(), - nextFourWeeksEnd.toDate(), - true, - ); - // Loop through the set of date entries to see which recurrences should be printed. - for (const date of dates) { - const startDate = moment.tz(date, timezoneL); - - // Check if the event falls within the next 4 weeks from today - if (startDate.isBetween(today, nextFourWeeksEnd, undefined, '[]')) { - const dateTimezone = moment.tz.zone(event.start.tz); - const localTimezone = moment.tz.guess(); - const tz = - event.rrule.origOptions.tzid === localTimezone - ? event.rrule.origOptions.tzid - : localTimezone; - const timezone = moment.tz.zone(tz); - let offset; - if (timezone && dateTimezone) - offset = timezone.utcOffset(date) - dateTimezone.utcOffset(date); - const newDate = moment(date).add(offset, 'minutes').toDate(); - - const start = moment(newDate); - const utcDate = start.utc(); - - const time = utcDate.format('MMMM Do YYYY, h:mm a'); - const day = utcDate.format('D'); - const parsedStartDate = utcDate.format('YYYY-MM-DD HH:mm:ss'); - arrayDates.push({ - title, - time, - day, - timezone: 'UTC', - parsedStartDate, - }); - } - } - } else { - // Simple case - no recurrences, just print out the calendar event. - if (startDate.isBetween(today, nextFourWeeksEnd, undefined, '[]')) { - const utcDate = startDate.utc(); - - const time = utcDate.format('MMMM Do YYYY, h:mm a'); - const day = utcDate.format('D'); - const parsedStartDate = startDate.format('YYYY-MM-DD HH:mm:ss'); - arrayDates.push({ - title, - time, - day, - timezone: 'UTC', - parsedStartDate, - }); - } - } - } - } - - arrayDates.sort( - (x, y) => - new Date(x.parsedStartDate).getTime() - - new Date(y.parsedStartDate).getTime(), - ); - - return arrayDates; -} export function AlgoliaSearch() { useEffect(() => { const customButton = document.querySelector('.herobtn'); @@ -643,7 +538,12 @@ const Home = (props: any) => {

Gold Sponsors

- +

Your logo here

+

Silver Sponsors

- +

Your logo here

+

Bronze Sponsors

@@ -755,7 +653,12 @@ const Home = (props: any) => { > - +

Your logo here

+
diff --git a/pages/learn/[slug].page.tsx b/pages/learn/[slug].page.tsx index f110ff75d..7065699f3 100644 --- a/pages/learn/[slug].page.tsx +++ b/pages/learn/[slug].page.tsx @@ -7,6 +7,7 @@ import getStaticMarkdownProps from '~/lib/getStaticMarkdownProps'; import { Headline1 } from '~/components/Headlines'; import { SectionContext } from '~/context'; import { DocsHelp } from '~/components/DocsHelp'; +import NextPrevButton from '~/components/NavigationButtons'; export async function getStaticPaths() { return getStaticMarkdownPaths('pages/learn'); @@ -31,6 +32,12 @@ export default function StaticMarkdownPage({ {frontmatter.title} + ); diff --git a/pages/learn/file-system.md b/pages/learn/file-system.md index a408b70b1..f6ae14331 100644 --- a/pages/learn/file-system.md +++ b/pages/learn/file-system.md @@ -1,6 +1,12 @@ --- section: docs title: Modeling a file system with JSON Schema +prev: + label: Miscellaneous examples + url: /learn/miscellaneous-examples +next: + label: Other examples + url: /learn/json-schema-examples --- In this step-by-step guide you will learn how to design a JSON Schema that mirrors the structure of an `/etc/fstab` file. diff --git a/pages/learn/json-schema-examples.md b/pages/learn/json-schema-examples.md index d86b9656b..c91259267 100644 --- a/pages/learn/json-schema-examples.md +++ b/pages/learn/json-schema-examples.md @@ -1,6 +1,12 @@ --- section: docs title: JSON Schema examples +prev: + label: Modeling a file system + url: /learn/file-system +next: + label: Miscellaneous examples + url: /learn/miscellaneous-examples --- In this page, you will find examples illustrating different use cases to help you get the most out of your JSON Schemas. These examples cover a wide range of scenarios, and each example comes with accompanying JSON data and explanation, showcasing how JSON Schemas can be applied to various domains. You can modify these examples to suit your specific needs, as this is just one of the many ways you can utilize JSON Schemas. diff --git a/pages/learn/miscellaneous-examples.md b/pages/learn/miscellaneous-examples.md index ba63f03b1..d943e77b7 100644 --- a/pages/learn/miscellaneous-examples.md +++ b/pages/learn/miscellaneous-examples.md @@ -1,6 +1,9 @@ --- section: docs title: Miscellaneous Examples +next: + label: Modelling a file system + url: /learn/file-system --- In this page, you will find miscellaneous examples illustrating different uses cases to help you get the most out of your JSON Schemas. Each example comes with accompanying JSON data and explanation. diff --git a/pages/obsolete-implementations/index.page.tsx b/pages/obsolete-implementations/index.page.tsx deleted file mode 100644 index f63b7a20f..000000000 --- a/pages/obsolete-implementations/index.page.tsx +++ /dev/null @@ -1,217 +0,0 @@ -import React from 'react'; -import { getLayout } from '~/components/SiteLayout'; -import fs from 'fs'; -import matter from 'gray-matter'; -import StyledMarkdown from '~/components/StyledMarkdown'; -import yaml from 'js-yaml'; -import { Headline1, Headline2, Headline3 } from 'components/Headlines'; -import slugify from 'slugify'; -import { useRouter } from 'next/router'; -import classnames from 'classnames'; -import { SectionContext } from '~/context'; -import { DRAFT_ORDER } from '~/lib/config'; - -// @ts-ignore -import zeroFill from 'zero-fill'; - -export async function getStaticProps() { - const validators = yaml.load( - fs.readFileSync('data/validator-libraries-obsolete.yml', 'utf-8'), - ); - const hyperLibaries = yaml.load( - fs.readFileSync('data/hyper-libraries-obsolete.yml', 'utf-8'), - ); - - const intro = fs.readFileSync( - 'pages/obsolete-implementations/intro.md', - 'utf-8', - ); - const main = fs.readFileSync( - 'pages/obsolete-implementations/main.md', - 'utf-8', - ); - const main2 = fs.readFileSync( - 'pages/obsolete-implementations/main2.md', - 'utf-8', - ); - const { content: introContent } = matter(intro); - const { content: mainContent } = matter(main); - const { content: main2Content } = matter(main2); - return { - props: { - blocks: { - intro: introContent, - main: mainContent, - main2: main2Content, - }, - validators, - hyperLibaries, - }, - }; -} - -type ImplementationByLanguage = { name: string }; - -export default function ImplementationsPages({ - blocks, - validators, - hyperLibaries, -}: { - blocks: any; - validators: ImplementationByLanguage[]; - hyperLibaries: ImplementationByLanguage[]; -}) { - return ( - -
- Obsolete Tools - - Validators - - - - -
-
- ); -} -ImplementationsPages.getLayout = getLayout; -function ImplementationTable({ - implementationsByLanguage, - prefix, -}: { - implementationsByLanguage: any; - prefix: string; -}) { - const router = useRouter(); - return ( - <> -
- {implementationsByLanguage.map( - (implementationByLanguage: any, index: number) => { - const slug = - prefix + - slugify(implementationByLanguage.name, { - lower: true, - trim: true, - }); - const isActive = router.query.language === slug; - return ( - - {implementationByLanguage.name} - - ); - }, - )} -
-
- - - - - - - - - - {implementationsByLanguage.map( - (implementationByLanguage: any, index: number) => { - const slug = - prefix + - slugify(implementationByLanguage.name, { - lower: true, - trim: true, - }); - const isActive = router.query.language === slug; - if (router.query.language && !isActive) return null; - - return ( - - - - - {implementationByLanguage.implementations.map( - (implementation: any, index: number) => { - const allDrafts = [ - ...(implementation['date-draft'] || []), - ...(implementation['draft'] || []), - ]; - return ( - - - - - - - ); - }, - )} - - ); - }, - )} - -
- - About - - Drafts - - License -
- - {implementationByLanguage.name} - -
- - {implementation.name} - - - - - {allDrafts - ?.sort((a, b) => - DRAFT_ORDER.indexOf(a.toString()) < - DRAFT_ORDER.indexOf(b.toString()) - ? -1 - : 1, - ) - ?.map((draft: string | number) => ( - - {typeof draft === 'number' - ? zeroFill(2, draft) - : draft} - - ))} - - {implementation.license} -
-
- - ); -} diff --git a/pages/obsolete-implementations/intro.md b/pages/obsolete-implementations/intro.md deleted file mode 100644 index e58a83a1b..000000000 --- a/pages/obsolete-implementations/intro.md +++ /dev/null @@ -1,9 +0,0 @@ -_**NOTE:** Due to the long gap after draft-04, many projects that implemented that draft became inactive by the time draft-06 was published, or are looking for new contributors to move forward. Such projects are listed here_ - -_For implementations supporting (or actively working towards) draft-06 or later, see the main [Implementations](implementations) page._ - -Implementations below are written in different languages, and support part, or all, of the specification. - -Implementations are classified based on their functionality. When known, the license of the project is also mentioned. - -If you have updates to this list, make a pull request on the [GitHub repo](https://github.com/json-schema-org/website). diff --git a/pages/obsolete-implementations/main.md b/pages/obsolete-implementations/main.md deleted file mode 100644 index 5a00e407d..000000000 --- a/pages/obsolete-implementations/main.md +++ /dev/null @@ -1,11 +0,0 @@ - -### Benchmarks - -- Java - - [json-schema-validator-benchmark](https://github.com/networknt/json-schema-validator-perftest) - compares performance of three JSON schema validator implementations (only one of which supports draft-06+) in Java(Apache 2.0) - -- JavaScript - - [z-schema validator benchmark](https://github.com/zaggino/z-schema#benchmarks) - compares performance in the individual tests from JSON-Schema Test Suite (MIT) - - [JSCK validator benchmark](https://github.com/pandastrike/jsck#benchmarks) - shows performance for JSON-schemas of different complexity (MIT) - -## Hyper-Schema \ No newline at end of file diff --git a/pages/obsolete-implementations/main2.md b/pages/obsolete-implementations/main2.md deleted file mode 100644 index 01925db16..000000000 --- a/pages/obsolete-implementations/main2.md +++ /dev/null @@ -1,85 +0,0 @@ - -Schema Generators ------------------ - -- Python - - [JSL](https://github.com/aromanovich/jsl) (BSD) - a Python DSL for defining JSON Schemas -- JavaScript - - [json-schema-generator](https://github.com/krg7880/json-schema-generator) (MIT) - Node.js library usable both as a CLI util and as a Node module -- TypeScript - - [Typson](https://github.com/lbovet/typson) (Apache 2.0) -- Visual Studio - - [JSON Schema Generator](https://visualstudiogallery.msdn.microsoft.com/b4515ef8-a518-41ca-b48c-bb1fd4e6faf7) - free extension -- Sparx Enterprise Architect - - [API-Add-In](https://github.com/bayeslife/api-add-in) - Sparx EA extension for exporting JSON Schema from UML models - -Generators from schemas ------------------------ - -#### Data from schemas - -- JavaScript - - [json-schema-generator](https://github.com/json-schema-faker) (MIT) - JSON-Schema + fake data generators - -Data Parsing and Code Generation --------------------------------- - -- Delphi - - [DJsonSchema](https://github.com/schlothauer-wauer/DJsonSchema) (MIT) - JSON Schema reader and code generator for Delphi. -- Haskell - - [aeson-schema](https://github.com/Fuuzetsu/aeson-schema) (MIT) - generates code for a parser -- Ruby - - [autoparse](https://github.com/google/autoparse) (ASL 2.0) -- Scala - - [json-schema-codegen](https://github.com/VoxSupplyChain/json-schema-codegen) - Tool and SBT plugin for generating Scala, TypeScript models and parsers from Json-Schema definitions, *supports draft 4* (Apache 2.0) - - [Argus](https://github.com/aishfenton/argus) (MIT) - Macros for building models from JSON Schemas -- Swift - - [Bric-Γ -brac](https://github.com/glimpseio/BricBrac) (MIT) - generates idiomatic swift structs and parser/serializer from JSON schemas -- Golang - - [gojsonschema](https://github.com/andy-zhangtao/gojsonschema)(Apache 2.0) - golang package for generating golang struct *support for Draft 4*. [Demo](http://json.golang.chinazt.cc) - -UI Generation -------------- - -_TODO: Sort by draft support._ - -Various levels of support for UI generation primarily from the validation vocabulary or combined with UI specific definition. - -- JavaScript - - [JSON Editor](https://github.com/jdorn/json-editor) (MIT) - - [JSONForms](https://jsonforms.io) (EclipseSource) (MIT) - - [Jsonary](https://jsonary.com/) (MIT) - - [Metawidget](https://metawidget.org/) (LGPL) - - [pure-form webcomponent](https://github.com/john-doherty/pure-form) (MIT) - -Editors -------- - -- [Liquid XML Studio 2016](https://www.liquid-technologies.com/json-schema-editor) - *Graphical JSON schema editor for draft 4, context sensitive intellisense for JSON documents.* -- [ReSharper 2016.1](https://www.jetbrains.com/resharper/) - *code completion, inspections and quick fixes for JSON schema in Visual Studio 2010 - 2015, including support for JSON Path and regular expressions for schema editing. Support for draft-4* -- [Visual Studio 2013](http://www.visualstudio.com/) - *Auto-completion and tooltips based on JSON schema draft 3 and draft 4* -- [JSON Schema Editor](https://json-schema-editor.tangramjs.com) - *An intuitive editor for JSON schema online* -- [JSON Editor](https://json-editor.tangramjs.com) - *An online, schema-aware editor for JSON document* - -Compatibility -------------- - -- JavaScript - - [JSON Schema Compatibility](https://github.com/geraintluff/json-schema-compatability) - *converts draft 3 to draft 4* (Public Domain) - - -Documentation generation ------------------------- - -- JavaScript - - [Matic](https://github.com/mattyod/matic) (MIT) - - [Docson](https://github.com/lbovet/docson) (Apache 2.0) - - [doca](https://github.com/cloudflare/doca/) (BSD) See [@cloudflare/doca](https://github.com/cloudflare/json-schema-tools/tree/master/workspaces/doca) for draft-06+ support - - [prmd](https://github.com/interagent/prmd) (MIT) - -Other ------ - -- JavaScript - - [Dojo](https://www.dojotoolkit.org/) (AFL or BSD) - supports some aspects of JSON Schema - - [JSON Schema Random](https://github.com/andreineculau/json-schema-random) (Apache 2.0) diff --git a/pages/overview/[slug].page.tsx b/pages/overview/[slug].page.tsx index e4d5476d7..72db35309 100644 --- a/pages/overview/[slug].page.tsx +++ b/pages/overview/[slug].page.tsx @@ -7,6 +7,7 @@ import getStaticMarkdownProps from '~/lib/getStaticMarkdownProps'; import { Headline1 } from '~/components/Headlines'; import { SectionContext } from '~/context'; import { DocsHelp } from '~/components/DocsHelp'; +import NextPrevButton from '~/components/NavigationButtons'; export async function getStaticPaths() { return getStaticMarkdownPaths('pages/overview'); @@ -32,6 +33,12 @@ export default function StaticMarkdownPage({ {frontmatter.title} + ); diff --git a/pages/overview/case-studies/index.page.tsx b/pages/overview/case-studies/index.page.tsx index 81c761ca6..b79b1352d 100644 --- a/pages/overview/case-studies/index.page.tsx +++ b/pages/overview/case-studies/index.page.tsx @@ -7,6 +7,7 @@ import data from 'data/case-studies.json'; import Card from '~/components/Card'; import { DocsHelp } from '~/components/DocsHelp'; import { useTheme } from 'next-themes'; +import NextPrevButton from '~/components/NavigationButtons'; export default function ContentExample() { const newTitle = 'Case Studies'; @@ -47,6 +48,12 @@ export default function ContentExample() { /> ))}
+ ); diff --git a/pages/overview/code-of-conduct/index.page.tsx b/pages/overview/code-of-conduct/index.page.tsx index c4d74033e..f4ebff025 100644 --- a/pages/overview/code-of-conduct/index.page.tsx +++ b/pages/overview/code-of-conduct/index.page.tsx @@ -6,6 +6,7 @@ import matter from 'gray-matter'; import StyledMarkdown from '~/components/StyledMarkdown'; import { SectionContext } from '~/context'; import { DocsHelp } from '~/components/DocsHelp'; +import NextPrevButton from '~/components/NavigationButtons'; export async function getStaticProps() { const block = fs.readFileSync( @@ -20,7 +21,13 @@ export async function getStaticProps() { }; } -export default function Content({ blocks }: { blocks: any[] }) { +export default function Content({ + blocks, +}: { + blocks: any[]; + frontmatter: any; + content: any; +}) { const newTitle = 'Code of Conduct'; return ( @@ -29,6 +36,12 @@ export default function Content({ blocks }: { blocks: any[] }) { {newTitle} + ); diff --git a/pages/overview/faq/index.page.tsx b/pages/overview/faq/index.page.tsx index 283edf29e..b47a3f570 100644 --- a/pages/overview/faq/index.page.tsx +++ b/pages/overview/faq/index.page.tsx @@ -5,6 +5,7 @@ import { SectionContext } from '~/context'; import Faq from '~/components/Faq'; import { Headline1 } from '~/components/Headlines'; import { DocsHelp } from '~/components/DocsHelp'; +import NextPrevButton from '~/components/NavigationButtons'; export default function Content() { const newTitle = 'FAQ'; @@ -20,7 +21,14 @@ export default function Content() { Below you'll find answers to questions we get asked the most about JSON Schema.

+ + ); diff --git a/pages/overview/roadmap/index.page.tsx b/pages/overview/roadmap/index.page.tsx index 8f3c0d92a..ed360f9af 100644 --- a/pages/overview/roadmap/index.page.tsx +++ b/pages/overview/roadmap/index.page.tsx @@ -5,6 +5,7 @@ import Head from 'next/head'; import { Headline1 } from '~/components/Headlines'; import { SectionContext } from '~/context'; import roadmap from '~/data/roadmap.json'; +import NextPrevButton from '~/components/NavigationButtons'; const statusColors = { 'In Progress': 'bg-green-600 text-white dark:bg-green-500', @@ -130,6 +131,12 @@ export default function Roadmap() {
+ ); diff --git a/pages/overview/similar-technologies.md b/pages/overview/similar-technologies.md index c4693704f..7867a54e5 100644 --- a/pages/overview/similar-technologies.md +++ b/pages/overview/similar-technologies.md @@ -1,6 +1,12 @@ --- section: docs title: Similar Technologies +prev: + label: FAQs + url: '/overview/faq' +next: + label: Code of Conduct + url: '/overview/code-of-conduct' --- While we think that JSON Schema has a unique value proposition, we'd like to provide visibility to other technologies that share similar goals: diff --git a/pages/overview/sponsors/index.page.tsx b/pages/overview/sponsors/index.page.tsx index a26f1dfe7..a3ab3dba9 100644 --- a/pages/overview/sponsors/index.page.tsx +++ b/pages/overview/sponsors/index.page.tsx @@ -7,6 +7,7 @@ import matter from 'gray-matter'; import StyledMarkdown from '~/components/StyledMarkdown'; import { SectionContext } from '~/context'; import { DocsHelp } from '~/components/DocsHelp'; +import NextPrevButton from '~/components/NavigationButtons'; export async function getStaticProps() { const block1 = fs.readFileSync('pages/overview/sponsors/_index.md', 'utf-8'); @@ -28,6 +29,12 @@ export default function ContentExample({ blocks }: { blocks: any[] }) { {newTitle} + ); diff --git a/pages/overview/use-cases/index.page.tsx b/pages/overview/use-cases/index.page.tsx index 6e2811a51..1c77df4cc 100644 --- a/pages/overview/use-cases/index.page.tsx +++ b/pages/overview/use-cases/index.page.tsx @@ -6,6 +6,7 @@ import { Headline1 } from '~/components/Headlines'; import Card from '~/components/Card'; import data from '~/data/use-cases.json'; import { DocsHelp } from '~/components/DocsHelp'; +import NextPrevButton from '~/components/NavigationButtons'; export default function Content() { const newTitle = 'Use Cases'; @@ -19,8 +20,8 @@ export default function Content() { {newTitle}

Discover everything you can do with JSON Schema. This section presents - the most common use cases for JSON Schema, but but there may be many - more applications waiting to be discovered. + the most common use cases for JSON Schema, but there may be many more + applications waiting to be discovered.

{data.map((element, index) => ( @@ -29,12 +30,18 @@ export default function Content() { title={element.title} body={element.summary} icon='/icons/bulb2.svg' - headerSize={'medium'} - extended={true} - bodyTextSize={'small'} + headerSize='medium' + extended + bodyTextSize='small' /> ))}
+ ); diff --git a/pages/overview/what-is-jsonschema.md b/pages/overview/what-is-jsonschema.md index 4c1ccc826..b5c48c16e 100644 --- a/pages/overview/what-is-jsonschema.md +++ b/pages/overview/what-is-jsonschema.md @@ -1,6 +1,9 @@ --- section: docs title: What is JSON Schema? +next: + label: Roadmap + url: '/overview/roadmap' --- > JSON Schema is a declarative language for defining structure and constraints for JSON data.
diff --git a/pages/tools/JSONSchemaTool.ts b/pages/tools/JSONSchemaTool.ts index 6cdc016c4..b700edac7 100644 --- a/pages/tools/JSONSchemaTool.ts +++ b/pages/tools/JSONSchemaTool.ts @@ -34,6 +34,7 @@ export interface JSONSchemaTool { optOut?: boolean; }; lastUpdated?: string; + status?: 'obsolete'; } export interface Person { diff --git a/pages/tools/components/Sidebar.tsx b/pages/tools/components/Sidebar.tsx index 69f97e325..5a1c75717 100644 --- a/pages/tools/components/Sidebar.tsx +++ b/pages/tools/components/Sidebar.tsx @@ -54,7 +54,11 @@ export default function Sidebar({ environments: formData .getAll('environments') .map((value) => value as string), - }; + showObsolete: + (formData.get('showObsolete') as string) === 'showObsolete' + ? 'true' + : 'false', + } satisfies Transform; postAnalytics({ eventType: 'query', eventPayload: newTransform }); return newTransform; }); @@ -95,6 +99,12 @@ export default function Sidebar({ ); })} +