DGCP3
DGCP3
Explore posts from servers
HHono
Created by DGCP3 on 9/26/2024 in #help
Adding swagger to hono API
it turns out you have to break it up and it works perfectly
const base = () => {
const router= new OpenAPIHono()
router.use(databaseMiddleware)
router.use(bucketMiddleware)
router.use(cacheMiddleware);
return router
};
const base = () => {
const router= new OpenAPIHono()
router.use(databaseMiddleware)
router.use(bucketMiddleware)
router.use(cacheMiddleware);
return router
};
4 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 9/26/2024 in #questions
How to add swagger to hono api
turns out you have to break it up and it works
const base = () => {
const router= new OpenAPIHono()
router.use(databaseMiddleware)
router.use(bucketMiddleware)
router.use(cacheMiddleware);
return router
};
const base = () => {
const router= new OpenAPIHono()
router.use(databaseMiddleware)
router.use(bucketMiddleware)
router.use(cacheMiddleware);
return router
};
20 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 9/26/2024 in #questions
How to add swagger to hono api
ya, I will just import functions on every route that uses them
20 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 9/26/2024 in #questions
How to add swagger to hono api
I'm using RPC, but I need to provide API documentation for the security team, and swagger was the default because the company I work for uses c# as primary language for the backend and they expect swagger
20 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 9/26/2024 in #questions
How to add swagger to hono api
is there any other alternative that is not Postman that hono has integration
20 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 9/26/2024 in #questions
How to add swagger to hono api
yes, it was a good solution.
20 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 9/26/2024 in #questions
How to add swagger to hono api
export const authRoute = publicHonoRoute()
.basePath("/auth")
// POST /auth/login
.post(
"/login",
validate("json", LoginSchema),
async (c) => {
const { userName, Password } = c.req.valid("json");
}
)
export const authRoute = publicHonoRoute()
.basePath("/auth")
// POST /auth/login
.post(
"/login",
validate("json", LoginSchema),
async (c) => {
const { userName, Password } = c.req.valid("json");
}
)
this is how I consume the factory method. so how can I add the swagger to the returned instance if the instance doesn't have .openapi on it? by the way, you actually suggested creating the factory methods a while ago
20 replies
TTCTheo's Typesafe Cult
Created by Børge on 9/5/2024 in #questions
Does anyone have an example repo?
3 replies
PPrisma
Created by DGCP3 on 7/26/2024 in #help-and-questions
Prisma optimize showing error page
thank you all.
14 replies
PPrisma
Created by DGCP3 on 7/26/2024 in #help-and-questions
Prisma optimize showing error page
its dgcp3
14 replies
PPrisma
Created by DGCP3 on 7/26/2024 in #help-and-questions
Prisma optimize showing error page
No description
14 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 7/24/2024 in #questions
how to make c.get("jwtPayload") type safe in hono
one more thing i could add protection middleware and call it protectedHono right
20 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 7/24/2024 in #questions
how to make c.get("jwtPayload") type safe in hono
ok, perfect. thank you.
20 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 7/24/2024 in #questions
how to make c.get("jwtPayload") type safe in hono
i have multiple instance of hono that get combined at index , so do i have to pass Variable to every hono instance
20 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 7/24/2024 in #questions
how to make c.get("jwtPayload") type safe in hono
I'm using jwt with Refresh token tho
20 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 2/8/2024 in #questions
i need help on type
thank you for your help mate
35 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 2/8/2024 in #questions
i need help on type
And using useEffect ain't possible, tried it it keeps failing, and without it it works fine🤞
35 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 2/8/2024 in #questions
i need help on type
Maybe I should just use context with useReducer
35 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 2/8/2024 in #questions
i need help on type
Isn't this only supported only for next 12 and before that, next 13 broke it I think
35 replies