[GH-ISSUE #716] Swagger / OpenAPI documentation / playground #46840

Closed
opened 2026-04-28 00:46:18 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @netandreus on GitHub (Oct 6, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/716

Do you plan to generate API documentation with github.com/swaggo/swag?
It will be very usefull.

Originally created by @netandreus on GitHub (Oct 6, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/716 Do you plan to generate API documentation with ```github.com/swaggo/swag```? It will be very usefull.
Author
Owner

@technovangelist commented on GitHub (Dec 4, 2023):

Take a look at this from postman that I think addresses your issue - https://www.postman.com/postman-student-programs/workspace/ollama-api/collection/21521806-f48dc31a-a9f1-4dad-9082-fd07f5cd2fda. I will go ahead and close it now. If you think there is anything we left out, reopen and we can address. Thanks for being part of this great community.

<!-- gh-comment-id:1839345043 --> @technovangelist commented on GitHub (Dec 4, 2023): Take a look at this from postman that I think addresses your issue - https://www.postman.com/postman-student-programs/workspace/ollama-api/collection/21521806-f48dc31a-a9f1-4dad-9082-fd07f5cd2fda. I will go ahead and close it now. If you think there is anything we left out, reopen and we can address. Thanks for being part of this great community.
Author
Owner

@tvanier commented on GitHub (Jan 8, 2024):

For those reading this, there is a (curated?) OpenAPI spec available here (thanks @walsha2, @mthongvanh and @davidmigloz)
https://github.com/davidmigloz/langchain_dart/blob/main/packages/ollama_dart/oas/ollama-curated.yaml

@technovangelist It would be great to keep an "official" API spec in the ollama repo?

<!-- gh-comment-id:1881509946 --> @tvanier commented on GitHub (Jan 8, 2024): For those reading this, there is a (curated?) OpenAPI spec available here (thanks @walsha2, @mthongvanh and @davidmigloz) https://github.com/davidmigloz/langchain_dart/blob/main/packages/ollama_dart/oas/ollama-curated.yaml @technovangelist It would be great to keep an "official" API spec in the ollama repo?
Author
Owner

@bidek commented on GitHub (Jan 22, 2024):

@tvanier, thanks for the link.

@technovangelist, I checked this PR: https://github.com/jmorganca/ollama/pull/714 and read through the issues. I'd like to add my two cents.

From my perspective, it would be best if Ollama itself could provide an endpoint with OpenAPI definition. This way, it will always be in sync with the code base, and generating client code would be easier.

I'm a developer with a Java background, and in our world, it's the de facto standard for services to provide API spec definitions. To be fair, in Java, we use reflection APIs to generate this spec for us. But maybe there is a similar solution in the GIN framework.

In conclusion, my main concern is making client code generation easier and staying in sync with the newest changes in the API.

<!-- gh-comment-id:1904415711 --> @bidek commented on GitHub (Jan 22, 2024): @tvanier, thanks for the link. @technovangelist, I checked this PR: https://github.com/jmorganca/ollama/pull/714 and read through the issues. I'd like to add my two cents. From my perspective, it would be best if Ollama itself could provide an endpoint with OpenAPI definition. This way, it will always be in sync with the code base, and generating client code would be easier. I'm a developer with a Java background, and in our world, it's the de facto standard for services to provide API spec definitions. To be fair, in Java, we use reflection APIs to generate this spec for us. But maybe there is a similar solution in the GIN framework. In conclusion, my main concern is making client code generation easier and staying in sync with the newest changes in the API.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#46840