Closed
Description
https://github.com/metadevpro/openapi3-ts looks more feature complete than our own openapi packages. Should we use openapi3-ts instead?
If we want to support both Swagger v2 and OpenAPI v3 then we probably cannot drop our packages, unless there is a replacement available.
UPDATE:
Looks like we have already dropped most of our custom type definitions. As of today (0411811aa), openapi-v3-spec-types provides only few helpers:
OpenApiSpec
as an alias forOpenAPIObject
createEmptyApiSpec()
isSchemaObject()
andisReferenceObject()
(type guards)
Acceptance criteria
- contribute type guards to
openapi3-ts
- see Add type guards for SchemaObject and ReferenceObject metadevpro/openapi3-ts#46 and Refactor openapi guards to use the upstream version #2974 try to upstreamcreateEmptyApiSpec
, e.g. to src/dsl/OpenApiBuilder.ts- move the rest to our
openapi-v3
package(- see Remove usages of "@loopback/openapi-v3-types" and deprecate the package #3220createEmptyApiSpec
should go toopenapi--spec-builder
package) - and finally remove
openapi-v3-types
- see feat: remove openapi-v3-types package #3385