juan7732 / json-schema-viewer

A JSON Schema Viewer for any JSON Schema on earth.

Home Page:https://json-schema.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

json-schema-viewer

Atlassian license

Welcome to JSON Schema Viewer - Juan's Fork!

This is a major fork from the main JSON Schema Viewer created by Atlassian.

My goal is to create an isolated packagable liteweight version of this that does not use external links to load schema, and rather does it by internal JSON Files.

Below is part of original ReadMe and will be updated as needed.

Original Atlassian-Labs demo page: Try it out today at: https://json-schema.app

Original Problem statement

JSON Schema is awesome. It lets you define and validate the schema for your JSON object and is used to define many many JSON structures. For example schemas, please see: https://www.schemastore.org/json/

However, as great as the format is, without familiarity, it is often very difficult to read JSON Schema and understand exactly what JSON is allowed by the schema. Well, fear not! JSON Schema Viewer to the rescue: just paste a link to your JSON Schema and it will be rendered beautifully, comprehensively and with examples describing the JSON you should expect at evely level of the hierarchy.

Extended Problem statement

As nice as this open source application is, there are times when we do not want to load schema resources from across other web resources on the internet. Whether we want to just showcase the schema for locally defined schemas, or if we just want to have offline functionality. We also do not want to solely be restricted to an AWS deployable.

Finally, we may want to thin out as much of the styling as possible.

Usage

To run this project locally:

Development build:

  1. Run npm install to install dependencies
  2. Run npm run gen-schema
  3. Run npm start to run locally

Production Build:

  1. Run npm install to install the dependencies.
  2. Run npm run gen-schema to generate source from schema.
  3. Run npm run build
  4. Run npm run serve

Now open: http://localhost:8080 to see the site and develop it live.

Deployment

My goal is to be able to deploy and serve this on any web server that supports react spas. Ideally it should work using serve, or even deployed on an nginx server.

Documentation

This project is a React SPA that is designed to be deployed anywhere. It implements a Schema Explorer for JSON Schema and does not build an abstraction layer between JSON Schema and the UI layer.

Tests

There are currently no tests for this project. Instead, we use and browse the react storybooks to ensure that the schema is being rendered correctly.

License

This is a forked version of the Atlassian-Labs JSON Schema Viewer, for ease of use, the same APACHE license will be reused for the overall repository, but I believe that the package lock also includes an MIT license for the internal workings of the react spa. As which, I will still use the more encompassing Apache license.

Original Copyright:

Copyright (c) 2021 Atlassian and others.

License file maintained:

Apache 2.0 licensed, see LICENSE file.

Changes from original:

  1. Does not include functionality to load schema from the internet
  2. Does not require aws-cloudfront certificates or deployment scripts
  3. Changes the styling used by the original
  4. Reduces overall functionality of the original one
  5. Removes starter page
  6. Removes extra content

About

A JSON Schema Viewer for any JSON Schema on earth.

https://json-schema.app/

License:Apache License 2.0


Languages

Language:TypeScript 97.3%Language:CSS 2.4%Language:HTML 0.2%Language:JavaScript 0.1%