Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Helper script to convert govuk specialist-publisher schema to rumager document schema
json ="path/to/specialist-publisher/schema")
publisher_schema = JSON.parse(json)
fields = publisher_schema['facets'].map{|x| x['key']}
allowed_values = {}
publisher_schema['facets'].each do |facet|
allowed_values[facet['key']] = facet["allowed_values"]
fields: fields,
allowed_values: allowed_values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.