Commit 93fcc2c5 authored by Diegodlh's avatar Diegodlh
Browse files

Reapply e642dcde with changes to support fetching schema from remote URL

e642dcde added a helper fixed selection for the item type field.

However, it was not working when the schema was fetched from a remote URL.

This was reported to json-editor: https://github.com/json-editor/json-editor/issues/1165

This commit is a workaround which does not use $ref, hence duplicating some code.
parent a8a5eb92
......@@ -394,7 +394,7 @@
"type": "array",
"items": {
"title": "Selection step",
"oneOf": [
"anyOf": [
{
"title": "Citoid selection",
"description": "Selects a field from the Citoid response for the target webpage",
......@@ -544,6 +544,66 @@
"config"
]
},
{
"title": "Fixed selection (Item type field)",
"description": "Always returns the same predefined Citoid/Zotero item type",
"type": "object",
"properties": {
"type": {
"title": "Type",
"type": "string",
"enum": ["fixed"],
"options": { "hidden": true }
},
"config": {
"title": "Configuration",
"description": "The predefined Citoid/Zotero item type to be returned.",
"type": "string",
"enum": [
"artwork",
"attachment",
"audioRecording",
"bill",
"blogPost",
"book",
"bookSection",
"case",
"computerProgram",
"conferencePaper",
"dictionaryEntry",
"document",
"email",
"encyclopediaArticle",
"film",
"forumPost",
"hearing",
"instantMessage",
"interview",
"journalArticle",
"letter",
"magazineArticle",
"manuscript",
"map",
"newspaperArticle",
"note",
"patent",
"podcast",
"presentation",
"radioBroadcast",
"report",
"statute",
"thesis",
"tvBroadcast",
"videoRecording",
"webpage"
]
}
},
"required": [
"type",
"config"
]
},
{
"title": "Fixed selection",
"description": "Always returns the same predefined value",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment