Skip to main content

openapi_spec_with_get

Function openapi_spec_with_get 

Source
pub fn openapi_spec_with_get(path: &str, status: u16) -> Value
Expand description

Create an OpenAPI spec with a single GET endpoint that returns JSON.

§Arguments

  • path — The API path (e.g., "/users")
  • status — The HTTP status code for the response (e.g., 200)