insomniacc / PSSnow

A powershell module for interacting with the ServiceNow REST API
GNU General Public License v3.0
41 stars 9 forks source link

Revise & refactor functionBuilder #29

Open insomniacc opened 1 year ago

insomniacc commented 1 year ago

Since every SNOW instance is developed differently for each org, things change. That's really the primary issue that led me to build this module. I've seen multiple instances of SNOW in different orgs with completely different config and settings, which makes taking a single module and using it across them all quite difficult. What works for one may not for another.

The framework with the table API was designed to make modifying table functions easier and save time, but it still takes time to check attributes, rename parameters, add validation scripts, test, etc.

The logic behind functionBuilder is to auto generate Table API functions based on the current config. I'm still yet unsure how I want to fully implement, it could potentially be a 'one time initialization' that generates all the functions of the module against an instance of snow, or just a tool that users can implement themselves. For v0.0.1 I'll leave it as the latter and provide some basic OOB style table functions that should work for most.

The existing functionBuilder script needs revising, requirements cleanly listing and then rewriting in a much cleaner way.