Skip to content

Commit 23a9ae4

Browse files
committed
Revert "Changed routePlugin for new structure and updated docs"
This reverts commit 8b614b0.
1 parent 15c0ad9 commit 23a9ae4

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ var server = extendApp(
3535
var BUILD_OPENAPI_TO_JSON = false as boolean;
3636

3737
if (BUILD_OPENAPI_TO_JSON === true)
38-
server.openapi.build(
38+
server.buildOpenApi(
3939
/*path*/ "openapi.json",
4040
/*exit from node.js (better for performance, if app will be compiled afterwards without these schemas)*/ true
4141
);
42-
await server.openapi.serve(
42+
await server.serveOpenApi(
4343
/*url (but it is fully working ONLY by http://localhost:port/docs/ with last slash, sorry)*/ "/docs",
4444
{
4545
// whether to use buildOpenApi before starting server. Mostly useless. But if development - ok

index.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function routePlugin(route, server) {
9797
throw new Error("these methods can't be documented with openapi");
9898
var methodOpenapi = route.openapi || {};
9999
delete route.openapi;
100-
server.openapi.builder.addPath(toOpenapiPath(route.path), {
100+
server.openApiBuilder.addPath(toOpenapiPath(route.path), {
101101
[route.method]: methodOpenapi,
102102
});
103103
}

index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function routePlugin(route, server) {
9797
throw new Error("these methods can't be documented with openapi");
9898
var methodOpenapi = route.openapi || {};
9999
delete route.openapi;
100-
server.openapi.builder.addPath(toOpenapiPath(route.path), {
100+
server.openApiBuilder.addPath(toOpenapiPath(route.path), {
101101
[route.method]: methodOpenapi,
102102
});
103103
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ublitzjs/openapi",
3-
"version": "1.0.0",
3+
"version": "0.0.3",
44
"dependencies": {
55
"openapi3-ts": "^4.4.0",
66
"@ublitzjs/core": "~0.0.1",

0 commit comments

Comments
 (0)