Skip to content

Allow compact ref specification #2

Description

@ricekab

Currently even very simple references are pretty long form, often taking up more than half of the actual object's definition.

An "inline" reference, similar to how id references are done, would be helpful.

A proposed solution to convert this old format:

// (normal data here)
"!refs":
  file_extension:
    target_class: FileExtension
    criteria:
      name: ".abc"

to something like:

// (normal data here)
file_extension: "!FileExtension?name=.abc#<field>"

Where the #<field> is an optional slug.

This may have some trouble with numeric types though? Might have to do field introspection to determine if a string needs to be converted to int / float / datetime / ...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions