[PR #10946] [CLOSED] Add swaggo annotations #75694

Closed
opened 2026-05-05 08:06:52 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/10946
Author: @lukebtaylor
Created: 6/2/2025
Status: Closed

Base: mainHead: add-swaggo-annotations


📝 Commits (4)

  • bf276b0 add annotations
  • d490f05 add docs and script
  • 0f612f6 fix local docker run help
  • 5b7c477 update time.Duration to refer to integer primitive

📊 Changes

6 files changed (+560 additions, -121 deletions)

View changed files

📝 api/types.go (+161 -115)
docs/openapispec.md (+123 -0)
📝 llm/server.go (+2 -2)
scripts/generate-openapi.sh (+65 -0)
📝 server/create.go (+11 -0)
📝 server/routes.go (+198 -4)

📄 Description

Closes #3383

This PR implements the OpenAPI specification support requested in #3383, providing:

  • Comprehensive Swagger annotations for all API endpoints
  • OpenAPI spec generation using swaggo/swag
  • Documentation for developers and security testing tools

Note to Maintainers

I realize I should have opened an issue first to discuss this non-trivial change as outlined in the contributing guidelines. However, I discovered that issue #3383 already exists and perfectly describes what this PR implements.

I'm happy to make any adjustments based on feedback, and I appreciate the thorough contribution guidelines that help maintain code quality.

Thank you for maintaining such a valuable project! 🙏


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/10946 **Author:** [@lukebtaylor](https://github.com/lukebtaylor) **Created:** 6/2/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `add-swaggo-annotations` --- ### 📝 Commits (4) - [`bf276b0`](https://github.com/ollama/ollama/commit/bf276b000755d5595832702eaa22ac579e7f9a57) add annotations - [`d490f05`](https://github.com/ollama/ollama/commit/d490f05987b35cb5e8c05808483e5c36678fbf26) add docs and script - [`0f612f6`](https://github.com/ollama/ollama/commit/0f612f648e40767b1f70044ac9032593ae7a17bf) fix local docker run help - [`5b7c477`](https://github.com/ollama/ollama/commit/5b7c4778aba67e679455e10d65c199974c48498a) update time.Duration to refer to integer primitive ### 📊 Changes **6 files changed** (+560 additions, -121 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+161 -115) ➕ `docs/openapispec.md` (+123 -0) 📝 `llm/server.go` (+2 -2) ➕ `scripts/generate-openapi.sh` (+65 -0) 📝 `server/create.go` (+11 -0) 📝 `server/routes.go` (+198 -4) </details> ### 📄 Description Closes #3383 This PR implements the OpenAPI specification support requested in #3383, providing: - Comprehensive Swagger annotations for all API endpoints - OpenAPI spec generation using swaggo/swag - Documentation for developers and security testing tools --- ## Note to Maintainers I realize I should have opened an issue first to discuss this non-trivial change as outlined in the contributing guidelines. However, I discovered that issue #3383 already exists and perfectly describes what this PR implements. I'm happy to make any adjustments based on feedback, and I appreciate the thorough contribution guidelines that help maintain code quality. Thank you for maintaining such a valuable project! 🙏 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 08:06:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#75694