-
Notifications
You must be signed in to change notification settings - Fork 34
V1 Documenting Routes (Basics)
Lukas Ruegner edited this page May 29, 2023
·
1 revision
Adding basic information about a route. See the official OpenAPI Specification (here or here) for more information.
get("hello", {
tags = listOf("example")
operationId = "hello"
deprecated = false
hidden = false
summary = "A short summary of what the operation does"
description = "A verbose explanation of the operations' behavior"
deprecated = false
securitySchemeName = "MyBasicAuth"
securitySchemeName = setOf("MyBasicAuth", "MyTokenAuth")
request {
//...
}
response {
//...
}
}) {
// handle request...
}
-
tags
- A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. These tags will be added to the tags generated byautomaticTagGenerator
specified in the plugin configuration. -
operationId
- Unique (case-sensitive) string used to identify the operation. The id must be unique among all operations described in the API. -
deprecated
- whether this route is deprecated (default is false) -
hidden
- whether to include this route in the openapi-spec (default is false) -
securitySchemeName
- the name of a security mechanism specified in the plugin configuration. If not specified (and none specified withsecuritySchemeNames
), the default name also specified in the plugin configuration will be used. This field only has an effect for protected routes. -
securitySchemeNames
- the names of the possible security mechanisms specified in the plugin configuration. If not specified (and none specified withsecuritySchemeName
), the default name also specified in the plugin configuration will be used. This field only has an effect for protected routes. -
request
- arbitrary grouping for all information about the incoming request. See Request Parameters and Request and Response Bodies for more information. -
response
- arbitrary grouping for all information about the outgoing responses. See Responses for more information.
- Getting Started
- Configuration
- Documenting Routes
- Multiple Api-Specs
- Examples
- Changelog
Documentation for previous versions: