From 0d9ae509e7000ac52a9c750d47e93cc7cae60253 Mon Sep 17 00:00:00 2001 From: Dhairya Majmudar <2022kuec2045@iiitkota.ac.in> Date: Mon, 20 May 2024 19:55:51 +0530 Subject: [PATCH 1/3] moving resources feature to new branch --- data/resources.yml | 440 ++++++++++++++++++++++++++++++++ pages/resources/[slug].page.tsx | 114 +++++++++ 2 files changed, 554 insertions(+) create mode 100644 data/resources.yml create mode 100644 pages/resources/[slug].page.tsx diff --git a/data/resources.yml b/data/resources.yml new file mode 100644 index 000000000..f16b9b083 --- /dev/null +++ b/data/resources.yml @@ -0,0 +1,440 @@ +- title: Using JSON Schema + url: https://books.apple.com/us/book/using-json-schema/id903248630 + year: 2014 + type: book + summary: Learn and Apply JSON Schema by Example, with JavaScript (Node.js) and Python Programs +- title: JSON at Work + url: https://www.oreilly.com/library/view/json-at-work/9781491982389/ + year: 2017 + type: book + summary: A comprehensive overview of the JSON ecosystem, including JSON Schema +- title: API by Design + url: https://smizell.gumroad.com/l/apibydesign + year: 2021 + type: book + summary: Introduces an approach to measure API complexity by analyzing entropy in JSON Schema definitions + +- title: 'JSON Schema in Production - #1 Chuck Reeves at Zones' + url: https://www.youtube.com/watch?v=fkziMQD7pqQ + year: 2022 + type: video + summary: Ben talks to Chuck Reeves, previously at Zones, about how they used JSON Schema to validate data and keep it in a consistent format across their application. Chuck shares how using a public API gateway to validate incoming data saved developers time and compute effort, making sure only valid data was passed downstream to serverless functions or other services + +- title: 'JSON Schema in Production - #2 Kin Lane at F5' + url: https://www.youtube.com/watch?v=pibZF049zqE + year: 2022 + type: video + summary: Kin shares the challenges of building a company wide index of data structures (or Schema Registry), aiming to help understand previous, and avoid future, unexpected breaking changes that really impact customers + +- title: 'JSON Schema in Production: #3 Mads Kristensen at Microsoft' + url: https://www.youtube.com/watch?v=-yYTxLZZk58 + year: 2022 + type: video + summary: Mads shares the story of bringing JSON Schema support into Visual Studio back in version 2013, the first editor supporting JSON Schema. What's called .Net Core today needed tooling for their "project.json" file, similar to a "package.json" file. JSON Schema ended up playing a key role in the autocompletion and validation infastructure ontop of a basic JSON editor + +- title: 'JSON Schema in Production - #4 David Brownman at Zapier' + url: https://www.youtube.com/watch?v=yDL98sd4KVE + year: 2022 + type: video + summary: David shares the story of using JSON Schema at Zapier to validate and document their intergration payloads, enabling a better developer experience for their 4000+ intergration partners. + +- title: 'JSON Schema in Production - #5 Jens Neuse at Wundergraph' + url: https://www.youtube.com/watch?v=_TCU6da0GA8 + year: 2022 + type: video + summary: Jens Neuse, Founder of Wundergraph shares how Wundergraph compiles GraphQL definitions into JSON RPC and create JSON Schema definitions for each JSON RPC endpoint. Input data is validated using JSON Schema at the middleware-level before executing the corresponding GraphQL query + +- title: 'JSON Schema in Production - #6 Suresh Srinivas at OpenMetadata' + url: https://www.youtube.com/watch?v=ZrVTZwmTR3k + year: 2022 + type: video + summary: We talk to Suresh Srinivas, Co-Founder at Collate, building OpenMetadata. (Previously engineering leadership at Uber and Founder of Hortonworks.) + +- title: Configuring Umbraco on .NET Core - JSON Schema + url: https://www.youtube.com/watch?v=rpUg-oySw8g + year: 2021 + type: video + summary: Configuring Umbraco on .NET Core with JSON Schema-powered autocompletions for appsettings.json using SchemaStore +- title: API Storytelling with Ben Hutton + url: https://www.youtube.com/watch?v=4xbA82lo_lc + year: 2021 + type: video + summary: This episode we sit down with Ben Hutton, the lead behind the JSON Schema community to talk about vocabularies and other ways we validate and annotate how we tell stories we tell in the API space +- title: What is JSON Schema + url: https://www.youtube.com/watch?v=kK-_gL7Vsc0 + year: 2020 + type: video + summary: A basic introduction to JSON Schema showing how to auto-generate JSON Schema document from an existing JSON document +- title: "What is a JSON Schema? Generate, Modify, and Understand a JSON Schema: Example" + url: https://www.youtube.com/watch?v=hGXxXyJmaUo + year: 2019 + type: video + summary: An in-depth introduction to JSON Schema including auto-generating JSON Schema documents using QuickType.io +- title: "JSON Schema Validation: How to Validate JSON Schema with Postman?" + url: https://www.youtube.com/watch?v=X072eKtOIio + year: 2019 + type: video + summary: An introduction to JSON Schema and how to use it in Postman +- title: JSON Schema Validation in Postman + url: https://www.youtube.com/watch?v=8BfshV5n6ac + year: 2021 + type: video + summary: An tutorial of performing JSON Schema validation in Postman in API tests +- title: Processing and Interchanging JSON Data + url: https://www.linkedin.com/learning/processing-and-interchanging-json-data + year: 2017 + type: course + summary: An in-depth guide to working with JSON and the JSON ecosystem including using JSON Schema for validation purposes +- title: JSON Schema - Crash Course for Beginners + url: https://www.udemy.com/course/json-schema-crash-course-for-beginners/ + year: 2017 + type: course + summary: Learn JSON & JSON Schema in a Quick 30-40 minutes & use it for the rest of your life for complex projects + +- title: OpenAPI + url: https://swagger.io/specification/ + year: 2021 + type: spec + summary: The OpenAPI specification embeds and extends JSON Schema for defining API request and responses +- title: RAML + url: https://raml.org + year: 2021 + type: spec + summary: The RAML specification supports modeling API data using JSON Schema + +- title: W3C Web of Things + url: https://www.w3.org/WoT/ + year: 2020 + type: spec + summary: The Web of Things (WoT) seeks to counter the fragmentation of the IoT by using and extending existing, standardized Web technologies. WoT models data using JSON Schema + +- title: AsyncAPI + url: https://www.asyncapi.com/docs/specifications/v2.1.0 + year: 2021 + type: spec + summary: AsyncAPI is an open source initiative that seeks to improve the current state of Event-Driven Architectures (EDA). The AsyncAPI specification supports data modeling using JSON Schema + +- title: JSON Schema in RDF + url: https://www.w3.org/2019/wot/json-schema + year: 2021 + type: spec + summary: This document introduces an RDF vocabulary for JSON schema definitions. This vocabulary provides a stable namespace IRI for JSON schema keywords, as well as simple axioms, defined against schema.org's meta-model. Various examples on how to use the vocabulary are also introduced, e.g. to annotate schemas with JSON-LD metadata or to embed schema annotations inside RDF graphs + +- title: JSON Schema Core 2020-12 + url: https://json-schema.org/draft/2020-12/json-schema-core.html + year: 2020 + type: spec + summary: JSON Schema defines the media type "application/schema+json", a JSON-based format for describing the structure of JSON data. JSON Schema asserts what a JSON document must look like, ways to extract information from it, and how to interact with it. The "application/schema-instance+json" media type provides additional feature-rich integration with "application/schema+json" beyond what can be offered for "application/json" documents + +- title: JSON Schema Validation 2020-12 + url: https://json-schema.org/draft/2020-12/json-schema-validation.html + year: 2020 + type: spec + summary: JSON Schema (application/schema+json) has several purposes, one of which is JSON instance validation. This document specifies a vocabulary for JSON Schema to describe the meaning of JSON documents, provide hints for user interfaces working with JSON data, and to make assertions about what a valid document must look like + +- title: Relative JSON Pointers + url: https://json-schema.org/draft/2020-12/relative-json-pointer.html + year: 2020 + type: spec + summary: JSON Pointer is a syntax for specifying locations in a JSON document, starting from the document root. This document defines an extension to the JSON Pointer syntax, allowing relative locations from within the document + +- title: JSON Hyper-Schema + url: https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-hyperschema-02 + year: 2019 + type: spec + summary: JSON Schema is a JSON-based format for describing JSON data using various vocabularies. This document specifies a vocabulary for annotating JSON documents with hyperlinks. These hyperlinks include attributes describing how to manipulate and interact with remote resources through hypermedia environments such as HTTP, as well as determining whether the link is usable based on the instance value + +- title: GitHub Discussions + url: https://github.com/json-schema-org/community/discussions + type: official + summary: The discussions page of JSON Schema +- title: Twitter + url: https://twitter.com/jsonschema + type: official + summary: The Twitter account of the JSON Schema project +- title: GitHub + url: https://github.com/json-schema-org + type: official + summary: The official GitHub organization of the JSON Schema project +- title: Test Suite + url: https://github.com/json-schema-org/JSON-Schema-Test-Suite + type: official + summary: The official test suite for JSON Schema implementations +- title: Slack + url: https://json-schema.org/slack + type: official + summary: The official Slack workspace of JSON Schema +- title: Stack Overflow + url: https://stackoverflow.com/questions/tagged/jsonschema + type: official + summary: The JSON Schema tag in Stack Overflow +- title: YouTube + url: https://www.youtube.com/channel/UCrl3fjmHSp6FhJUKcEJhisA + type: official + summary: The JSON Schema official YouTube channel + +- title: Type Safety with JSON Subschema + url: https://arxiv.org/abs/1911.12651 + year: 2020 + type: paper + summary: Deciding whether one schema is a subschema of another is non-trivial because of the richness of the JSON Schema specification language. Given a pair of schemas, our approach first canonicalizes and simplifies both schemas, then decides the subschema question on the canonical forms, dispatching simpler subschema queries to type-specific checkers + +- title: Witness Generation for JSON Schema + url: https://arxiv.org/abs/2202.12849 + year: 2022 + type: paper + summary: "JSON Schema is an important, evolving standard schema language for families of JSON documents. It is based on a complex combination of structural and Boolean assertions, and features negation and recursion. The static analysis of JSON Schema documents comprises practically relevant problems, including schema satisfiability, inclusion, and equivalence. These three problems can be reduced to witness generation: given a schema, generate an element of the schema, if it exists, and report failure otherwise" + +- title: What Are Real JSON Schemas Like? + url: https://link.springer.com/chapter/10.1007/978-3-030-34146-6_9 + year: 2019 + type: paper + summary: A first empirical analysis of a curated collection of real-world JSON Schemas. Knowing what real JSON Schemas are like (to borrow from a title of a related study on DTDs) helps practitioners and researchers in making realistic assumptions when building tools for JSON Schema processing + +- title: Challenges in Checking JSON Schema Containment over Evolving Real-World Schemas + url: https://link.springer.com/chapter/10.1007/978-3-030-65847-2_20 + year: 2020 + type: paper + summary: This paper presents the results of an empirical study of the first generation of tools for checking JSON Schema containment which is applied to a diverse collection of over 230 real-world schemas and their altogether 1k historic versions + +- title: Schema Inference for Massive JSON Datasets + url: https://hal.archives-ouvertes.fr/hal-01491765 + year: 2017 + type: paper + summary: "Recent years have seen the widespread use of JSON as a data format to represent massive data collections. JSON data collections are usually schemaless. While this ensures several advantages, the absence of schema information has important negative consequences: the correctness of complex queries and programs cannot be statically checked, users cannot rely on schema information to quickly figure out structural properties that could speed up the formulation of correct queries, and many schema-based optimizations are not possible. In this paper we deal with the problem of inferring a schema from massive JSON data sets" + +- title: JSON Schema Inference Approaches + url: https://link.springer.com/chapter/10.1007/978-3-030-65847-2_16 + year: 2020 + type: paper + summary: In the context of document NoSQL databases, namely those assuming the JSON data format, this paper focuses on several representatives of the existing inference approaches and provide their thorough comparison + +- title: JSONSchema.dev + url: https://jsonschema.dev + type: tool + summary: An online JSON Schema validator created by the JSON Schema specification lead + +- title: JSON Schema Viewer + url: http://jlblcc.github.io/json-schema-viewer/ + type: tool + summary: An online tool to visualize JSON Schema definitions + +- title: Hyperjump JSON Schema Validator + url: https://json-schema.hyperjump.io + type: tool + summary: An online JSON Schema validator that supports Draft 04, 06, 07, 2019-09, and 2020-12 +- title: JSONschema.Net + url: https://www.jsonschema.net + type: tool + summary: An online tool that generates JSON schema from JSON documents +- title: JSON Schema Validator + url: https://www.jsonschemavalidator.net + type: tool + summary: An online JSON Schema validator with support for JSON Schema Draft 3, Draft 4, Draft 6, Draft 7 and Draft 2019-09 +- title: JSON Schema Validator and Generator + url: https://extendsclass.com/json-schema-validator.html + type: tool + summary: An online JSON Schema validator that can generate JSON Schema from JSON documents and generate random JSON documents from JSON Schema + +- title: Top-Down Model-Driven Engineering of Web Services from Extended OpenAPI Models + url: https://ieeexplore.ieee.org/abstract/document/9000020 + year: 2018 + type: paper + summary: Shows how OpenAPI can be extended to add implementation details inside models. These extensions link services to assemblies of components that describe computations. Hence a top-down development process that keeps model and implementation aligned + +- title: Foundations of JSON Schema + url: https://dl.acm.org/doi/abs/10.1145/2872427.2883029 + year: 2016 + type: paper + summary: In this paper we provide the first formal definition of syntax and semantics for JSON Schema and use it to show that implementing this layer on top of JSON is feasible in practice + +- title: "User profile integration made easy: model-driven extraction and transformation of social network schemas" + url: https://dl.acm.org/doi/abs/10.1145/2187980.2188227 + year: 2012 + type: paper + summary: This paper presents, firstly, a semi-automatic approach to extract schema information from instance data. Secondly, transformations of the derived schemas to different technical spaces are utilized, thereby allowing, amongst other benefits, the application of established integration tools and methods. Finally, as a case study, schemas are derived for Facebook, Google+, and LinkedIn + +- title: Example-Driven Web API Specification Discovery + url: https://link.springer.com/chapter/10.1007/978-3-319-61482-3_16 + year: 2017 + type: paper + summary: In this paper we present an example-driven discovery process that generates model-based OpenAPI specifications for REST Web APIs by using API call examples. A tool implementing our approach and a community-driven repository for the discovered APIs are also presented + +- title: "Jsongen: a quickcheck based library for testing JSON web services" + url: https://dl.acm.org/doi/abs/10.1145/2633448.2633454 + year: 2014 + type: paper + summary: This article describes a systematic approach to testing behavioural aspects of Web Services that communicate using the JSON data format. To generate random JSON data for populating tests we have developed a new library, jsongen, which given a characterisation of the JSON data as a JSON schema, (i) automatically derives a QuickCheck generator which can generate an infinite number of JSON values that validate against the schema, and (ii) provides a generic QuickCheck state machine which is capable of following the (hyper)links documented in the JSON schema, to automatically explore the web service + +- title: An Approach for Schema Extraction of JSON and Extended JSON Document Collections + url: https://ieeexplore.ieee.org/abstract/document/8424731 + year: 2018 + type: paper + summary: This paper presents an approach that extracts a schema from a JSON or Extended JSON document collection stored in a NoSQL document-oriented database or other document repository. Aggregation operations are considered in order to obtain a schema for each distinct structure in the collection, and a hierarchical data structure is proposed to group these schemas in order to generate a global schema in JSON Schema format + +- title: Schema extraction and structural outlier detection for JSON-based nosql data stores + url: https://dl.gi.de/handle/20.500.12116/2420 + year: 2015 + type: paper + summary: Rather than designing the schema up front, extracting a schema in hindsight can be seen as a reverse-engineering step. Based on the extracted schema information, we propose set of similarity measures that capture the degree of heterogeneity of JSON data and which reveal structural outliers in the data + +- title: Definition of REST web services with JSON schema + url: https://dl.acm.org/doi/abs/10.1002/spe.2466 + year: 2017 + type: paper + summary: The aim of this article is to demonstrate how JSON Schema, and particularly the JSON Hyper Schema extension, is suitable to describe JSON-based web services that follow the REST architectural pattern + +- title: SchemaStore + url: https://www.schemastore.org + type: registry + summary: The largest collection of independent JSON schemas in the world meant as a universal JSON schema store, where schemas for popular JSON documents can be found + +- title: Sourcemeta Schemas + url: https://schemas.sourcemeta.com + type: registry + summary: An immutable collection of curated and versioned modern JSON Schema definitions + +- title: 'TILT: A GDPR-Aligned Transparency Information Language and Toolkit for Practical Privacy Engineering' + url: https://dl.acm.org/doi/10.1145/3442188.3445925 + year: 2021 + type: paper + summary: We present TILT, a transparency information language and toolkit explicitly designed to represent and process transparency information in line with the requirements of the GDPR and allowing for a more automated and adaptive use of such information than established, legalese data protection policies do + +- title: API Lifecycles, Specifications, and Standards with Kin Lane + url: https://www.infoq.com/podcasts/api-lifecycles-specifications-standards/ + year: 2021 + type: podcast + summary: Thomas Betts talks with Kin Lane about managing your API lifecycle using standards and specifications, including OpenAPI, AsyncAPI, and JSON Schema. These specifications and the tooling based on them can help reduce communication problems, by creating documentation, generating code, and automating testing + +- title: "Deriving Semantics-Aware Fuzzers from Web API Schemas" + url: https://arxiv.org/abs/2112.10328 + year: 2021 + type: paper + summary: Discusses JSON Schema canonicalization and JSON Schema instance derivation in the context of property-based testing of APIs + +- title: The Usage of Negation in Real-World JSON Schema Documents + url: http://bilioso.isti.cnr.it/sebd2022/preprint/SEBD_2022_Camera-ready_PDF_8.pdf + year: 2022 + type: paper + summary: Many software tools, but also formal frameworks for working with JSON Schema, do not fully support negation. This motivates us to study whether negation is actually used in practice, for which aims, and whether it could, in principle, be replaced by simpler operators. We have collected a large corpus of 80k open source JSON Schema documents. We perform a systematic analysis, quantify usage patterns of negation, and also qualitatively analyze schemas. We show that negation is indeed used, albeit infrequently, following a stable set of patterns + +- title: JSONBuddy + url: https://www.json-buddy.com + type: tool + summary: A JSON editor and validator desktop application for Windows + +- title: Implicit JSON Schema Versioning Triggered by Temporal Updates to JSON-Based Big Data in the τJSchema Framework + url: https://link.springer.com/chapter/10.1007/978-3-031-07969-6_3 + year: 2022 + type: paper + summary: This paper proposes an approach for handling implicit schema changes triggered by temporal updates of JSON-based Big Data. More precisely, when a user specifies a temporal JSON update operation that modifies a snapshot JSON component assigning a valid-time timestamp to its new value, the execution of such an operation requires the JSON component to become temporal, which is for all intents a schema change. Thus, a new version of the τJSchema temporal characteristics document is generated, with the addition of a new valid-time characteristic. New versions of the temporal JSON schema and of the temporal JSON document are also accordingly created + +- title: "τJSchema: A Framework for Managing Temporal JSON-Based NoSQL Databases" + url: https://link.springer.com/chapter/10.1007/978-3-319-44406-2_13 + year: 2016 + type: paper + summary: This paper proposes a framework called Temporal JSON Schema (τJSchema), inspired by the τXSchema framework defined for XML data. τJSchema allows defining a temporal JSON schema from a conventional JSON schema and a set of temporal logical and physical characteristics. Our framework guarantees logical and physical data independence for temporal schemas and provides a low-impact solution since it requires neither modifications of existing JSON documents, nor extensions to the JSON format, the JSON Schema language, and all related tools and languages + +- title: AlterSchema + url: https://alterschema.sourcemeta.com + type: tool + summary: Convert a JSON Schema definition between specification versions + +- title: "JSON BinPack: A space-efficient schema-driven and schema-less binary serialization specification based on JSON Schema" + url: https://www.jviotti.com/assets/dissertation.pdf + year: 2022 + type: paper + summary: A survey and benchmark of JSON-compatible binary serialization specifications followed by the introduction of JSON BinPack, a novel protocol-independent schema-driven and schema-less binary serialization specification that is strictly-compatible with JSON and takes advantage of JSON Schema formal definitions to produce bit-strings that are space-efficient in comparison to every considered alternative serialization specification + +- title: 'Maintaining JSON Schemas at Scale - Jason Desrosiers' + url: https://www.youtube.com/watch?v=GjJpRsVffg0 + year: 2021 + type: video + summary: In this talk, we will cover the keywords, concepts, and patterns for maintaining large schemas or large collections of schemas. We'll tackle problems like how to breakdown and organize schemas, how to bundle schemas, how to make large schemas efficient, how to get better error messages from large schemas, and more + +- title: 'So you think you understand JSON Schema? - Ben Hutton' + url: https://www.youtube.com/watch?v=vMG0NCDifI0 + year: 2021 + type: video + summary: In this session you'll learn some key fundamentals, intracacies that even catch out the experienced, and how to develop your own interoperable JSON Schema Vocabulary + +- title: 'JSON Schema In Production - You Can Use It Today - Ben Hutton, Postman' + url: https://www.youtube.com/watch?v=48QgjmwLWh0 + year: 2022 + type: video + summary: Hear the about the journey of organizations that use JSON Schema in production today, and learn about how JSON Schema continues to deliver value + +- title: QuickType.io + url: https://app.quicktype.io + type: tool + summary: An online JSON Schema code-generation utility with diverse programming language support + +- title: 'JSON Schema - the Good, the Bad and the Ugly' + url: https://vimeo.com/222489288 + year: 2017 + type: video + summary: With JSON Schema you are required to define your data and the available tooling to do so is not really great (yet). This presentation provides you with criteria to judge whether JSON Schema could be beneficial for your project or is just too much overhead + +- title: TypedWebhook.tools + url: https://typedwebhook.tools + type: tool + summary: An online webhook testing tool that is able to generate JSON Schema definitions out of incoming data + +- title: Validating Streaming JSON Documents with Learned VPAs + url: https://arxiv.org/abs/2211.08891 + year: 2022 + type: paper + summary: This paper presents a new streaming algorithm to validate JSON documents against a set of constraints given as a JSON schema. It proves that there always exists a visibly pushdown automaton (VPA) that accepts the same set of JSON documents as a JSON schema + +- title: Learn JSON Schema + url: https://www.learnjsonschema.com + type: official + summary: Reference documentation for JSON Schema + +- title: Not Elimination and Witness Generation for JSON Schema + url: https://arxiv.org/abs/2104.14828 + year: 2021 + type: paper + summary: "In this paper, we present an algebraic characterization of JSON Schema, obtained by adding opportune operators, and by mirroring existing ones. We present then algebra-based approaches for dealing with not-elimination and witness generation problems, which play a central role as they lead to solutions for the other mentioned complex problems" + +- title: 'JSONoid: Distributed JSON Schema Discovery' + url: https://github.com/dataunitylab/jsonoid-discovery + year: 2023 + type: paper + summary: A tool for distributed JSON schema discovery including many properties of the data + +- title: Enhancing JSON Schema Discovery by Uncovering Hidden Data + url: https://ceur-ws.org/Vol-2971/paper11.pdf + year: 2021 + type: paper + summary: Enhancing discovered JSON Schemas by disambiguating data and metadata + +- title: 'JSONoid: Monoid-based Enrichment for Configurable and Scalable Data-Driven Schema Discovery' + url: https://arxiv.org/abs/2307.03113 + year: 2023 + type: paper + summary: Meaningful schema information for semi-structured data + +- title: Comprehending Semantic Types in JSON Data with Graph Neural Networks + url: https://arxiv.org/abs/2307.12807 + year: 2023 + type: paper + summary: Graph neural networks for semantic type detection in JSON + +- title: Fast Discovery of Nested Dependencies on JSON Data + url: https://arxiv.org/abs/2111.10398 + year: 2021 + type: paper + summary: Efficient dependency mining algorithms for non-relational data + +- title: "Unifying Business, Data, and Code: Designing Data Products with JSON Schema" + url: https://www.oreilly.com/library/view/unifying-business-data/9781098144999/ + year: 2024 + type: book + summary: Covers topics such as writing your own JSON Schema vocabularies, understanding JSON Schema annotations, and hosting your own JSON Schema registries. More importantly, our book teaches you a methodology for effective data management + +- title: An Analysis of Defects in Public JSON Schemas + url: https://www.cri.minesparis.psl.eu/classement/doc/A-794.pdf + year: 2023 + type: paper + summary: Analysis of common defects found in publicly available schemas leading to recommend changes to the spec \ No newline at end of file diff --git a/pages/resources/[slug].page.tsx b/pages/resources/[slug].page.tsx new file mode 100644 index 000000000..428f8f739 --- /dev/null +++ b/pages/resources/[slug].page.tsx @@ -0,0 +1,114 @@ +import React, { useEffect, useState } from 'react'; +import fs from 'fs'; +import yaml from 'js-yaml'; +import { getLayout } from '~/components/Sidebar'; +import Head from 'next/head'; +import { Headline1 } from '~/components/Headlines'; + +type ResourcesProps = { + title: string; + url: string; + type: string; + summary: string; +}; + +type ParamProps = { + slug: string; +}; + +type DataProps = { + slug: string; + data: ResourcesProps[]; +}; + +export async function getStaticPaths() { + const paths = [ + { params: { slug: 'books' } }, + { params: { slug: 'articles' } }, + { params: { slug: 'courses' } }, + { params: { slug: 'videos' } }, + { params: { slug: 'podcasts' } }, + { params: { slug: 'papers' } }, + ]; + return { paths, fallback: false }; +} + +export async function getStaticProps({ params }: { params: ParamProps }) { + const { slug } = params; + const data = await fetchResourceData(slug); + + return { + props: { + data, + }, + }; +} +export default function ResourcePageComponent({ data }: { data: DataProps }) { + const { slug, data: resourceData } = data; + const routeName = slug.slice(0, -1); + const [searchTerm, setSearchTerm] = useState(''); + const [filteredArticles, setFilteredArticles] = useState( + resourceData?.filter((item: ResourcesProps) => item.type === routeName), + ); + useEffect(() => { + const results = resourceData.filter( + (item: ResourcesProps) => + item.type === routeName && + item.title.toLowerCase().includes(searchTerm.toLowerCase()), + ); + setFilteredArticles(results); + }, [searchTerm, resourceData]); + function capitalizeFirstLetter(value: string) { + return value.charAt(0).toUpperCase() + value.slice(1); + } + const newTitle = capitalizeFirstLetter(slug); + + return ( +
+ + {newTitle} + + {newTitle} + Welcome to the {`${newTitle}`} section. Please use the search box to + search for specific terms. +
+ setSearchTerm(e.target.value)} + className='w-full p-2 border border-gray-300 rounded-md focus:outline-none focus:border-blue-500 transition duration-300' + /> + {filteredArticles && + filteredArticles.map((item: ResourcesProps, index: number) => ( +
+ + {item.title} + +

{item.summary}

+
+ ))} +
+
+ ); +} + +const fetchResourceData = async (slug: string) => { + try { + const data = yaml.load(fs.readFileSync('data/resources.yml', 'utf8')); + return { + slug, + data: data, + }; + } catch (error) { + console.error('Error fetching data'); + return { slug, dummyData: 'No Data Found' }; + } +}; +ResourcePageComponent.getLayout = getLayout; From c0732ee782022cfc7e6c8476d084b9a615c9f5a7 Mon Sep 17 00:00:00 2001 From: Dhairya Majmudar <2022kuec2045@iiitkota.ac.in> Date: Mon, 20 May 2024 19:58:43 +0530 Subject: [PATCH 2/3] adding sidebar.tsx --- components/Sidebar.tsx | 91 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 85 insertions(+), 6 deletions(-) diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx index e2dd05113..4d9c58919 100644 --- a/components/Sidebar.tsx +++ b/components/Sidebar.tsx @@ -89,10 +89,14 @@ const SegmentSubtitle = ({ label }: { label: string }) => { ); }; const getDocsPath = [ + '/overview/welcome', '/overview/what-is-jsonschema', '/overview/sponsors', + '/overview/case-studies', '/overview/similar-technologies', + '/overview/use-cases', '/overview/code-of-conduct', + '/overview/FAQ', ]; const getStartedPath = [ '/learn/json-schema-examples', @@ -140,6 +144,20 @@ const getSpecificationPath = [ '/specification-links', '/specification', ]; +const getResourcePath = [ + '/resources/books', + '/resources/podcasts', + '/resources/papers', + '/resources/audios', + '/resources/courses', +]; +const resourceRoutes = [ + { uri: '/resources/books', label: 'Books' }, + { uri: '/resources/courses', label: 'Courses' }, + { uri: '/resources/videos', label: 'Videos' }, + { uri: '/resources/podcasts', label: 'Podcasts' }, + { uri: '/resources/papers', label: 'Papers' }, +]; export const SidebarLayout = ({ children }: { children: React.ReactNode }) => { const router = useRouter(); const [open, setOpen] = useState(false); @@ -214,7 +232,6 @@ export const SidebarLayout = ({ children }: { children: React.ReactNode }) => { -
@@ -246,6 +263,7 @@ export const DocsNav = ({ getStarted: false, getReference: false, getSpecification: false, + getResources: false, }); useEffect(() => { const pathWtihoutFragment = extractPathWithoutFragment(router.asPath); @@ -257,6 +275,8 @@ export const DocsNav = ({ setActive({ ...active, getReference: true }); } else if (getSpecificationPath.includes(pathWtihoutFragment)) { setActive({ ...active, getSpecification: true }); + } else if (getResourcePath.includes(router.asPath)) { + setActive({ ...active, getResources: true }); } }, [router.asPath]); @@ -276,10 +296,15 @@ export const DocsNav = ({ setActive({ ...active, getSpecification: !active.getSpecification }); }; + const handleClickResources = () => { + setActive({ ...active, getResources: !active.getResources }); + }; + const rotate = active.getDocs ? 'rotate(180deg)' : 'rotate(0)'; const rotateG = active.getStarted ? 'rotate(180deg)' : 'rotate(0)'; const rotateR = active.getReference ? 'rotate(180deg)' : 'rotate(0)'; const rotateSpec = active.getSpecification ? 'rotate(180deg)' : 'rotate(0)'; + const rotateResources = active.getResources ? 'rotate(180deg)' : 'rotate(0)'; const { theme } = useTheme(); @@ -287,6 +312,7 @@ export const DocsNav = ({ const [reference_icon, setReference_icon] = useState(''); const [spec_icon, setSpec_icon] = useState(''); const [overview_icon, setOverview_icon] = useState(''); + const [resources_icon, setResources_icon] = useState(''); useEffect(() => { if (theme === 'dark') { @@ -294,11 +320,13 @@ export const DocsNav = ({ setLearn_icon('/icons/compass-dark.svg'); setReference_icon('/icons/book-dark.svg'); setSpec_icon('/icons/clipboard-dark.svg'); + setResources_icon('/icons/bookshelf-dark.svg'); } else { setOverview_icon('/icons/eye.svg'); setLearn_icon('/icons/compass.svg'); setReference_icon('/icons/book.svg'); setSpec_icon('/icons/clipboard.svg'); + setResources_icon('/icons/bookshelf.svg'); } }, [theme]); @@ -338,6 +366,7 @@ export const DocsNav = ({ className={classnames('ml-6', { hidden: !active.getDocs })} id='overview' > + - + +
+ {/* Resources */} +
+
+
+ eye icon + +
+ + + +
+
+ {resourceRoutes.map(({ uri, label }) => ( + + ))} +
+
); }; From 6660cd3b5c0226e4b4dab23cc5fc6edf91e67219 Mon Sep 17 00:00:00 2001 From: Dhairya Majmudar <2022kuec2045@iiitkota.ac.in> Date: Mon, 20 May 2024 20:03:44 +0530 Subject: [PATCH 3/3] adding svgs --- public/icons/bookshelf-dark.svg | 3 +++ public/icons/bookshelf.svg | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 public/icons/bookshelf-dark.svg create mode 100644 public/icons/bookshelf.svg diff --git a/public/icons/bookshelf-dark.svg b/public/icons/bookshelf-dark.svg new file mode 100644 index 000000000..d40bb82fe --- /dev/null +++ b/public/icons/bookshelf-dark.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/public/icons/bookshelf.svg b/public/icons/bookshelf.svg new file mode 100644 index 000000000..7f435d5d1 --- /dev/null +++ b/public/icons/bookshelf.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file