# Newer version of OpenAPI

**URL:** <https://community.asterisk.org/t/newer-version-of-openapi/103162>\
**Category:** Development\
**Created:** [July 2, 2024, 1:43pm UTC](https://community.asterisk.org/t/newer-version-of-openapi/103162 "2024-07-02T13:43:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DeveloperOrion](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/developerorion/32/8011_2.png) [@DeveloperOrion](https://community.asterisk.org/u/DeveloperOrion)\
**Post date:** [July 2, 2024, 1:43pm UTC](https://community.asterisk.org/t/newer-version-of-openapi/103162/1 "2024-07-02T13:43:59Z")

</div>

Question, are you guys working on a newer version of the Swagger API? I’d like to use NSwagStudio to generate an Asterisk client but it seems Swagger 1.1 is used by Asterisk and this version is unsupported by NSwagStudio. Recent OpenAPI versions usually support the latest version: 3.

Currently people are writing the client themselves and an upgraded version of swagger would make this a lot easier because of the use of NSwagStudio.

Is there any information about a possible upgrade to OpenAPI version 3?

---

<div class="post-metadata">

**Author:** ![gjoseph](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/gjoseph/32/1690_2.png) [@gjoseph](https://community.asterisk.org/u/gjoseph)\
**Post date:** [July 2, 2024, 2:08pm UTC](https://community.asterisk.org/t/newer-version-of-openapi/103162/2 "2024-07-02T14:08:47Z")

</div>

We don’t currently have plans to upgrade but we’re not all here this week because of the US holiday so let us discuss it next week when we’re all back.

---

<div class="post-metadata">

**Author:** ![DeveloperOrion](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/developerorion/32/8011_2.png) [@DeveloperOrion](https://community.asterisk.org/u/DeveloperOrion)\
**Post date:** [July 11, 2024, 1:38pm UTC](https://community.asterisk.org/t/newer-version-of-openapi/103162/3 "2024-07-11T13:38:00Z")

</div>

I had to create a volume in Docker and all I had to do was:

```auto
docker run --rm -v %CD%:/local swaggerapi/swagger-codegen-cli generate -i http://<ip>:8088/ari/api-docs/resources.json -l go -o /local/out/go

```

This creates a nice first draft of the OpenAPI v3.1 variant. Might help you guys too.

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [July 11, 2024, 1:58pm UTC](https://community.asterisk.org/t/newer-version-of-openapi/103162/4 "2024-07-11T13:58:07Z")

</div>

There’s more to it than that, and it is not a simple or small project. The documentation is used for code generation internally, as well we would need to have backwards compatibility. It also is used for the public documentation. It’s a huge undertaking that ripples out. There’s been two attempts to update in the past, both failed. Could we maintain the old and the new? Yes, but now we’re duplicating stuff as well and for what value. Someone brings this up maybe once every 2 years. In fact I’ve asked people in the past and still do occasionally about the importance or value of this, and the answer is always that people have no problem just doing the HTTP requests and other stuff themselves. I don’t see this being something we’d undertake anytime soon.

---

<div class="post-metadata">

**Author:** ![DeveloperOrion](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/developerorion/32/8011_2.png) [@DeveloperOrion](https://community.asterisk.org/u/DeveloperOrion)\
**Post date:** [July 11, 2024, 2:34pm UTC](https://community.asterisk.org/t/newer-version-of-openapi/103162/5 "2024-07-11T14:34:17Z")

</div>

Having to write proper code to implement only half of the API is such time consuming work. I think many man hours could be saved if a newer OpenAPI definition exists.

The generated JSON below still needs quite a bit of changes to be a quality OpenAPI definition. I am missing return types etc. Below is how far I got, but it’s not finished yet.

[openapi\_v3\_0\_1.txt](https://community.asterisk.org/uploads/short-url/twzUFvirYIuP8ZmliGONGkwRFFF.txt) (176.9 KB)

I do understand your point that others don’t mind.

(Change uploaded file)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [August 10, 2024, 2:47pm UTC](https://community.asterisk.org/t/newer-version-of-openapi/103162/7 "2024-08-10T14:47:15Z")

</div>

Closed on August 10, 2024, 2:47pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
