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

OpenAPI.NET 1.2.0 is not backwards compatible with 1.1.x #487

Closed
LeroyK opened this issue Jun 16, 2020 · 9 comments
Closed

OpenAPI.NET 1.2.0 is not backwards compatible with 1.1.x #487

LeroyK opened this issue Jun 16, 2020 · 9 comments

Comments

@LeroyK
Copy link

LeroyK commented Jun 16, 2020

Version 1.2.0 is not backwards compatible with 1.1.x. For example, the constructor of OpenApiString has changed from:

public OpenApiString(string value);

to

public OpenApiString(string value, bool isExplicit = false);

If another project references the old version, it cannot find the constructor since its signature has changed. It would have been better to add a new constructor or increase the major version number of the package (if you adhere to semantic versioning). At the very least, breaking api changes should be documented in the release notes.

@CumpsD
Copy link
Contributor

CumpsD commented Jun 22, 2020

This just bit me

System.MissingMethodException: Method not found: 'Void Microsoft.OpenApi.Any.OpenApiString..ctor(System.String)'.

@CumpsD
Copy link
Contributor

CumpsD commented Jun 24, 2020

Added a PR: #489

Would be nice to merge it, bump your version and unlist 1.2.0

@CumpsD
Copy link
Contributor

CumpsD commented Jun 24, 2020

@darrelmiller any chance for your input on this one please?

@darrelmiller
Copy link
Member

Ugh. Apparently optional parameters have source backward compatibility but not binary backward compatibility.

@CumpsD
Copy link
Contributor

CumpsD commented Jun 24, 2020

Ugh. Apparently optional parameters have source backward compatibility but not binary backward compatibility.

Yep :) Compiler magic...

darrelmiller added a commit that referenced this issue Jun 24, 2020
Prevent breaking change on optional parameter #487
@hasancemcerit
Copy link

With 1.2.1, the previous OpenApiString error just got transformed into

Method not found: 'Void Microsoft.OpenApi.Writers.OpenApiJsonWriter..ctor(System.IO.TextWriter)'.
🤔

@CumpsD
Copy link
Contributor

CumpsD commented Jun 24, 2020

@hasancemcerit PR ongoing to fix it: #492

@CumpsD
Copy link
Contributor

CumpsD commented Jun 25, 2020

It's fixed. 1.2.2 has no breaking changes, and the others got delisted.

@darrelmiller This can probably be closed now :)

@darrelmiller
Copy link
Member

@CumpsD Thank you for your help with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants