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

Make API more consistent #17

Open
rcannood opened this issue Oct 29, 2024 · 0 comments
Open

Make API more consistent #17

rcannood opened this issue Oct 29, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@rcannood
Copy link

Description of feature

When I make a call to Get schema, I get something like this:

core:
  run:
    fields_metadata:
      id:
        type: BigAutoField
        through: ~
        field_name: id
        model_name: run
        column_name: id
        schema_name: core
        is_link_table: no
        relation_type: ~
        related_field_name: ~
        related_model_name: ~
        related_schema_name: ~
      uid:
        type: CharField
        through: ~
        field_name: uid
        model_name: run
        column_name: uid
        schema_name: core
        is_link_table: no
        relation_type: ~
        related_field_name: ~
        related_model_name: ~
        related_schema_name: ~
      parent:
        type: ForeignKey
        through:
          left_key: parent_id
          right_key: id
          link_table_name: ~
        field_name: parent
        model_name: run
        column_name: parent_id
        schema_name: core
        is_link_table: no
        relation_type: many-to-one
        related_field_name: children
        related_model_name: run
        related_schema_name: core
...

Could we make the naming system of "modules", "models", and "fields" consistent across what I'm being told to use, the API and the schema?

  • I was told by Alex that core, bionty, ... are modules, Artifact, Run, ... are registries, and that a record in a registry as fields.
  • In the API, all instances of {model_name} should be renamed to {registry_name}. For example: POST /instances/{instance_id}/modules/{module_name}/{model_name}/{id_or_uid}
  • In a registry's fields_metadata, the following keys should be renamed:
    • model_nameregistry_name
    • schema_namemodule_name
    • related_model_namerelated_registry_name
    • related_schema_namerelated_module_name
@rcannood rcannood added the enhancement New feature or request label Oct 29, 2024
@fredericenard fredericenard self-assigned this Nov 4, 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