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

TS2305: Module "openapi3-ts" has no exported member SecurityRequirementObject #141

Open
gustawdaniel opened this issue Aug 17, 2024 · 1 comment

Comments

@gustawdaniel
Copy link

I trying

import {SecurityRequirementObject} from 'openapi3-ts'

but getting

TS2305: Module "openapi3-ts" has no exported member SecurityRequirementObject

I see this export here:

https://github.com/metadevpro/openapi3-ts/blob/master/src/model/openapi31.ts

currently i recreating this type locally

export type SecurityRequirementObject = {
  [key: string]: string[]
}
@urugator
Copy link
Contributor

urugator commented Aug 26, 2024

You have to specify oas version, either:

import { oas31 } from 'openapi3-ts';
oas31.SecurityRequirementObject 

or

import { SecurityRequirementObject  } from 'openapi3-ts/oas31';

see: https://github.com/metadevpro/openapi3-ts?tab=readme-ov-file#version-4

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