zowe / cics-for-zowe-client

Monorepo for all CICS related APIs and Apps built by Zowe Clients
https://www.zowe.org/
Eclipse Public License 2.0
1 stars 3 forks source link

API expansion: Auto-generated code based on Specs/Schemas #84

Open stewartfrancis opened 5 years ago

stewartfrancis commented 5 years ago

Hi, I'm the lead developer of CICS Explorer at IBM, and I wanted to test the water to see if you would welcome contributions to expand the API covered by the CIC CLI plugin.

We use a lot of code generation technology in CICS Explorer to generate a Java model of CPSM's API. The code generator operates on a meta-model of CPSM's API, something like, but definitely not, an OpenAPI spec, I guess. I've toyed around with adapting this code generator in the past to generate TypeScript. I was taking a look at your CLI plugin, and I figured it'd probably be possible to generate support for more resource types and more actions. I guess this could potentially be all resource types and actions, though some will be more complicated than others!

Let me know if you're interested. This definitely doesn't constitute a promise, but we could at least do a little investigation and see how feasible it would be. Thanks!

tucker01 commented 5 years ago

@stewartfrancis, this is definitely something we are interested in. We have experimented with generating (statically and dynamically) commands from OpenAPI spec in the past. If we can partially or fully generate contributions to zowe-cli based on existing code/specs/schemas, it makes it that much easier to provide and maintain content/commands.

We would also appreciate CICS developers contributing to CICS plugin. You guys are the experts 😄 .

Contributions are welcomed/encouraged. Feel free to open a PR at any time for review.

stewartfrancis commented 5 years ago

Ok so I've had a bit of a think about this and here's my rough plan: I'm going to have a stab at creating a node module containing CPSM's meta-model, which can be used to derive all the available API commands. We'd then be able to use this in the CLI plugin instead of having to define API stuff in there, and it'd be kind of general purpose too. We've got something similar in Java that we use for CICS Explorer, so I think that creating something in TypeScript shouldn't be too tough, though I do need to warm up my TypeScript as I've not used it for a while!