Skip to content

Commit

Permalink
[openapi3] Add missing peer dependency "openapi-types" (#5274)
Browse files Browse the repository at this point in the history
Fixes warnings (or potentially errors) when installing
`@typespec/openapi3`:

```
$ npx yarn add @typespec/openapi3@0.62.0

yarn add v1.22.22
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...

warning " > @typespec/openapi3@0.62.0" has unmet peer dependency "@typespec/compiler@~0.62.0".
warning " > @typespec/openapi3@0.62.0" has unmet peer dependency "@typespec/http@~0.62.0".
warning " > @typespec/openapi3@0.62.0" has unmet peer dependency "@typespec/versioning@~0.62.0".
warning " > @typespec/openapi3@0.62.0" has unmet peer dependency "@typespec/openapi@~0.62.0".

warning "@typespec/openapi3 > @readme/openapi-parser@2.6.0" has unmet peer dependency "openapi-types@>=7".
```

The first 4 warnings are expected, but the peer dependency on
`openapi-types` should either be satisfied by `@typespec/openapi3`
itself, or be declared as a peer dependency of `@typespec/openapi3`
itself.
  • Loading branch information
mikeharder authored Dec 5, 2024
1 parent f332203 commit dddf9c7
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 31 deletions.
7 changes: 7 additions & 0 deletions .chronus/changes/openapi3-peer-2024-11-5-18-44-45.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: fix
packages:
- "@typespec/openapi3"
---

Added missing peer dependency "openapi-types"
1 change: 1 addition & 0 deletions packages/openapi3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
],
"dependencies": {
"@readme/openapi-parser": "~2.6.0",
"openapi-types": "~12.1.3",
"yaml": "~2.5.1"
},
"peerDependencies": {
Expand Down
65 changes: 34 additions & 31 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dddf9c7

Please sign in to comment.