Skip to content

Add required option to resources#21

Merged
afuno merged 10 commits into
servactory:mainfrom
MaratKarimov21:features/add-requered-options-to-resoures
Sep 4, 2025
Merged

Add required option to resources#21
afuno merged 10 commits into
servactory:mainfrom
MaratKarimov21:features/add-requered-options-to-resoures

Conversation

@MaratKarimov21

@MaratKarimov21 MaratKarimov21 commented Aug 31, 2025

Copy link
Copy Markdown
Contributor

Problem

When a resource was defined, it was implicitly required, which prevented invoking flag actions in a global context (without passing the resource).

Solution

Added required: false to the resource DSL. Now a resource can be marked as optional and omitted when calling actions.

Backward compatibility

required defaults to true; existing behavior remains unchanged.

@MaratKarimov21
MaratKarimov21 marked this pull request as ready for review September 1, 2025 07:09
Comment thread examples/usual/example1/main_feature.rb Outdated
Comment thread README.md Outdated
MaratKarimov21 and others added 2 commits September 1, 2025 09:18
Co-authored-by: Anton <profox.rus@gmail.com>
@MaratKarimov21
MaratKarimov21 requested a review from afuno September 1, 2025 17:07
Comment thread lib/featury/resources/resource.rb
afuno
afuno previously approved these changes Sep 3, 2025
@MaratKarimov21
MaratKarimov21 requested a review from afuno September 3, 2025 08:30
Comment thread lib/featury/actions/service/factory.rb Outdated
afuno
afuno previously approved these changes Sep 3, 2025
@afuno afuno assigned afuno and unassigned afuno Sep 3, 2025
@afuno afuno added the feature label Sep 3, 2025
@afuno afuno added this to the v.1.0.0 milestone Sep 3, 2025
@afuno
afuno merged commit 6ddabcb into servactory:main Sep 4, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants