Coder Social home page Coder Social logo

jy95 / docusaurus-json-schema-plugin Goto Github PK

View Code? Open in Web Editor NEW
54.0 3.0 9.0 26.44 MB

JSON Schema viewer / editor in Docusaurus

Home Page: https://jy95.github.io/docusaurus-json-schema-plugin/

License: GNU Affero General Public License v3.0

TypeScript 71.41% JavaScript 4.77% CSS 0.88% MDX 22.93%
docusaurus docusaurus-plugin docusaurus-theme json-schema json-schema-documentation json-schema-editor json-schema-viewer hacktoberfest hacktoberfest-accepted

docusaurus-json-schema-plugin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docusaurus-json-schema-plugin's Issues

static file not being served in build

I created a page to display all my json-schema (i,e /schema), I used schema.mdx file to display it

image

In each of the mdx file, it looks something like this but importing different json file

import JSONSchemaViewer from "@theme/JSONSchemaViewer"
import schema from "@site/static/schema/geo.json"

<JSONSchemaViewer schema={schema} />

In local development, it works as expected.

image

But when I build and serve it, it doesn't load the content

image

Not sure if it matters but I'm using javascript setup of docusaurus instead of typescript.

Let me know if more information is required, or if this is a docusaurus issue, then I can redirect over to their repo.

Thanks!

JSONSchemaViewer colors palette override

Hi there! thanks for this wonderful plugin :)

Any hint on how to customize the colors used by the JSONSchemaViewer React component and override the ones given by docusaurus?

thanks!

detectedTypes returns new Set instead of new Array

I hesitate to report this as an issue since it was found while using swizzled source code against the latest Docusaurus beta, so maybe it's not a concern, but I found that the downstream parsing of the return value from this line doesn't work because it is a Set[] instead of an string[] (or whatever is in the original array).

if (declaredTypes.length !== 0) {
return [...new Set(declaredTypes)]
}

I believe the TypeScript issue is reported, but I've had no luck with configuring TypeScript compile this to be an array, and had to patch with:

- return [...new Set(declaredTypes)];
+ return Array.from(new Set(declaredTypes));

Support MongoDB $jsonSchema

Is it possible to support it?

See mongodb-jsonschema

A sample

{ $jsonSchema: <JSON Schema object> }
{
  $jsonSchema: {
     required: [ "name", "major", "gpa", "address" ],
     properties: {
        name: {
           bsonType: "string",
           description: "must be a string and is required"
        },
        address: {
           bsonType: "object",
           required: [ "zipcode" ],
           properties: {
               "street": { bsonType: "string" },
               "zipcode": { bsonType: "string" }
           }
        }
     }
  }
}

If it does, I imagine I would use the same way I did before to display it

import JSONSchemaViewer from "@theme/JSONSchemaViewer"
import schema from "@site/static/schema/mongo.json"

<JSONSchemaViewer schema={schema} />

Thanks

Show description before the type

Hi,

I was wondering whether it's possible to show the description above the type, which is particularly useful for objects with a lot of fields.

Enhance landing page Responsiveness

Enhance responsiveness

I found that the text and description in the card of the landing page are text-aligned left for

  • JSON Schema Viewer / Editor
  • Configurable
  • Open source
    I think It does not suit the responsiveness of the website
    I went through the code and made it text-align center below I will attach the screenshot comparing both:

Screen Width above 1200 px

From:

as1

To;

ss1

Screen Width below 1200 px

From:

as2

To:

ss2

Screen Width below 500px:

###From:

as3
###To:

ss3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.