Inspect daml packages using the grpc/json API

Hello, we are looking to use Java/JavaScript code to fetch and inspect a dar file provided as input, combine it with certain annotations in a separate yaml file and output an OpenAPI spec. To do this, we need to be able to fetch a package and iterate over the various modules in the package, the various templates in the module, and the choices and data types defined in the templates, similar to how the Java reflection API allows us to inspect Java functions, classes etc. How do we do this? Is there any reference/sample code we can refer to, in order to achieve this?

1 Like

There are a couple of existing posts that talk about inspecting dar files - perhaps you can start here: