Skip to content

Use template engine that supports nested objects #3

Description

@mokkabonna

Would you be willing to change the template engine you are currently using to one that supports nested objects? Or at least property names with a dot in them?

I have created this plugin: https://github.com/mokkabonna/vue-vuelidate-jsonschema

It exposes to $params the schema that belongs to the property:

schemaPattern: {
  schema: {
    type: 'string',
    title: 'Name',
    description: 'The name of the student.',
    pattern: '^\\w+\s\\w+$',
    default: 'Jack'
  }
}

But I can't reference it in the message templates since string-template does not support nested objects. Or object names with dots in them. There is a PR open to Matt-Esch/string-template#19 fix that, but it's quite old.

One option is https://www.npmjs.com/package/es6-template-strings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions