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

Add OpenID in security schemes #290

Closed
ben-ikt opened this issue Apr 24, 2023 · 1 comment
Closed

Add OpenID in security schemes #290

ben-ikt opened this issue Apr 24, 2023 · 1 comment

Comments

@ben-ikt
Copy link

ben-ikt commented Apr 24, 2023

Hi,

I cannot modify the security policy as it is hard-coded. I would like to add OpenID in security schemes

scheme: 'bearer',

@jlalmes
Copy link
Owner

jlalmes commented May 24, 2023

You can now set securitySchemes as an option on your generateOpenApiDocument function.

Try something like this! 👇

const openApiDocument = generateOpenApiDocument(appRouter, {
  title: 'tRPC OpenAPI',
  version: '1.0.0',
  baseUrl: 'http://localhost:3000/api',
  securitySchemes: {
    ApiKey: {
      type: 'apiKey',
      in: 'header',
      name: 'X-API-Key',
    },
  },
})

@jlalmes jlalmes closed this as completed May 24, 2023
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

No branches or pull requests

2 participants