question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

openapi-types versioning

See original GitHub issue

hi. I’m using this package as well as openapi-types in my typescript project. in order for the typechecking of the exported types of openapi-types to work correctly, both my project and swagger-parser need to be referencing the same types. if i install the exact same version of openapi-types as the one consumed by swagger-parser, npm will dedupe the duplicated directories and everything is fine. if i use a different version of openapi-types then typechecking won’t work correctly.

so there’s 2 things here:

  1. should openapi-types be a peerDependency instead of a direct dependency? at least this will force the consumer to install the matching version of openapi-types in their project.
  2. if no to point 1, can you upgrade openapi-types to a more recent version? (currently on 7.0.1)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JamesMessingercommented, Sep 7, 2020

This change has been made and published as v10.0.2

1reaction
nickzeleicommented, Aug 30, 2020

My suggestion would be to move openapi-types to being a peer dependency. This forces the consumer to install the correct version, and allows them to freely upgrade the types package to satisfy the semver range that swagger-parser has selected as its compatible range.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenAPI Specification - Version 3.0.3 - Swagger
The OpenAPI Specification is versioned using Semantic Versioning 2.0.0 (semver) and follows the semver specification. The major . minor portion of the semver...
Read more >
What's the Difference Between OpenAPI Types 2.0, 3.0, and ...
A deep look into different OpenAPI versions starting from 2.0 to the latest release candidate.
Read more >
openapi-types - npm
Types for OpenAPI documents.. Latest version: 12.1.0, last published: 18 days ago. Start using openapi-types in your project by running `npm ...
Read more >
Versioning an API | Cloud Endpoints with OpenAPI
When deploying two versions of the API with two yaml config files, only one of them can have x-google-endpoints , but its config...
Read more >
Workflow & schema customization - drf-spectacular
@extend_schema_field(OpenApiTypes.BYTE) # also takes basic python types class CustomField(serializers.Field): def to_representation(self, value): return ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found