You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Builder from "openapi3-ts" npm package. You can use it to dynamically insert paths, components, etc.
102
-
* */
103
-
builder: OpenApiBuilder;
104
-
/**
105
-
* @param prefix prefix for openapi UI to be served at.
106
-
* @param opts : build (if to save open api to some file and serve it after this), path (to an openapi json file), clearMimes (same as in 'static' package "clearMimesList"), uiPath - path to folder with ui (defaults to node_modules/@ublitzjs/openapi/ui)
107
-
*/
108
-
serve(
109
-
/**
110
-
* url on which openapi will be served. openapi.json is served on http://hostname:port/PREFIX/openapi.json. Main page - http://hostname:port/PREFIX/ AND It ENDS with slash (uWS's quirk, not mine) OR http://hostname:port/PREFIX/index.html
111
-
* */
112
-
prefix: string,
113
-
opts?: {
114
-
build?: boolean;
115
-
path?: string;
116
-
clearMimes?: boolean;
117
-
uiPath?: string;
118
-
}
119
-
): Promise<void>;
120
-
/**
121
-
* build openapi.json file in specified filePath AND if needed - exit afterwards.
* @param prefix url on which openapi will be served. You should note that an access to html page is kinda tricky: if prefix = "/docs", then you can't access http://localhost:port/docs BUT can access http://localhost:port/docs/ with the last slash. Or, if you want, just use http://localhost:port/docs/index.html - definitely works. Such a peculiarity of uWS wildcards.
102
+
* @param opts use if don't need to dynamically take openapi from code. Properties: build (whether to build an openapi and to serve after this), path (to an openapi json file), clearMimes (same as in 'static' package "clearMimesList"), uiPath - path to folder with ui (defaults to node_modules/@ublitzjs/openapi/ui)
0 commit comments