Are there official Typescript type definitions for OpenAPI 3?
Asked Answered
A

3

9

I've found https://github.com/metadevpro/openapi3-ts/blob/master/src/model/OpenApi.ts which is a version of Typescript definitions for OpenAPI 3.x, but I'm failing to find an official (aka DefinitelyTyped) type definition file for OAS 3.

Is there one?

TIA

Acclivity answered 11/9, 2018 at 19:14 Comment(2)
This isn't official, but it looks like it has OpenAPI 2 and 3 definitions github.com/kogosoftwarellc/open-api/tree/master/packages/…Homeric
Thanks @Graham. I found that one after posting my question, but so far the node module for openapi3-ts is meeting my needs. About to do a more ambitious project with it right now, so I may be looking for something else shortly ;)Acclivity
H
7

There's a lib openapi-types, which is from openAPI, it official enough for me. lib https://www.npmjs.com/package/openapi-types

Handbook answered 22/10, 2020 at 2:13 Comment(0)
S
0

I'm afraid there is no official TS definition, only the documents describing the types.

OAI GitHub (all versions)

swagger.io (latest)


The one you mentioned openapi3-ts seems like the most complete and update typescript definition available

Sweatt answered 2/12, 2018 at 16:4 Comment(0)
G
0

Here's one more @fosfad/openapi-typescript-definitions. Decent I guess but not very comprehensive.

Guillen answered 4/8, 2023 at 10:49 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.