DGCP3
DGCP3
Explore posts from servers
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
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
TTCTheo's Typesafe Cult
Created by DGCP3 on 2/8/2024 in #questions
i need help on type
Yes you are right, but when I tried it it doesn't work
35 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 2/8/2024 in #questions
i need help on type
I didn't use it on the server side, i just passed data from the server side to the client(via prop) and then set the atom on the client side
35 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 2/8/2024 in #questions
i need help on type
and btw this shows error when i use writable atom, but works with normal atom
35 replies
TTCTheo's Typesafe Cult
Created by DGCP3 on 2/8/2024 in #questions
i need help on type
what do you think about this
35 replies