Skip to content

Commit 03ad2f3

Browse files
committed
tweak api_spec
1 parent 3130e51 commit 03ad2f3

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

src/controllers/v3/openapi.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,6 +1900,34 @@ paths:
19001900
application/json:
19011901
schema:
19021902
$ref: '#/components/schemas/OrgAPISpecCreateInput'
1903+
get:
1904+
operationId: organization-get-api-specs
1905+
responses:
1906+
'200':
1907+
description: Ok
1908+
content:
1909+
application/json:
1910+
schema:
1911+
properties:
1912+
spec: {type: string}
1913+
prodEnvId: {type: string}
1914+
required:
1915+
- spec
1916+
- prodEnvId
1917+
type: object
1918+
tags:
1919+
- Organizations
1920+
security:
1921+
-
1922+
jwt:
1923+
- Namespace.Assign
1924+
parameters:
1925+
-
1926+
in: path
1927+
name: org
1928+
required: true
1929+
schema:
1930+
type: string
19031931
'/organizations/{org}/products':
19041932
get:
19051933
operationId: organization-products

src/controllers/v3/routes.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,6 +1639,36 @@ export function RegisterRoutes(app: express.Router) {
16391639
}
16401640
});
16411641
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
1642+
app.get('/ds/api/v3/organizations/:org/api_specs',
1643+
authenticateMiddleware([{"jwt":["Namespace.Assign"]}]),
1644+
1645+
async function OrgAPISpecController_get(request: any, response: any, next: any) {
1646+
const args = {
1647+
org: {"in":"path","name":"org","required":true,"dataType":"string"},
1648+
request: {"in":"request","name":"request","required":true,"dataType":"object"},
1649+
};
1650+
1651+
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
1652+
1653+
let validatedArgs: any[] = [];
1654+
try {
1655+
validatedArgs = getValidatedArgs(args, request, response);
1656+
1657+
const container: IocContainer = typeof iocContainer === 'function' ? (iocContainer as IocContainerFactory)(request) : iocContainer;
1658+
1659+
const controller: any = await container.get<OrgAPISpecController>(OrgAPISpecController);
1660+
if (typeof controller['setStatus'] === 'function') {
1661+
controller.setStatus(undefined);
1662+
}
1663+
1664+
1665+
const promise = controller.get.apply(controller, validatedArgs as any);
1666+
promiseHandler(controller, promise, response, undefined, next);
1667+
} catch (err) {
1668+
return next(err);
1669+
}
1670+
});
1671+
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
16421672
app.get('/ds/api/v3/organizations/:org/products',
16431673
authenticateMiddleware([{"jwt":["Dataset.Manage"]}]),
16441674

0 commit comments

Comments
 (0)