Skip to content

Option to specify what operations to include for each model #72

@bcanfield

Description

@bcanfield

Currently, the create, edit, list, and show operations are being created by default for all specified models.

It would be nice to be able to fine tune this and specify which operations to include for each model.

It seems like eventually we will need to move to a config file, but for now I would like to keep strictly using args.

My initial thought is for this, we could do something like:

program
  .command('create <modelNames...>')
  .description('Create models')
  .action((modelNames) => {
    modelNames.forEach((modelName) => {
      program
        .command(`--model-${modelName} [operations...]`)
        .description(`Specify operations for ${modelName} (comma-separated)`)
        .action((operations) => {
          console.log(`Creating ${modelName} with operations:`, operations);
        });
    });
  });

npx nexquik --model-Model1 Create,List --model-Model2 Edit,Show

Metadata

Metadata

Assignees

No one assigned

    Labels

    New featureNew features to be created

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions