Skip to content

Commit

Permalink
update(params.md): add example header param
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach authored Nov 24, 2024
1 parent 3f55a9c commit 954d9e0
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions docs/openapi/params.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
You can refer to [Parameter OpenAPI Specification](https://spec.openapis.org/oas/v3.1.0#parameter-object)

0 comments on commit 954d9e0

Please sign in to comment.