Coder Social home page Coder Social logo

Comments (19)

derBinder avatar derBinder commented on June 9, 2024 16

It doesn't fix the issue.

from openapi-typescript-codegen.

WillGarman avatar WillGarman commented on June 9, 2024 8

I was on 0.27.0 when I was getting this error. Downgraded to 0.25.0, worked perfect

from openapi-typescript-codegen.

bdbvb avatar bdbvb commented on June 9, 2024 5

I should also note that, even if I pass an absolute path to --input, it still tries to append that to node_modules\@apidevtools\json-schema-ref-parser\dist.

The only workaround I can come up with is to use ../../../.. instead of . in front of my relative input path.

Curious how other people are getting this to work without the above hack, as otherwise the library appears to be unusable when using an input file. (Of course, downgrading is also an option, but not a nice one.)

from openapi-typescript-codegen.

ferdikoomen avatar ferdikoomen commented on June 9, 2024 4

Created a new release (0.27.0) https://github.com/ferdikoomen/openapi-typescript-codegen/releases/tag/v.027.0 please check if that resolves the issue

from openapi-typescript-codegen.

Spajker7 avatar Spajker7 commented on June 9, 2024 1

I am also experiencing this issue

from openapi-typescript-codegen.

Delevin888 avatar Delevin888 commented on June 9, 2024 1

same issue.

from openapi-typescript-codegen.

kumv-net avatar kumv-net commented on June 9, 2024 1

json-schema-ref-parser
i use [email protected] [email protected]

from openapi-typescript-codegen.

mahdibx avatar mahdibx commented on June 9, 2024 1

We had to downgrade too, tried the absolute path and overriding to the latest version of json-schema-ref-parser (11.1.0), still it just appends the absolute path to the package folder, really odd way of handling paths, wondering how this works for anyone.

from openapi-typescript-codegen.

StanlyLife avatar StanlyLife commented on June 9, 2024 1

Still not working, had to downgrade to 0.25.0

from openapi-typescript-codegen.

sander-b-postnl avatar sander-b-postnl commented on June 9, 2024

apidevtools/json-schema-ref-parse#311 the issue seems to be related to this one.

from openapi-typescript-codegen.

ferdikoomen avatar ferdikoomen commented on June 9, 2024

Seems indeed a json-schema-ref-parse issue, checking now

from openapi-typescript-codegen.

ferdikoomen avatar ferdikoomen commented on June 9, 2024

Easy solution for now, would be to revert json-schema-ref-parse to 10.1.0 until they fix the issue. I will do that and publish a new release.

from openapi-typescript-codegen.

kumv-net avatar kumv-net commented on June 9, 2024

Created a new release (0.27.0) https://github.com/ferdikoomen/openapi-typescript-codegen/releases/tag/v.027.0 please check if that resolves the issue

hey,It doesn't fix the issue. try revert json-schema-ref-parse to 11.0.0

https://github.com/APIDevTools/json-schema-ref-parser/releases/tag/v11.0.0

Fix windows paths and external refs (APIDevTools/json-schema-ref-parser#321) (b9f91b2), closes APIDevTools/json-schema-ref-parser#321
BREAKING CHANGES
Change the file path parsing logic (to be safe)

from openapi-typescript-codegen.

nruffing avatar nruffing commented on June 9, 2024

Looking at the RefParser.parse implementation it looks getOpenApiSpec needs to be passing in a base path for relative paths to be resolved against and the recommended use case is to pass in a full file url.

https://github.com/APIDevTools/json-schema-ref-parser/blob/main/lib/index.ts#L58

from openapi-typescript-codegen.

LEI avatar LEI commented on June 9, 2024

This problem occured on Windows but not macOS, downgrading the package to 0.25 fixed it.

from openapi-typescript-codegen.

AnderssonPeter avatar AnderssonPeter commented on June 9, 2024

Upgrading to the latest version of @apidevtools/json-schema-ref-parser seems to solve the issue? atleast in one of my test cases.

from openapi-typescript-codegen.

mrlubos avatar mrlubos commented on June 9, 2024

@StanlyLife we've got a different fix for this in our fork, could you give it a try and let me know if it works for you?

from openapi-typescript-codegen.

AnderssonPeter avatar AnderssonPeter commented on June 9, 2024

@mrlubos Is there any reason why you are maintaining a fork, is this repo dead?

from openapi-typescript-codegen.

mrlubos avatar mrlubos commented on June 9, 2024

@AnderssonPeter this should answer that question https://github.com/nicolas-chaulet/openapi-typescript-codegen?tab=readme-ov-file#why-the-fork

from openapi-typescript-codegen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.