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

feat: enhance options for /settings/system/ API #1108

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bzwei
Copy link
Contributor

@bzwei bzwei commented Oct 17, 2024

Add customized attributes to fields from GET and PATCH method in the return body from OPTIONS method. These can be used for UI to properly render them to customer.

This implemententation returns a format compatible with how the controller returns OPTIONS request.

AAP-33164: EDA settings API needs to provide Options method.

Sample output:

{
    "name": "Setting",
    "description": "",
    "renders": [
        "application/json",
        "text/html"
    ],
    "parses": [
        "application/json",
        "application/x-www-form-urlencoded",
        "multipart/form-data"
    ],
    "actions": {
        "PATCH": {
            "INSIGHTS_TRACKING_STATE": {
                "type": "boolean",
                "required": false,
                "label": "Gather data for Automation Analytics",
                "help_text": "Enables the service to gather data on automation and send it to Automation Analytics.",
                "category": "System",
                "category_slug": "system",
                "hidden": false,
                "default": false
            }
        }
        "GET": {
            "INSIGHTS_TRACKING_STATE": {
                "type": "boolean",
                "label": "Gather data for Automation Analytics",
                "help_text": "Enables the service to gather data on automation and send it to Automation Analytics.",
                "category": "System",
                "category_slug": "system",
                "defined_in_file": false,
                "hidden": false
            }
        }
    }
}

@bzwei bzwei requested a review from a team as a code owner October 17, 2024 20:35
@bzwei bzwei added the run-e2e label Oct 17, 2024
@bzwei bzwei force-pushed the options branch 2 times, most recently from 007f3a9 to 7488789 Compare October 18, 2024 13:46
Add customized attributes to fields from GET and PATCH method in the
return body from OPTIONS method. These can be used for UI to properly
render them to customer.

This implemententation returns a format compatible with how the controller
returns OPTIONS request.

AAP-33164: EDA settings API needs to provide Options method
Copy link

sonarcloud bot commented Oct 18, 2024

@bzwei bzwei added run-ui-e2e Run UI E2E tests on a PR and removed run-ui-e2e Run UI E2E tests on a PR labels Oct 18, 2024
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.

1 participant