justinmclean opened a new pull request, #4212:
URL: https://github.com/apache/iggy/pull/4212

   ## Which issue does this PR address?
   
   N/A
   
   ## Rationale
   
   The HTTP API currently has no complete description anywhere. The docs don't 
list its endpoints, even though the FAQ calls HTTP the most accessible 
transport. The only other sources are the server.http examples, which have a 
mistake, and the Web UI's hand-written types, which are out of date. So anyone 
calling the API with curl, from a language without an SDK, or through an AI 
tool has nothing reliable to work from. The document fixes that, and its test 
stops the list of routes from drifting again. It's useful rather than urgent: 
most SDK users go through the binary TCP protocol and never touch HTTP.
   
   ## What changed?
   
   Adds an OpenAPI 3.1 document for the server's HTTP API in 
core/server/openapi.json, covering all 46 operations with their parameters, 
request and response bodies, authentication, status codes and the Iggy-View and 
Iggy-Durability headers. The document was written from the handler code. A new 
test, core/server/tests/openapi_routes.rs, parses the route table in 
src/http.rs and fails if a route is missing from the document, the document has 
an operation with no route, or an operationId does not match its handler. It 
does not check request or response fields, so a renamed field can still drift; 
generating the document from annotations would close that gap later.
   
   
   ## Local Execution
   
   - Passed
   
   ## AI Usage
   
   AI used to generate, reviewed and tested by a human.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to