Skip to content

Commit e704bc5

Browse files
author
Deepak Prabhakara
authored
added generated swagger file (#1407)
* added generated swagger file * trying to change the name * added tags * fixed tags * prettier fix
1 parent 457c7d5 commit e704bc5

File tree

8 files changed

+2536
-4
lines changed

8 files changed

+2536
-4
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
*.hbs
33
src/_processor/services/templates/**
44
postman/Retraced.postman_collection.json
5+
swagger.json

deploy/Dockerfile-slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG NODEJS_IMAGE=node:20.13.0-alpine3.19
1+
ARG NODEJS_IMAGE=node:20.13.1-alpine3.19
22
ARG ALPINE_IMAGE=alpine:3.19
33

44
# # #

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"typescript": "5.4.5"
8484
},
8585
"scripts": {
86-
"swagger": "tsoa spec",
86+
"swagger": "tsoa spec && cp build/swagger.json .",
8787
"routes": "tsoa routes",
8888
"prebuild": "rimraf build",
8989
"build": "npm run swagger && npm run routes && tsc && cp build/src/retracedctl.js build/src/retracedctl && chmod +x build/src/retracedctl",

src/controllers/AdminController.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
Controller,
1212
Put,
1313
Request,
14+
Tags,
1415
} from "tsoa";
1516
import express from "express";
1617

@@ -42,6 +43,7 @@ import { checkAdminAccessUnwrapped } from "../security/helpers";
4243
import uniqueId from "../models/uniqueId";
4344

4445
@Route("admin/v1")
46+
@Tags("Admin API")
4547
export class AdminAPI extends Controller {
4648
private readonly adminTokenStore: AdminTokenStore;
4749

src/controllers/EnterpriseController.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Body, Controller, Request, Example, Header, Post, Route, SuccessResponse } from "tsoa";
1+
import { Body, Controller, Request, Example, Header, Post, Route, SuccessResponse, Tags } from "tsoa";
22
import { Request as Req } from "express";
33

44
import {
@@ -56,6 +56,7 @@ import enterpriseSearchAdHoc from "../handlers/enterprise/searchAdHoc";
5656
*/
5757

5858
@Route("enterprise/v1")
59+
@Tags("Enterprise API")
5960
export class EnterpriseAPI extends Controller {
6061
/**
6162
* Query events with GraphQL

src/controllers/PublisherController.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
SuccessResponse,
1212
Controller,
1313
Example,
14+
Tags,
1415
} from "tsoa";
1516
import {
1617
defaultEventCreater,
@@ -34,6 +35,7 @@ import { graphQL } from "../handlers/graphql";
3435
import { GraphQLRequest, GraphQLResp } from "../handlers/graphql/index";
3536

3637
@Route("publisher/v1")
38+
@Tags("Publisher API")
3739
export class PublisherAPI extends Controller {
3840
private readonly eventCreater: EventCreater;
3941

0 commit comments

Comments
 (0)