You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.
Is your feature request related to a problem? Please describe.
When building the permutation script I needed to create a new file that is a copy of the question file but with a different structure. The new structure enable people to add new questions without having to add code or worry about breaking the actual code. With the actual structure adding a new questions to a question file without being cautious may break the code that handle in which order the question are asked. Also because we use array indexes to invoke questions it is not explicit on which question is handled:
Describe the solution you'd like
Right now questions are hold in an array and are invoked with their index. I suggest to change that array to an object:
From this structure
{
"inputs": [
{
"key": "resourceName",
"question": "Provide a friendly name for your resource to be used as a label for this category in the project:",
"validation": {
"operator": "regex",
"value": "^[a-zA-Z0-9\\-]+$",
"onErrorMsg": "Resource name should be alphanumeric"
},
"required": true
},
...
]
}
to this structure
{
"resourceName": {
"key": "resourceName",
"question": "Provide a friendly name for your resource to be used as a label for this category in the project:",
"validation": {
"operator": "regex",
"value": "^[a-zA-Z0-9\\-]+$",
"onErrorMsg": "Resource name should be alphanumeric"
},
"required": true,
"default": "myivs",
"next": "channelQuality"
},
...
}
Reworking those file will also enable us to only use one file to manage questions and the generations of all the permutations in #210
In this new structure it might also be useful to move default-values in question file instead of having them in a separated file.
Also add documentation on how to build / modify the question files so new contributors can easily add new services or update existing ones.
Additional context
Reworking those files will mainly require the refactor of the service-walkthroughs files and the permutation script present in the pull-request #210
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When building the permutation script I needed to create a new file that is a copy of the question file but with a different structure. The new structure enable people to add new questions without having to add code or worry about breaking the actual code. With the actual structure adding a new questions to a question file without being cautious may break the code that handle in which order the question are asked. Also because we use array indexes to invoke questions it is not explicit on which question is handled:
Describe the solution you'd like
Right now questions are hold in an array and are invoked with their index. I suggest to change that array to an object:
From this structure
to this structure
Reworking those file will also enable us to only use one file to manage questions and the generations of all the permutations in #210
In this new structure it might also be useful to move default-values in question file instead of having them in a separated file.
Also add documentation on how to build / modify the question files so new contributors can easily add new services or update existing ones.
Additional context
Reworking those files will mainly require the refactor of the
service-walkthroughs
files and the permutation script present in the pull-request #210The text was updated successfully, but these errors were encountered: