Classes
The following classes are available globally.
-
KituraOpenAPI contains helper functions for the addition of endpoints to a Kitura
Router
for serving:- an OpenAPI definition of its routes and their associated data types,
- the SwaggerUI tool, that allows exploration and testing of the API via a web browser.
Usage Example:
import Kitura import KituraOpenAPI let router = Router() KituraOpenAPI.addEndpoints(to: router) // Register default endpoints
The endpoints have default values defined by the
defaultConfig
property. You can customize the endpoints by supplying aKituraOpenAPIConfig
:
See morelet config = KituraOpenAPIConfig(apiPath: "/swagger", swaggerUIPath: "/swagger/ui") KituraOpenAPI.addEndpoints(to: router, with: config)
Declaration
Swift
public class KituraOpenAPI