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鈥檒l 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

Projects
None yet
3 participants
@bajtos
Copy link
Member

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 bajtos requested review from raymondfeng, jannyHou and strongloop/loopback-maintainers Jun 24, 2019

@bajtos bajtos requested a review from hacksparrow as a code owner Jun 24, 2019

@bajtos bajtos self-assigned this Jun 24, 2019

@bajtos bajtos referenced this pull request Jun 24, 2019

Closed

Drop our openapi-spec packages, use openapi3-ts instead #301

3 of 3 tasks complete

bajtos added some commits Jun 24, 2019

chore: remove unused dependency entries on openapi-v3-types
Signed-off-by: Miroslav Bajto拧 <mbajtoss@gmail.com>
feat(openapi-v3-types): deprecate this package
Signed-off-by: Miroslav Bajto拧 <mbajtoss@gmail.com>
feat(openapi-v3): remove dependency on openapi-v3-types
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拧 <mbajtoss@gmail.com>
refactor(openapi-spec-builder): remove dependency on openapi-v3-types
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拧 <mbajtoss@gmail.com>
refactor(rest): remove dependency on openapi-v3-types
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拧 <mbajtoss@gmail.com>
docs: remove references to "@loopback/openapi-v3-types" package
Signed-off-by: Miroslav Bajto拧 <mbajtoss@gmail.com>

@bajtos bajtos force-pushed the abandon-openapi-spec-wrapper-packages branch from 52b06c9 to 2c5b83f Jun 25, 2019

@bajtos bajtos merged commit 41e7a75 into master Jun 25, 2019

4 checks passed

clahub All contributors have signed the Contributor License Agreement.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.0007%) to 91.804%
Details

@delete-merged-branch delete-merged-branch bot deleted the abandon-openapi-spec-wrapper-packages branch Jun 25, 2019

@bajtos bajtos referenced this pull request Jul 18, 2019

Merged

feat: remove openapi-v3-types package #3385

3 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.