Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to_liquid for Lutaml::Model::Serializable to allow conversion to Liquid::Drop objects #180

Open
ronaldtse opened this issue Nov 19, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ronaldtse
Copy link
Contributor

Liquid::Drop objects can be dynamically created for Lutaml::Model::Serializable objects.

We just need to create a {KlassName}Drop class that inherits from Liquid::Drop, and create methods for every attribute.

For each attribute, return the corresponding Drop class:

  • All Lutaml::Model::Serializable classes already have to_liquid
  • Lutaml::Type classes:
    • Simple types: Provide a value that is Liquid acceptable.
    • Complex types: Provide a Drop class that we need to define.

This will address things like:

@ronaldtse ronaldtse added the enhancement New feature or request label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants