Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Copy ModelResource schema to route request schema with extra fields #174

@bolerodan

Description

@bolerodan

I'm wondering if there is a way, to copy the schema from a ModelResource (Inline('self)) but add some extra fields onto it for another defined Route within that Resource, specifically the request_schema for said route.

The reasoning behind this, is that I have a route that requires the exact same properties as say, the create route, however I have a few extra ones required. This would just save having to duplicate writing out a fieldSet with all the properties from that model, just to include an extra one, and I dont want to include these extra fields on the Schema of the resource, as these are only related to this specific route and not the model.

Some way to do something even like

def create(self, properties: FieldSet({"extract": Inline('self'), "taxonomy_id": fields.Integer(nullable=True)}) )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions