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

Add default values for optional params #6

Open
dadoonet opened this issue Oct 30, 2012 · 1 comment
Open

Add default values for optional params #6

dadoonet opened this issue Oct 30, 2012 · 1 comment

Comments

@dadoonet
Copy link

Hi All,

It could be nice to have default values for non mandatory params:

   "optional_params" : [
      { "trim_user" : { "default" : "myuser" } },
      { "include_entities" : { "default" : "false" } }
    ]

Could this make sense in term of SPORE specification?

That means that implementations should handle it by replacing empty placeholders with default values for optional params.

I don't have blocking issue at the present time but I think it could exist???

Feel free to close it if it's a non sense.

@dadoonet
Copy link
Author

dadoonet commented Dec 5, 2012

So, this time I have the following:

        "cluster_state" : {
            "path" : "/_cluster/state?filter_nodes=:filter_nodes&filter_routing_table=:filter_routing_table&filter_metadata=:filter_metadata&filter_blocks=:filter_blocks&filter_indices=:filter_indices",
            "method" : "GET",
            "optional_params" : [
               "filter_nodes",
               "filter_routing_table",
               "filter_metadata",
               "filter_blocks",
               "filter_indices"
            ]
         }

If I don't set optional params, it should generate:

$ curl "http://localhost:9200/_cluster/state?filter_nodes=false&filter_routing_table=false&filter_metadata=false&filter_blocks=false"

How can I achieve that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant