Open agowa opened 4 years ago
Hello. I am currently working on this for basically the reasons you mentioned, plus type backing would help bring the objects into compliance with the backend API while also making them more human readable. Hoping to have this in the next release.
Is it possible to follow the progress? I am new to .net and Powershell classes.
Sorry - I have something I'm cooking up on my local computer. Trying a few different existant modules that will generate stuff from the API spec to see if any of them are reasonable. I have been keeping that in a private repo because anything that touches this repo triggers a beta release and a lot of this literally doesn't run.
@BatmanAMA Google sent me down to AutoRest Is that something you are currently using? After typing out a few classes by hand using @agowa338 's example and About_Classes
, it makes sense that there has to be "a better way."
I have played with it, and it may be how I generate classes but I don't care for the module part of what it generates.
Please add data types for simpler handling and error checking. Having types like below will allow:
My example is currently static, but it could be generated dynamically too. Just overwriting the new method and calling Add-Member before returning the instantiated object.