Comments (7)
Thanks for the report @eseglem 🙌
@tatomyr @roman-sainchuk just making sure you see this ☝️
from redocly-vs-code.
@roman-sainchuk how about if we try to detect openapi from plaintext somehow and show errors only in such case?
from redocly-vs-code.
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.
@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.
@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.
@RomanHotsiy great idea! We'll try to implement it, thanks!
from redocly-vs-code.
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)
- Preview docs doesn't work for large definitions
- Why is there no root directory support in $ref in paths? HOT 2
- Preview window gets blank while using it with multiple files
- Wrong `theme.openapi` autocompletion in *redocly.yaml*
- Cursor context has active button 'Go to root' in any yaml file HOT 1
- Type null in OpenAPI 3.0
- Support config files located in nested directories HOT 1
- Cannot render docs offline
- Configurable rule not reporting problems HOT 6
- Multiline text is inlined after saving/formatting HOT 2
- Error output is not formed correctly in Problems tab HOT 9
- Disable config init prompt for empty projects HOT 1
- Highlighting error on OpenApi Version HOT 2
- Should not complain about missing server if you yaml contains only components HOT 3
- Idea for VS Code: add openapi versions autocompletion
- VS Code. Duplications in suggestions
- VS Code. Incorrect indentation HOT 1
- Extension does not take into account `.redocly.lint-ignore.yaml` file HOT 5
- Performance issue on medium size project HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redocly-vs-code.