openapi-types versioning
See original GitHub issuehi. 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:
- should
openapi-types
be apeerDependency
instead of a directdependency
? at least this will force the consumer to install the matching version ofopenapi-types
in their project. - if no to point 1, can you upgrade
openapi-types
to a more recent version? (currently on 7.0.1)
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This change has been made and published as v10.0.2
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 thatswagger-parser
has selected as its compatible range.