Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Conversation

Bahnasawy
Copy link
Contributor

No description provided.

@mihai1voicescu
Copy link

Any ETA on this? Maybe it would help to add some Reviewers.

@Bahnasawy
Copy link
Contributor Author

I may be a little new at this, but I can't seem to add @jlalmes as a reviewer, am I missing something?

@jlalmes jlalmes mentioned this pull request May 24, 2023
@jlalmes jlalmes self-requested a review May 24, 2023 04:48
jlalmes
jlalmes previously approved these changes May 24, 2023
Copy link
Contributor

@jlalmes jlalmes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - thanks for the PR @Bahnasawy

@jlalmes jlalmes self-requested a review May 24, 2023 06:04
@jlalmes jlalmes merged commit 018fbb4 into trpc:master May 24, 2023
@jlalmes
Copy link
Contributor

jlalmes commented May 24, 2023

Available in [email protected]

@Bahnasawy
Copy link
Contributor Author

Glad it's finally merged!! Awesome work on this library so far 👏👏

@u007
Copy link

u007 commented Aug 20, 2023

didnt work for me,
my code:

export const loginByApiToken = publicProcedure.meta({ openapi: { method: 'POST', path: '/auth/token' } })
  .input(z.object({
    token: z.string().min(1),
  })).mutation(
    async ({ input: { token }, ctx }) => {
      const config = useRuntimeConfig()

i tried calling POST /api/auth/token and /auth/token, getting 404
could it be that ive actual /api/auth on server api end?

@u007
Copy link

u007 commented Aug 20, 2023

okay i followed the example for nuxt and it works, but ive to set a different context for openapi as nuxt h3 api uses:

export async function createContext ({ node: { req, res } }: H3Event) {
  const requestId = uuid()

vs openapi

export const createOpenAPIContext = async ({
  req,
  res,
}: {
  req: IncomingMessage;
  res: ServerResponse<IncomingMessage>;
}) => {

also now trpc seems to require output declaration for zod validation, is this an openapi thing?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants