Skip to content

Allow compact ref specification #2

@ricekab

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 / ...

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