Skip to content

FOLLOW-UP: Refactor GenerateResource to use options struct (from PR #273) #276

@adnaan

Description

@adnaan

Context

This follow-up task was identified during the review of PR #273.

Source PR: #273
PR Title: feat: add authorization / RBAC system (Roadmap 2.3)
Suggested by: @claude[bot]

Task Description

GenerateResource now has 13 positional parameters. 15+ test call sites had to be updated to add the withAuthz bool parameter. An options struct would make future additions non-breaking:

type ResourceOptions struct {
    Kit, CSSFramework, Styles, PaginationMode string
    PageSize int
    EditMode, ParentResource string
    WithAuthz bool
}

func GenerateResource(basePath, moduleName, resourceName string,
    fields []parser.Field, opts ResourceOptions) error

This issue was automatically created by prmonitor from PR review comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upFollow-up task from PR reviewfrom-reviewIssue originated from PR review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions