Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: globalConfig does not allow "placeholder" property for Basic/OAuth fields #822

Closed
iqno opened this issue Aug 22, 2023 · 4 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@iqno
Copy link

iqno commented Aug 22, 2023

Description

When adding OAuth functionality via. globalConfig, the "placeholder" property of basic/oauth fields is now allowed.

Currently the documentation states:

Fields allowed in basic and oauth fields as of now:

oauth_field: This should be kept as it is and without any change.
label: This can be changed if the user wants to change the label of the field in UI.
field: For now this user must keep it as it is for mandatory fields as mentioned above.
help : This can be changed if user wants to change the help text displayed below field.
encrypted : This should be true if user wants that particular field encrypted else no need to have this parameter.

placeholder: The placeholder for the field.

required: To specify whether the field is required or not. The default value is true.

However, when building an app with the ucc-gen build --ta-version=1.0.0 command, I am met with the following error message:

 ~/appname/ $ ucc-gen build --ta-version=1.0.0

INFO: ucc-gen version 5.28.4 is used
INFO: Python binary name to use: python3
INFO: Output folder is /Users/username/appname/output
INFO: Add-on will be built with version '1.0.0'
INFO: Cleaned out directory /Users/username/appname/output
INFO: Using globalConfig file located @ /Users/username/appname/globalConfig.json
ERROR: globalConfig file is not valid. Error: Additional properties are not allowed ('placeholder' was unexpected)

What ucc-gen version are you using?

5.28.4

Additional System Info

Python==3.11.2, OS=Mac OS Ventura

@iqno iqno added the bug Something isn't working label Aug 22, 2023
@iqno iqno changed the title BUG: BUG: globalConfig does not allow "placeholder" property for Basic/OAuth fields Aug 22, 2023
@tbalar-splunk
Copy link
Contributor

Thank you for reporting this issue. We will prioritise this task and update the codebase.

@tbalar-splunk
Copy link
Contributor

Started working on this issue - https://splunk.atlassian.net/browse/ADDON-64957

@tbalar-splunk
Copy link
Contributor

We have determined that the issue lies not within the code itself but rather in the incorrect documentation for the usage of placeholders in the OAuth feature of ucc-gen. We are currently in the process of revising the ucc documentation to rectify this.

Below is a snippet demonstrating how to utilize placeholder in the global config file:

{
    "oauth_field": "username",
    "label": "Label",
    "encrypted": false,
    "help": "help text",
    "field": "field_name",
    "options": {
        "placeholder": "Required"
    }
}

@tbalar-splunk
Copy link
Contributor

Also, The Placeholder attribute is deprecated and will be removed in the next major version. Instead, we recommend to use "help" attribute.

#831

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants