Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Nuxt 3 Adapter #292

Merged
merged 7 commits into from
May 24, 2023
Merged

Feat: Nuxt 3 Adapter #292

merged 7 commits into from
May 24, 2023

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
Owner

@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 jlalmes:master May 24, 2023
@jlalmes
Copy link
Owner

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants