-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update json schema #11
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,9 @@ | |
"spatial_extent", | ||
"temporal_extent", | ||
"sample_files", | ||
"data_type" | ||
"data_type", | ||
"providers", | ||
"item_assets" | ||
], | ||
"properties": { | ||
"collection": { "type": "string", "title": "Collection" }, | ||
|
@@ -91,13 +93,72 @@ | |
"items": { | ||
"type": "object", | ||
"properties": { | ||
"upload": { | ||
"type": "boolean", | ||
"title": "Upload", | ||
"default": false | ||
}, | ||
"cogify": { | ||
"type": "boolean", | ||
"title": "Cogify", | ||
"default": false | ||
}, | ||
"dry_run": { | ||
"type": "boolean", | ||
"title": "Dry Run", | ||
"default": false | ||
}, | ||
"discovery": { | ||
"type": "string", | ||
"enum": [ | ||
"s3" | ||
], | ||
"title": "Discovery" | ||
}, | ||
"prefix": { | ||
"type": "string", | ||
"title": "Prefix" | ||
}, | ||
"bucket": { | ||
"type": "string", | ||
"title": "Bucket" | ||
}, | ||
"filename_regex": { | ||
"type": "string", | ||
"title": "Filename Regex", | ||
"default": "[\\s\\S]*" | ||
}, | ||
"datetime_range": { | ||
"type": "string", | ||
"title": "Datetime Range" | ||
}, | ||
"start_datetime": { | ||
"type": "string", | ||
"format": "date-time", | ||
"title": "Start Datetime" | ||
}, | ||
"end_datetime": { | ||
"type": "string", | ||
"format": "date-time", | ||
"title": "End Datetime" | ||
}, | ||
"single_datetime": { | ||
"type": "string", | ||
"format": "date-time", | ||
"title": "Single Datetime" | ||
}, | ||
"id_regex": { | ||
"type": "string", | ||
"title": "Id Regex" | ||
}, | ||
"id_template": { | ||
"type": "string", | ||
"title": "Id Template" | ||
}, | ||
"use_multithreading":{ | ||
"type": "string", | ||
"title": "Use Multithreading", | ||
"default": "false" | ||
} | ||
}, | ||
"required": ["prefix", "bucket"] | ||
|
@@ -122,6 +183,130 @@ | |
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"item_assets": { | ||
"type": "object", | ||
"title": "Item Assets", | ||
"properties": { | ||
"cog_default": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"default":"image/tiff; application=geotiff; profile=cloud-optimized" | ||
}, | ||
"roles": { | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"type": "string" | ||
} | ||
], | ||
"default":[ | ||
"data", | ||
"layer" | ||
] | ||
}, | ||
"title": { | ||
"type": "string", | ||
"default":"Default COG Layer" | ||
}, | ||
"description": { | ||
"type": "string", | ||
"default":"Cloud optimized default layer to display on map" | ||
} | ||
}, | ||
"required": [ | ||
"type", | ||
"roles", | ||
"title", | ||
"description" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"cog_default" | ||
] | ||
}, | ||
"renders": { | ||
"type": "object", | ||
"title": "Renders" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks like this is missing a type There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The renders object follows this schema: https://github.com/stac-extensions/render/blob/main/json-schema/schema.json Do you think we should use that schema or just make it an object where someone can copy paste their renders object? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @smohiudd - It turns out that the react-jsonschema-form library "only supports local definition referencing". There is a separate json-schema-ref-parser library that does let us parse the json schema. I pulled that in and put a copy of the stac-extensions schema above in the public directory to try it out. Unfortunately, it seems to be hanging up with some references. I'm still trying to debug, but I pushed a commit with a partially working version. Another work around would be something like allow some or all of the Renders object be a text area where users paste in the object. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'm leaning more toward making all renders a text area where a user can paste in the render configs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, I made that change and pushed it up. I'm good with merging and trying it this way. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! |
||
}, | ||
"providers": { | ||
"title": "Providers", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
"name" | ||
], | ||
"properties": { | ||
"name": { | ||
"title": "Organization name", | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"description": { | ||
"title": "Organization description", | ||
"type": "string" | ||
}, | ||
"roles": { | ||
"title": "Organization roles", | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"enum": [ | ||
"producer", | ||
"licensor", | ||
"processor", | ||
"host" | ||
] | ||
} | ||
}, | ||
"url": { | ||
"title": "Organization homepage", | ||
"type": "string", | ||
"format": "iri" | ||
} | ||
} | ||
} | ||
}, | ||
"assets": { | ||
"type": "object", | ||
"properties": { | ||
"thumbnail": { | ||
stephenkilbourn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"type": "object", | ||
"properties": { | ||
"title": { | ||
"type": "string" | ||
}, | ||
"description": { | ||
"type": "string" | ||
}, | ||
"href": { | ||
"type": "string" | ||
}, | ||
"type": { | ||
"type": "string" | ||
}, | ||
"roles": { | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"type": "string" | ||
} | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"title", | ||
"description", | ||
"href", | ||
"type", | ||
"roles" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be a boolean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah you're right should be boolean.