Coder Social home page Coder Social logo

Comments (7)

RomanHotsiy avatar RomanHotsiy commented on June 19, 2024 2

Thanks for the report @eseglem 🙌

@tatomyr @roman-sainchuk just making sure you see this ☝️

from redocly-vs-code.

RomanHotsiy avatar RomanHotsiy commented on June 19, 2024 1

@roman-sainchuk how about if we try to detect openapi from plaintext somehow and show errors only in such case?

from redocly-vs-code.

tatomyr avatar tatomyr commented on June 19, 2024

Hi @eseglem,

What exactly do you mean by custom tags?
Also, could you check if those yaml files are somehow referenced from an actual openapi definition file?

from redocly-vs-code.

eseglem avatar eseglem commented on June 19, 2024

@tatomyr Custom tags being any local tags that aren't specifically part of the yaml spec. They are left up to the application to handle. Pretty much anything with an ! at the beginning. In the above example this is !GetAtt but the specific tag doesn't matter they all cause the same issue.

In my case they are completely independent and unrelated to openapi. You don't even need to have an openapi definition file to see the problem show up.

Isolated steps to reproduce:

  • Open an empty folder in VSCode
  • Save the above as example.yaml
  • Allow extension to create a redocly.yaml for you.
  • You now have 1 problem in example.yaml

from redocly-vs-code.

roman-sainchuk avatar roman-sainchuk commented on June 19, 2024

@eseglem Thanks for reporting! The issue is that extension cannot parse this yaml file so we cannot even determine if the file is the openapi spec or not.
We have to think about how to deal with such cases because we're not sure that showing no errors is acceptable.

from redocly-vs-code.

roman-sainchuk avatar roman-sainchuk commented on June 19, 2024

@RomanHotsiy great idea! We'll try to implement it, thanks!

from redocly-vs-code.

eseglem avatar eseglem commented on June 19, 2024

I don't think its a horrible thing to report an error, my main issue was that the error does not say it's coming from the Redocly extension. If you catch it and report the error with a source that would be enough to address that concern.

Though I would prefer to see a way to configure which files it tries to parse. Then I could tell it not to do those files. I may have many yaml files across many folders in a repo, but any openapi yaml are in one folder. There is no reason the extension needs to look at the other ones.

from redocly-vs-code.

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.