mdoTomofumi Chiba
5/14/2023, 5:02:48 AM

ts-rest の swagger-ui で Basic Authentication

const document = generateOpenApi(contract, {
  info: {
    title: "Posts API",
    version: "1.0.0",
  },
}, {
  setOperationId: true,
});
document.components = {
  securitySchemes: { basicAuth: { type: "http", scheme: "basic" } },
};
document.security = [{ "basicAuth": [] }];

NestJS の controller class に decorator 付けても反映されない。

TweetLike