Why not just write a Groovy program that given a specification and an API endpoint it verifies that your API follows the specification? You can invoke that from powershell. Otherwise a powershell script that emits groovy snippet would still require invoking that snippet.
ReadyAPI seems to operate on OpenAPI specification so I'll stick to that.
If so, you could grab JsonSlurper
to parse the specification if it's in JSON or grab YamlSlurper
if it's YAML (Groovy 3.0+). After that it's just parsing that document looking for the paths, and generating API requests to it (Java 11 HttpClient or the older HttpBuilder from Groovy). It's not going to be simple, but it's not rocket science.
Here is an example of processing an OpenAPI spec file using Groovy to print out the title:
URL url = new URL("https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.1/non-oauth-scopes.json")
URLConnection conn = url.openConnection()
String charset = conn.getContentType().split(";")[1].split("=")[1].trim())
new BufferedReader( new InputStreamReader( conn.inputStream, charset ) ).withCloseable { buf ->
String text = buf.readLines().join("\n")
def json = new JsonSlurper().parseText( text )
println( json.info.title )
json.paths.each { path, v -> println( path ) }
}