Skip to content

pladdy/jsonschema-scratch

Repository files navigation

jsonschema-scratch

build status code coverage codacy MIT license

This is a jsonschema and flask sandbox. This enables setting up some jsonschemas and make them available via a HTTP interface.

Goals / Ideas

  • complex JSON schemas that can be resolved if they have references
    • IE DRY up schemas by sharing components but be able to view a schema de-referenced´
  • store schemas in an embedded db (sqlite?)? or just use the file system?
    • sqlite has json functions
    • instead of a file structure just have table(s)
    • if i use a db schemas need to be easy to discover (ie see a list like a filesystem?)
      • how do i list them now in flask?
  • version schemas so you can update them
    • not sure if it makes sense to require a version # in the json schema, but perhaps in the db?

API

Document with swagger/openapi and/or use connexion?

TODO

  • when calling /schemas/ to view, if it's a dir, create links to the files so you can just click on it
  • create validate blueprint and a schemas blueprint?
  • print exceptions better, look into traceback
  • can post a schema

References

Refs and $ref URIs

It's possible to use relative file urls in the schemas as long as a base-uri is set to an absolute file URI for jsonref and a RefResolver objects being used.

Tools

About

A python flask project for learning jsonschema

Resources

License

Stars

Watchers

Forks

Packages

No packages published