Closed ianfixes closed 4 years ago
Closing this issue. If this has been completed and you would like to contribute a custom script, please submit a pull request in the appropriate area here: https://github.com/gurock/testrail-custom
The pull request (#8) was that contribution -- a completed implementation of this effort
Can we reopen this? It seems PR was closed without being merged. Most clients out in the world are slowly getting old and it takes lot of effort to keep them up to date. Easiest solution would be to support OpenAPI / Swagger (or any other) spec that can be used to generate client out of it and therefore simplify efforts to maintain it, not mentioning ability to support vast number of languages.
Why?
The API clients that you’ve made available on do indeed work, and your documentation is reasonable. However, for the same effort it takes to write good documentation, you can write a Swagger spec – then you get not only the documentation, but also the ability to code-generate clients whose methods are already declared and whose objects/properties are strongly typed.
What?
At ~1000 lines of Swagger YAML, I’m roughly halfway done writing the entire TestRail spec in Swagger.
Pasting that file into the online Swagger editor will show you the generated documentation and allow you to download a generated client.
Here’s an example of printing out the names of test case types, with the generated Ruby client:
How?
The only correct way to finish this task would be to host the YAML file for the Swagger spec as a PHP file within the TestRail installation. This is because some parts of the spec are dynamic:
host: mydomain.testrail.com
should really be supplied by a value from$_SERVER
.If I finish transcribing the API spec into YAML, can this dynamic functionality be added to the server?