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

update with v2.2.0 breaks semver rules #30

Open
marc22alain opened this issue Dec 8, 2020 · 4 comments
Open

update with v2.2.0 breaks semver rules #30

marc22alain opened this issue Dec 8, 2020 · 4 comments

Comments

@marc22alain
Copy link

Removal of the addValidator function is a major, non-backwards-compatible, change to the API.
According to the rules of semantic versioning, this kind of change requires a major version update.

So I discovered this a few days ago when I attempted to auto-generate a NodeJS server from a swagger definition.
This is what I found:

/Users/marc.deniverville/Downloads/nodejs-server-server-generated/index.js:15
expressAppConfig.addValidator();
                 ^

TypeError: expressAppConfig.addValidator is not a function
    at Object.<anonymous> (/Users/marc.deniverville/Downloads/nodejs-server-server-generated/index.js:15:18)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

The auto-generated package.json file makes this reference to oas3-tools: "oas3-tools": "^2.0.2", accepting patch and minor point upgrades.

@gaboAcosta
Copy link

Agreed, please remove version 2.2.0 and bump to 3.0.1 so that you don't break clients allowing minor version updates, thanks!

@gaboAcosta
Copy link

We were using 2.0.2, tried 2.1.3 and is broken too, it looks like there have been some backwards compatibility issues on the releases, I will try to figure out the right version where it broke but on the meantime, we are freezing any updates from 2.0.2

@marcelofabricanti
Copy link

I agree with you, its a breaking change.... here

To update just remove addValidator line (It's added by default now) and change the options on expressAppConfig to as in the example file (routing.controllers).

@fwermus
Copy link

fwermus commented Sep 5, 2023

Any solution to 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