Skip to content

✨ feat(flags): allow json content in addition to filename#173

Merged
jfbus merged 1 commit into
mainfrom
flag_json_string
May 5, 2026
Merged

✨ feat(flags): allow json content in addition to filename#173
jfbus merged 1 commit into
mainfrom
flag_json_string

Conversation

@jfbus
Copy link
Copy Markdown
Contributor

@jfbus jfbus commented May 5, 2026

Description

Many flags point to a file containing a JSON value.

This PR adds the ability to pass a JSON string directly as a flag value.

Fixes: #172

Type of Change

Please check the relevant option(s):

  • 🐛 Bug fix
  • ✨ New feature
  • 🧹 Code cleanup or refactor
  • 📝 Documentation update
  • 🔧 Build or CI-related change
  • 🔒 Security fix
  • Other (specify):

How Has This Been Tested?

Please describe the test strategy:

  • Manual testing
  • Unit tests
  • Integration tests
  • Not tested yet

Checklist

  • I have followed the Contributing Guidelines
  • I have added tests or explained why they are not needed
  • I have updated relevant documentation (README, examples, etc.)
  • My changes follow the Conventional Commits specification
  • My commits include appropriate Gitmoji

Additional Context

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

WARNING : Differences in reference doc 🤔

 docs/reference/octl_iaas_policy_create.md                  | 10 +++++-----
 docs/reference/octl_iaas_policyversion_create.md           |  6 +++---
 docs/reference/octl_storage_bucket_acl_configure.md        |  3 ++-
 docs/reference/octl_storage_bucket_cors_configure.md       |  5 +++--
 docs/reference/octl_storage_bucket_lifecycle_configure.md  |  5 +++--
 docs/reference/octl_storage_bucket_objectlock_configure.md |  5 +++--
 docs/reference/octl_storage_bucket_policy_configure.md     |  7 ++++---
 docs/reference/octl_storage_bucket_website_configure.md    |  5 +++--
 docs/reference/octl_storage_object_acl_configure.md        |  7 ++++---
 docs/reference/octl_storage_object_tagging_configure.md    |  7 ++++---
 10 files changed, 34 insertions(+), 26 deletions(-)
Detailed changes

docs/reference/octl_iaas_policy_create.md

-      --document File        The file storing the policy document, corresponding to a JSON string that contains the policy.
+      --document fileOrJson   Either a file storing the policy document or the policy document (in JSON format).

docs/reference/octl_iaas_policyversion_create.md

-      --document File   The file storing the policy document, corresponding to a JSON string that contains the policy.
+      --document fileOrJson   Either a file storing the policy document, or the policy document (in JSON format).

docs/reference/octl_storage_bucket_acl_configure.md

-      --from-file string            the file storing the ACL config in JSON format (i.e. {"Grants":[...]})
+      --from-file string            The file storing the ACL config (JSON format, i.e. {"Grants":[...]})
+      --from-string string          The ACL config (JSON format, i.e. {"Grants":[...]})

docs/reference/octl_storage_bucket_cors_configure.md

-      --from-file string   the file storing the CORS config in JSON format (i.e. {"CORSRules":[...]})
+      --from-file string     The file storing the CORS config (JSON format, i.e. {"CORSRules":[...]})
+      --from-string string   The CORS config (JSON format, i.e. {"CORSRules":[...]})

docs/reference/octl_storage_bucket_lifecycle_configure.md

-      --from-file string   the file storing the Lifecycle config in JSON format (i.e. {"Rules":[...]})
+      --from-file string     The file storing the Lifecycle config (JSON format, i.e. {"Rules":[...]})
+      --from-string string   The Lifecycle config (JSON format, i.e. {"Rules":[...]})

docs/reference/octl_storage_bucket_objectlock_configure.md

-      --from-file string   the file storing the ObjectLock config in JSON format (i.e. {"ObjectLockEnabled":"Enabled", "Rule":{...}})
+      --from-file string     The file storing the ObjectLock config (JSON format, i.e. {"ObjectLockEnabled":"Enabled", "Rule":{...}})
+      --from-string string   The ObjectLock config (JSON format, i.e. {"ObjectLockEnabled":"Enabled", "Rule":{...}})

docs/reference/octl_storage_bucket_policy_configure.md

-      --from-file File   the file storing the policy config in JSON format (i.e. {"Version":"...","Statement":[...]})
+      --from-file fileOrJson   The file storing the policy config (JSON format, i.e. {"Version":"...","Statement":[...]})
+      --from-string string     The policy config (JSON format, i.e. {"Version":"...","Statement":[...]})

docs/reference/octl_storage_bucket_website_configure.md

-      --from-file string   the file storing the website config in JSON format (e.g. {"ErrorDocument":{...},"IndexDocument":{...},"RoutingRules":[...]})
+      --from-file string     The file storing the website config (JSON format, e.g. {"ErrorDocument":{...},"IndexDocument":{...},"RoutingRules":[...]})
+      --from-string string   The website config (JSON format, e.g. {"ErrorDocument":{...},"IndexDocument":{...},"RoutingRules":[...]})

docs/reference/octl_storage_object_acl_configure.md

-      --from-file string   the file storing the ACL config in JSON format (i.e. {"Grants":[...]})
+      --from-file string     The file storing the ACL config (JSON format, i.e. {"Grants":[...]})
+      --from-string string   The ACL config (JSON format, i.e. {"Grants":[...]})

docs/reference/octl_storage_object_tagging_configure.md

-      --from-file string   the file storing the tagging config in JSON format (i.e. {"TagSet":[{"Key":"...", "Value":"..."}]})
+      --from-file string     The file storing the tagging config (JSON format, i.e. {"TagSet":[{"Key":"...", "Value":"..."}]})
+      --from-string string   The tagging config (JSON format, i.e. {"TagSet":[{"Key":"...", "Value":"..."}]})

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Binary size: 81.6MB => 81.6MB (change +0KB, +0.0%) 😉

@jfbus jfbus force-pushed the flag_json_string branch 2 times, most recently from 86379fd to b039dc0 Compare May 5, 2026 12:32
@jfbus jfbus force-pushed the flag_json_string branch from b039dc0 to fd7c4ae Compare May 5, 2026 12:34
@jfbus jfbus marked this pull request as ready for review May 5, 2026 13:19
@jfbus jfbus requested a review from a team May 5, 2026 13:19
@jfbus jfbus requested a review from a team as a code owner May 5, 2026 13:19
@jfbus jfbus merged commit c35a591 into main May 5, 2026
10 checks passed
@jfbus jfbus deleted the flag_json_string branch May 5, 2026 13:58
@jfbus jfbus added the kind/feature New feature or request label May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature New feature or request

Development

Successfully merging this pull request may close these issues.

Json String instead of File for document

2 participants