Coder Social home page Coder Social logo

schemastore / schemastore Goto Github PK

View Code? Open in Web Editor NEW
2.9K 2.9K 1.5K 26.7 MB

A collection of JSON schema files including full API

Home Page: http://schemastore.org

License: Apache License 2.0

JavaScript 85.84% CSS 2.70% HTML 10.18% Shell 1.29%
hacktoberfest

schemastore's Introduction

JSON Schema Store

The largest collection of independent JSON schemas in the world.

Build status CodeQL

The repository is a universal JSON schema store, where schemas for popular JSON documents can be found.

Website: schemastore.org

Contribute

Contributions are more than welcome! Both to the website itself or to the various schema files. Please carefully read CONTRIBUTING.md.

schemastore'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  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  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

schemastore's Issues

Publish in npm

Be good can install as package and load schema from package. Maybe best good create two repo one have only schamas, other have only web site

Support editorconfig config files

Would like support for .editorconfig INI-style config files.
This one is a little different because it's not exactly JSON and I didn't see any support for anything similar but it seems like these kinds of things could be supported without too much work.
Thoughts?

[Question]: Would generated JSON Schema documentation be useful?

Hi

I've completed the first cut of a JSON Schema documentation tool. Basically it creates HTML and PDF documentation from a json schema (draft 4). Note its not 100%, finished, but good enough to demo!

I've generated the code for most of the schemas in your library, and hosted it on our site (see http://schemas.liquid-technologies.com/json/.angular-cli.json/index.html for example).

I've also mocked up the changes required to link to it from the schemastore, see
https://github.com/sprotty/schemastore

If you think the documentation is useful then please get in touch to discuss it (email). It is still early days with the document generator, so I'm in a good position to incorporate feedback, changes, enhancements etc.

Regards
Simon

tslint.json schema angular prefixes only allow "sg"

The intent of "directive-selector-prefix" and "component-selector-prefix" in tslint.json files is to allow people to turn the prefix check on/off, and then define a custom prefix to use. "sg" is used as the custom prefix in some samples because it was in some Style Guides that way, but it was never intended to be the only possible value.

In http://json.schemastore.org/tslint, these two properties need to be changed so that their arrays will accept true, false, or any string.

pipe-naming, likewise, needs to allow true/false (for the first value), "kebabCase"/"camelCase" (for the second), and any string (for the remaining values).

babelrc plugins array item type

Here's an example of the plugins of .babelrc accepting more than just strings:

.babelrc

{
  "plugins": [
    ["react-intl", {
        "messagesDir": "./build/messages/",
        "enforceDescriptions": true
    }]
  ]
}

Babelrc documentation:

Plugin Options

Plugins can specify options. You can do so in your config by wrapping it in an array and providing a options object. For example:

{
  "plugins": [
    ["transform-async-to-module-method", {
      "module": "bluebird",
      "method": "coroutine"
    }]
  ]
}

The babelrc.json here says:

        "plugins": {
            "description": "List of plugins to load and use",
            "type": "array",
            "items": {
                "type": "string"
            }
        },

I think it should be this:

            "type": ["string", "array"],
            "items": {
                "description": "the plugin name in .[0] and the options object in .[1]",
                "type": [ "string", "object" ]
            }

strict property missing in jsconfig.json schema

From @cyrilletuzi on May 30, 2017 14:28

  • VSCode Version: 1.12.2

Steps to Reproduce:

  1. Add "checkJs": true in jsconfig.json > type checking is working and json is OK
  2. Add "strict": true in jsconfig.json > strict type checking is working but json is warned as invalid as strict property is missing in jsconfig.json schema.

I can manage the PR, but I didn't found the file (I just found the one with the default values, but not the schema itself).

Copied from original issue: microsoft/vscode#27583

[Question]: clarification on the definition of rules

Hello, guys,

Firstly, this project is very interesting. You simplify the process of writing configs in Visual Studio Code. Thanks, 👍

Secondly, I write schema generator for stylelint. Before generate the schema, i would like to clarify a few questions:

  • How detailed should I make the schema? For example, now I'm writing: example.json (rule: font-weight-notation)or i should use a simplified version as eslintrc.json#L8-L27?

  • Can I provide the following information: if array then first item should be string and second item should be object?

    {
      "rules": {
        "font-weight-notation": ["numeric", { "ignore": ["relative"] }]
      }
    }

