From 954d9e07fb476a749b9e835f821ffe1ab76fc537 Mon Sep 17 00:00:00 2001 From: Stephen von Takach Date: Sun, 24 Nov 2024 20:06:39 +1100 Subject: [PATCH] update(params.md): add example header param --- docs/openapi/params.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/openapi/params.md b/docs/openapi/params.md index ff88a12..5d1386e 100644 --- a/docs/openapi/params.md +++ b/docs/openapi/params.md @@ -9,13 +9,21 @@ class Articles < AC::Base @[AC::Route::GET("/")] def all_articles( - @[AC::Param::Info(description: "Filter by tag:", example: "AngularJS", required: false)] tag : String?, - @[AC::Param::Info(description: "Filter by author:", example: "jake", require: false)] author : String?, - @[AC::Param::Info(description: "Favorited by user:", example: "jake", require: false)] favorited : String?, - @[AC::Param::Info(description: "Limit number of articles (default is 20):", example: "20", require: false)] limit : UInt32?, - @[AC::Param::Info(description: "Offset/skip number of articles (default is 0):", example: "0", require: false)] offset : UInt32?, + @[AC::Param::Info(description: "Filter by tag:", example: "AngularJS", required: false)] + tag : String?, + @[AC::Param::Info(description: "Filter by author:", example: "jake", require: false)] + author : String?, + @[AC::Param::Info(description: "Favorited by user:", example: "jake", require: false)] + favorited : String?, + @[AC::Param::Info(description: "Limit number of articles (default is 20):", example: "20", require: false)] + limit : UInt32?, + @[AC::Param::Info(description: "Offset/skip number of articles (default is 0):", example: "0", require: false)] + offset : UInt32?, + + @[AC::Param::Info(header: "X-Request-UUID", description: "UUID to use for this request", example: "ba714f86-cac6-42c7-8956-bcf5105e1b81")] + value : UUID? = nil, ) ``` -You can refer to [Parameter OpenAPI Specification](https://spec.openapis.org/oas/v3.1.0#parameter-object) \ No newline at end of file +You can refer to [Parameter OpenAPI Specification](https://spec.openapis.org/oas/v3.1.0#parameter-object)