Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider JSON Schema support #89

Open
cldellow opened this issue Feb 19, 2023 · 1 comment
Open

Consider JSON Schema support #89

cldellow opened this issue Feb 19, 2023 · 1 comment

Comments

@cldellow
Copy link
Owner

Perhaps as a plugin? See discussion at https://discord.com/channels/823971286308356157/996877076982415491/1076869765290803290

It could perhaps use the bundled JSON Forms that I built for datasette-scraper: https://github.com/cldellow/datasette-scraper/tree/master/jsonforms-bundle

How would we convey the schema to be used?

@meowcat
Copy link

meowcat commented Feb 21, 2023

(copy from Discord)

  • Possibility 1: in metadata.json
{ "databases": {
    "mydb": {
      "tables": {
        "mytable": {
          "plugins": {
            "dux-json-schema": {
              "mycolumn": { ... json schema goes here ... }
  • Possibility 2: in the templates directory
    • schema-{tablename}-{columnname}.json in the templates folder
    • if it is table-unspecific, just schema-{columnname}.json

To be consistent with existing datasette templates, it should probably be:
schema-mydatabase-mytable-mycolumn.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants