Skip to content

oas version incompatibility #1123

@mdesousa

Description

@mdesousa

hi, we are getting the error below after generating the api:

.api/apis/sivocom/index.ts:13:29 - error TS2345: Argument of type 'import("/[redacted]/.api/apis/sivocom/node_modules/oas/dist/index")' is not assignable to parameter of type 'import("/[redacted]/.api/apis/sivocom/node_modules/api/node_modules/oas/dist/index").default'.
  Property 'promises' is protected but type 'Oas' is not a class derived from 'Oas'.

13     this.core = new APICore(this.spec, 'sivocom/1.0 (api/6.1.3)');

it seems to be related to incompatible versions of oas in package.json. the main package.json that is generated has this:

  "dependencies": {
    "api": "^6.1.3",
    "json-schema-to-ts": "^2.8.0-beta.0",
    "oas": "^32.0.0"
  }

while the package.json for @readme/oas-to-har has the following:

  "dependencies": {
    "@readme/data-urls": "^1.0.1",
    "@readme/oas-extensions": "^17.0.1",
    "oas": "^20.5.0",
    "qs": "^6.10.5",
    "remove-undefined-objects": "^2.0.2"
  },

is it possible to configure the dependencies so they resolve oas to the same version? thanks.

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