Location of SmartThings API swagger definition

The only Swagger definition of the SmartThings API that I have been able to find is this: https://swagger.api.smartthings.com/public/st-api.yml. Is this the most up to date version of the swagger definition or is there another one somewhere else?

Hi @mekker , I’m Alejandro from the dev support team

We consulted with the team and this swagger definition last update was about a year ago, so, it might have some elements missing.
Can you provide more details about what your trying to do, please?
If it helps, this documentation about the API is up-to-date and you can see the URL and parameters needed for each endpoint

Okay, I am trying to automatically generate a python client using the open api generator: https://openapi-generator.tech/

The swagger I referred to is of version 2.0 and the open api python generator only supports open api (swagger) version 3.0 documentation. I have not done much research on the possibility of converting the given documentation to version 3.0. Anyway it would be nice with the most up to date swagger definition when generating the client.

Is the swagger definition not public?

Hi @mekker

We asked the engineering team about your problem, unfortunately we don’t have updates yet. As soon as they answer, we will share their feedback with you.

About converting version 2.0 to 3.0, I found this method:

  1. Go to Swagger editor
  2. Click on file
  3. Import the yml file
  4. Once the file is displayed, click on edit
  5. Then, click on Convert to OpenAPI 3

We hope it works for you

Thank you, I will wait for updates. Seems like the swagger editor is able to do the conversion. I will see what I can do with that document!

Unfortunately the conversion from OpenAPI 2 to 3 does does not seem to produce a working definition. When running the OpenAPI generator on the 3.0 document, it fails on the spec validation.

How long will it take to get feedback from the engineering team? Has no one asked for the swagger definition before? I would have guessed that this was a standard question for anyone wanting to interact with the API.

Hi @mekker

Unfortunately we don’t have response from engineering team yet, the official ways that people have to interact with the API are the ST CLI or use an external tools like API browser