atomist-attic / rug

DEPRECATED Runtime for Rugs
GNU General Public License v3.0
53 stars 13 forks source link

default_value -> "undefined" #630

Closed slimslenderslacks closed 7 years ago

slimslenderslacks commented 7 years ago

for atomist:spring-team-handlers:0.1.142, we've been having a problem with the "SpringRestSeedGeneratorHandler" Command handler metadata in the metadata.json. The artifactId parameter is defined like this:

            "name": "artifactId",
            "description": "Maven artifact identifier, i.e., the name of the jar without the version, it is often the same as the project name",
            "pattern": "^[a-z][-a-z0-9_]*$",
            "required": true,
            "displayable": true,
            "default_value": "undefined",
            "valid_input_description": "a valid Maven artifact ID, which starts with a lower-case letter and contains only  alphanumeric, -, and _ characters",
            "max_length": 50,
            "min_length": 1,
            "display_name": "Maven Artifact ID"
        }

with a default_value of "undefined". On the other hand, a similar generator like SpringBootSeed has an artifactId parameter of

{
            "name": "artifactId",
            "description": "Maven artifact identifier, i.e., the name of the jar without the version, it is often the same as the project name",
            "pattern": "^[a-z][-a-z0-9_]*$",
            "required": true,
            "displayable": true,
            "valid_input_description": "a valid Maven artifact ID, which starts with a lower-case letter and contains only  alphanumeric, -, and _ characters",
            "max_length": 50,
            "min_length": 1,
            "display_name": "Maven Artifact ID"
        }

where there is no default_value. Rod and I looked at the code and it looks like the command handler also shouldn't be defining a default_value.

The "undefined" value does cause a problem right now because readers of this metadata do not know that "undefined" means that it's NOT defined. :) .

This is a blocker for getting this SpringRestSeedGeneratorHandler working!

cdupuis commented 7 years ago

This might also be a bug in the cli when generating the metadata. I'll look into this.

cdupuis commented 7 years ago

This is not a bug in the Rug. It is a bug in the client code declaring the parameter in the CommandHandler.