Add tutorial for adding schema to the repository

I need some assistance adding a schema to the schemastore repository and couldn't find the information I needed in the project documentation. I would appreciate any assistance that you can provide, and think that answers to these questions would be a good addition to either the README.md or some other documentation in the repository.

I am attempting to add schema for some ArcGIS JSON formats: ArcGIS Web Map Data and ArcGIS Online Item. (I am attempting this in this fork and branch.) I also created another JSON Schema file for geometry objects that is referenced by the other two files. Although the schema files seem to work correctly within the Visual Studio 2015 IDE environment, referencing the external geometry JSON Schema file is causing an error in the Grunt build task.

Running "tv4:arcgis-online-item" (tv4) task
> load + arcgis-geometry.json
Process terminated with code 3.
Fatal error: Cannot call method 'replace' of undefined

If I understand correctly, the schema validation task is successful. It is the task that validates the sample data against JSON Schema that is failing. (It's possible this also may be a bug with grunt-tv4.)

  • Does schemastore.org support files referencing external schema files, or do all schemas need to be self-contained? While I haven't looked at all of the JSON Schemas in this repository, so far I haven't seen any that reference other files as I am attempting to do.
  • Am I not setting up the schema files' id properties correctly? The other schema files in the repository didn't seem to have id properties. I have only recently started authoring JSON schemas and I didn't fully understand the documentation about the id property available on json-schema.org.

"uri" format in web-manifest

the web-manifest schema describes "uri" as the format for start_url and icon.src, but I don't think this is compatible with what the the Manifest spec describes where these URIs are potentially relative URIs.

(I understand that the jsonschema validation spec requires uri to match absolute URIs per its reference to RFC 3986).

Enum values in tsconfig.json too restrictive as values are not case sensitive

The TypeScript compiler treats the compiler options such as module and target case insensitive. The tsconfig.json schema however can not express that and lists enum value in lower case. Because of that, all options using a different casing are considered invalid.

This causes issues such as microsoft/vscode-generator-code#20.

The schema should be changed to either

  • also contain the other casings variants, at least ES3, ES5 and ES6 for target as they are explicitly named in the TS documentation
  • besides the enum also allow any other string. Something like
      "module": {
         "description": "Specify module code generation: 'CommonJS', 'Amd', 'System', 'UMD', 'es6', or 'es2015'.",
        "oneOf": [{
               "enum": [ "commonjs", "amd", "umd", "system", "es6", "es2015" ]
            }, {
               "type": "string"
            }],
       }

typings.json schema is not working on vscode

image

Could it because of $schema is ahead of title?
https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/typings.json#L2

Compare to others, (e.g. tsconfig.json), it's the other way around:
https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/tsconfig.json#L2

I understand that it's json and order should not matter, but I can't see other reason for it.
Can I make a PR to give it a try? Or do you know how to get a local copy and try it out?

Document plugins property on tsconfig and jsconfig

Both tsconfig and jsconfig files support a plugins property in the compilerOptions. However it is currently only documented for tsconfig files

I'll submit a PR that also adds this property to the jsconfig schema

Add HTTPS support

Would like secure access to the schemas, but trying to access schemastore from an https served app gives:

This server could not prove that it is json.schemastore.org; its security certificate is from *.azurewebsites.net. This may be caused by a misconfiguration or an attacker intercepting your connection.

Wrong warnings in tslint.json for accepted configuration values

I'm using VSCode 1.7.2, TSLint plugin 0.6.3, TSLint 4.0.1 and TypeScript 2.0.10.

When I open the tslint.json file in VSCode I get serveral wrong warnings about my configuration values:

"cyclomatic-complexity": true -> Incorrect type. Expected "array"

"no-consecutive-blank-lines": true -> Incorrect type. Expected "array"

"object-literal-key-quotes": [true, "consistent-as-needed"] -> Value is not an accepted value. Valid values: [true,false,"always","as-needed"]

"one-variable-per-declaration": true -> Incorrect type. Expected "array"

"only-arrow-functions": true -> Incorrect type. Expected "array"

"typedef": [true, "arrow-call-signature"] -> Value is not an accepted value. Valid values: [true,false,"call-signature","parameter","arrow-parameter","property-declaration","variable-declaration","member-variable-declaration"]

https://github.com/Microsoft/vscode-tslint/issues/132

palantir/tslint#1776

Add the defaultSeverity property to the schema for tslint.json

The TSLint documentation has a property that is missing from the schema.

defaultSeverity?: "error" | "warning" | "off": The severity level used when a rule specifies a default warning level. If undefined, “error” is used. This value is not inherited and is only applied to rules in this file.

Suggested fix:
Add the following object to the properties section at the end of the schema:

"defaultSeverity": {
  "type": "string",
  "enum": ["error", "warning", "off"],
  "default": "error"
}

[Question]: version in schemastore

With new options coming in TypeScript 2.0, is there a way to specify that these flags are only for certain TypeScript version and that only when certain version of TypeScript is installed, those flags will be shown

It wasn't clear to me from the README that you can do so

Versioning of schema files are handled by modifying the file name to include the version number: myschema-1.2.json

Thanks!

Need to update project.json schema

While writing the doc about the project.json schema (dotnet/docs#448), I've noticed a few things that need to be fixed in the schema file:

  • It's missing buildoptions\additionalArguments
  • It's missing buildoptions\xmlDoc
  • buildoptions\preserveCompilationContext is missing the default value
  • runtimeOptions section is missing the other configProperties (System.GC.RetainVM, System.Threading.ThreadPool.MinThreads and System.Threading.ThreadPool.MaxThreads)
  • runtimeOptions section is missing framework (with name and version) and applyPatches
  • commands is now deprecated

/cc @ajaybhargavb @schellap

project.json file versioning for RC1 and RC2

Is there any interest in creating RC1- and RC2-specific JSON schemas for project.json? As an example, the compilationOptions property is now deprecated in RC2 in favor of buildOptions. Cases like this may prove the value of such versioning.

Allow response top level array json in responseOverrides

The current definition for response.body does not allow you to return top level array

"response.body": {
          "description": "The string representation of the body to be returned to the client.",
          "anyOf": [
            { "type": "string" },
            { "type": "object" }
          ]
        },

JSON Content-Type

I notice the content-type of the JSON schemastore delivering is text/plain instead of application/json.

It can be a problem for file request management and dynamic parsing.

Content-Type: application/json

bower.json exportsOverride

The exportsOverride property in bower.json should allow arrays for the file globbing values.

E.g.

"exportsOverride": {
    "jquery-validation": {
        "": [ "jquery.validate.js", "additional-methods.js" ]
    }
}

geoJSON?

I was surprised that SchemaStore doesn't have a schema for geoJSON. Is this in the works? Or would there be interest in creating one?

YAML section

Since more and more projects/frameworks are using YAML as their configuration format and it's fairly easy to apply JSON Schema to YAML, I think it would make a lot of sense to add a new section YAML to the schemastore.

Would you be open to this idea? I'd love to contribute a couple of schemas for popular frameworks and tools.

Schema's pointing to githubusercontent.com

I've noticed the below schema's pointing to githubusercontent.com cannot be loaded through ajax:

XMLHttpRequest cannot load https://raw.githubusercontent.com/composer/composer/master/res/composer-schema.json. The 'Access-Control-Allow-Origin' header has a value 'https://render.githubusercontent.com' that is not equal to the supplied origin. Origin 'http://localhost:8080' is therefore not allowed access.

XMLHttpRequest cannot load https://raw.githubusercontent.com/mozilla/contribute.json/master/schema.json. The 'Access-Control-Allow-Origin' header has a value 'https://render.githubusercontent.com' that is not equal to the supplied origin. Origin 'http://localhost:8080' is therefore not allowed access.

XMLHttpRequest cannot load https://raw.githubusercontent.com/wordnik/swagger-spec/master/schemas/v1.2/apiDeclaration.json. The 'Access-Control-Allow-Origin' header has a value 'https://render.githubusercontent.com' that is not equal to the supplied origin. Origin 'http://localhost:8080' is therefore not allowed access.

Maybe it's useful to host them at schemastore by default unless a schema provider serves the schema from a stable source on their own website?

If I recall correctly github deliberatly does not support this kind of loading, since it's not a cdn.

I'm just fooling around with the schemastore btw, so the priority of this issue is zero :-)
I just expected every schema to be reachable without any extra coding.

I'm using this catalog as source:
http://schemastore.org/api/json/catalog.json

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.