Giter VIP home page Giter VIP logo

Comments (4)

ChandanChainani avatar ChandanChainani commented on July 19, 2024

@agmikhailov Please can you close the ticket since the fix for the issue has been merged.

from spec.

fredbi avatar fredbi commented on July 19, 2024

I've inspected the fix (commit e8e27ff) and it is dubious. Would require another round of more thorough testing here. On it.

from spec.

fredbi avatar fredbi commented on July 19, 2024

@agmikhailov
I've attempted unsuccessfully to reproduce this issue. I am missing some context.
What I can assert is that:
* go-openapi/spec (unpatched) can load on windows (or unix) with "(" or blanks in space (or other escape characters)

  • go-openapi/validate can validate a spec on such a path
  • the patch from commit e8e27ff disables the cache in some cases by removing the scheme when loading documents

I understand this patch made things work for your use case, but the root cause lies in some other part of go-openapi (perhaps go-openapi/loads, perhaps go-openapi/runtime).

Could you please expose more details about the failing app mentioned above, so I get a change to understand how the failing spec got to be loaded in the first place into the runtime shown in the stack?

from spec.

fredbi avatar fredbi commented on July 19, 2024

@agmikhailov , cc: @casualjim , @ChandanChainani

I've tried to reproduce this, building a server on windows 11 with go-swagger, pinning a version of go-openapi/spec without the change that came with commit e8e27ff (with --exclude-spec) and loading it from a path just like the one suggested by the O.P.

The server starts just fine and validates the spec when starting the runtime middleware stack as expected.

I am not denying that a problem may occur, but the root cause analysis provided with this issue is not correct.

Therefore, I am proposing:

  • a patch to revert the change from this commit
  • a change to ensure that we never have to open the root pseudo-root document: we should never get something like : open c:\program files (x86)\AppName.root: The system cannot find the file specified.
  • I assume that what is wrong in this issue is the way the spec document is being loaded. I've inspected go-openapi/loads, but nothing could trigger the aforementioned panic.

from spec.

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.