gurock / testrail-api

TestRail API: Examples on how to use TestRail's API from various languages
Other
116 stars 87 forks source link

Generate swagger spec from any TestRail site, create API in any language #8

Closed ianfixes closed 4 years ago

ianfixes commented 7 years ago

A script to generate a swagger spec from a live TestRail installation, which in turn can generate an API client in one of many languages.

In this example, we'll create a ruby API for an imaginary installation at https://example.testrail.net/index.php?/api/v2 using the generate-testrail-swagger.rb script provided by this patch and swagger-codegen.

#!/bin/sh
export TESTRAIL_API_USER=me@example.com
export TESTRAIL_API_KEY=abc123zyx098

ruby generate-testrail-swagger.rb https://example.testrail.net/index.php?/api/v2 > my-spec.yaml
swagger-codegen generate -i my-spec.yaml -l ruby
jtamagnan commented 6 years ago

@tgurock is there any necessary changes that should be made before this can be merged. I've used this to create python bindings and have had a good experience with it so far.

jonridera commented 4 years ago

Closing this PR. There have been changes in the API since this PR was created.

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/tree/master/user-submitted

ianfixes commented 4 years ago

There have been changes in the API since this PR was created.

Not surprising, this PR has been open for over 2 years with no feedback from the maintainers 👎

To be blunt, this work is of little value as a "user submitted" script and based on the lack of movement here I have little incentive to restart that process. The best maintainers of this spec would be the maintainers of TestRail, and the benefit of that maintenance it is ease of generating clients in a number of languages far beyond what exists in this repo now.

Does the Gurock team understand how the provided Swagger spec relates to the existing clients in this repo in particular? I'm not getting the sense that they do, and in the absence of feedback it's very difficult to close that knowledge gap.

jonridera commented 4 years ago

Hi @ianfixes,

I do appreciate the feedback and understand this script can be helpful for users. I have added a request for our development team to implement and maintain a script to generate a Swagger spec as part of the testrail-api repository.

ianfixes commented 4 years ago

Thank you for your reply, that is good news.

Is that request something I can subscribe to on GitHub? Where will the spec be hosted when it is ready?

jonridera commented 4 years ago

Any script like this which would be owned and maintained by Gurock would likely be hosted in the gurock/testrail-api repo. Subscribing to this repository should be sufficient.

Regards, Jon