Skip to content

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

Description

@LeroyK

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.

Activity

  1. CumpsD commented on Jun 22, 2020

    @CumpsD
    Contributor

    This just bit me

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

  2. CumpsD commented on Jun 24, 2020

    @CumpsD
    Contributor

    Added a PR: #489

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

  3. CumpsD commented on Jun 24, 2020

    @CumpsD
    Contributor

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

  4. darrelmiller commented on Jun 24, 2020

    @darrelmiller
    Member

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

  5. CumpsD commented on Jun 24, 2020

    @CumpsD
    Contributor

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

    Yep :) Compiler magic...

  6. added a commit that references this issue on Jun 24, 2020
  7. hasancemcerit commented on Jun 24, 2020

    @hasancemcerit

    With 1.2.1, the previous OpenApiString error just got transformed into

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

  8. CumpsD commented on Jun 24, 2020

    @CumpsD
    Contributor

    Hasan (@hasancemcerit) PR ongoing to fix it: #492

  9. CumpsD commented on Jun 25, 2020

    @CumpsD
    Contributor

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

    Darrel (@darrelmiller) This can probably be closed now :)

  10. darrelmiller commented on Jul 2, 2020

    @darrelmiller
    Member

    David Cumps (@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions