Flat schema - #60
Merged
Merged
Flat schema#60
Conversation
Owner
Author
|
@JJediny should the data.json field property in the schema file be - field_name: organization
label: Organization
form_template: form/organization.html
datajson: publisher.name |
Owner
Author
|
Woot, figured out a way to construct the Okay, it's ready to merge. Just want @JJediny to take a look at the |
Contributor
|
Looks good to me... +1 to merge |
Owner
Author
|
Good point @JJediny and thanks for the quick response. FYI, added documentation for this to the wiki |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A less complex alternative to #58 that I hope is enough. This pull request allows administrators to create schema files in the
_data/schemas/directory to extend the fields that ship with JKAN. Requirements around this schema file are:field_namemust be a string as it's used as the object key. As such, dataset schemas are flat (no foo[bar][baz]) with the exception of the resources sectiontitle,notes,organization, andcategory. If there are no fields in the schema file with thosefield_names, JKAN functionality will gracefully degredatedata.jsonfile generation to work, each field in the schema should have adatajsonproperty indicating where it fits into the data.json structure. This property can use dot notation (ie.contactPoint.fn), and is not a required property as schemas may have fields that data.json does not expect.TODO:
data.jsongenerator, and figure out a way to remove whitespace without sacrificing all readabilityWhat do you think @JJediny? This is that simpler alternative I mentioned, also trying to incorporate your idea of mapping the
datajsonfields.