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

Remove usages of "@loopback/openapi-v3-types" and deprecate the package #3220

Merged
merged 6 commits into from
Jun 25, 2019

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented Jun 24, 2019

Remove remaining usage of @loopback/openapi-v3-types and deprecate the package.

See #301

try to upstream createEmptyApiSpec, e.g. to src/dsl/OpenApiBuilder.ts

I decided against upstreaming this helper. The builder in openapi3-ts is adding more empty objects to the spec, I am concerned that by reworking createEmptyApiSpec to leverate their builder, we could break existing tests depending on less fields being set in an empty spec.

See https://github.com/metadevpro/openapi3-ts/blob/e55fef88e6b9188678528bdf33fee0072033a720/src/dsl/OpenApiBuilder.ts#L14-L35

then move the rest to our openapi-v3 package (createEmptyApiSpec should go to openapi--spec-builder package)

I decided to move createEmptyApiSpec to openapi-v3 to preserve backwards compatibility for users of our openapi-v3 and rest packages.

Checklist

👉 Read and sign the CLA (Contributor License Agreement) 👈

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

bajtos added 6 commits June 25, 2019 08:28
Move the definition of the type alias `OpenApiSpec` to a new file
`types.ts`.

Rework all imports from `@loopback/openapi-v3-types` to import from
`types.ts` instead, remove the openapi-v3-types package from the
dependencies too.

Add the helper `createEmptyApiSpec()` to preserve backwards
compatibility for code importing the helper from this package or its
dependants like `@loopback/rest`.

Signed-off-by: Miroslav Bajtoš <[email protected]>
Rework all imports from `@loopback/openapi-v3-types` to import from
`types.ts` instead, remove the openapi-v3-types package from the
dependencies too.

Signed-off-by: Miroslav Bajtoš <[email protected]>
Rework all imports from `@loopback/openapi-v3-types` to import from
`@loopback/openapi-v3` instead, remove the openapi-v3-types package
from the dependencies too.

Signed-off-by: Miroslav Bajtoš <[email protected]>
@bajtos bajtos force-pushed the abandon-openapi-spec-wrapper-packages branch from 52b06c9 to 2c5b83f Compare June 25, 2019 06:29
@bajtos bajtos merged commit 41e7a75 into master Jun 25, 2019
@delete-merged-branch delete-merged-branch bot deleted the abandon-openapi-spec-wrapper-packages branch June 25, 2019 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants