-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore errors settings #689
Comments
Is using 3.1.0 out of the question? The
Also, I think this is a new record. 🎉 (Amazing) |
At this moment, 3.1.0 is not possible because we have a bunch of internal tooling dependencies and making that change at scale is not in our appetite for now. I'm right there with ya for using 3.1.0 though haha I also have a discussion thread on your vs code extension repo about a similar issue. I never received a reply on that one. re: error record. Thanks? Hahaha I'm linting the entire repo at once so the number is huge. Btw, the type tree is pretty amazing at scale. It burns through the entire repo in less than a min. (Almost 1000 definitions with hundreds of external refs) major kudos to the team. 🥳🥳 |
We discussed this with @RomanHotsiy and decided to try adding the |
Actually, we discussed it a little bit more. @jeremyfiel can you use a plugin? We have a mechanism for types tree extension so you can modify/extend it from the plugin. I'll try to prepare an example if you're interested. |
Ya I'll take a look at the example thanks |
Can you help me understand how to use the ignore file for wildcard? Maybe that's the easier part until you add the additional support |
i wonder if it's possible to use wildcard on the actual value too.. i have this example where I know the api name to define the rule, but inside the path object I want to wildcard search for a term to ignore. We are generating externally referenced files on the build but the OAS definition has a $ref to the future location of this file so it's throwing an error for unresolved ref when linting. I want to ignore these particular errors. This is the generated ignore file output no-unresolved-refs:
- >-
#/paths/~1payroll~1v3~1deduction-configurations~1meta/get/responses/200/content/application~1json/schema I want to make it a wildcard for any ref with meta in the $ref filename path path/to/my/openapi.yaml:
no-unresolved-refs:
- >-
#paths/*meta* |
@jeremyfiel we don't support wildcards in ignore files unfortunately. This is a nice idea to consider. I think we need to support a way to append to the ignore file. Because right now it rewrites the file on every run. |
i agree, append will be a nice addition. thanks Roman. have a nice evening |
Follow the custom plugins docs and use the following types extension: https://redocly.com/docs/cli/resources/custom-rules/#type-extensions-in-plugins
Let me know if this works. |
@jeremyfiel let us know if this works for you. I think this could be some good content too. |
i still have this on my backlog, I haven't tried it out yet. |
I've given this a go since I had a similar scenario. Here is the code that I've used.
which I then added to my
Bonus content. I've also added an example below to depict how one would make $id and $schema required in your
Hope that helps someone :) |
@bandantonio it would be great to turn this into a guide. |
This is brilliant but I don't think it needs further action from our side so I'll close the issue. |
I'm using OAS3.0.3 and heavily using JSON Schema defined external references. Each of these files indicates the
$schema
keyword and this is not supported in 3.0.x. My linting report is showing me over 90 thousand errors for$schema
is not expected here. How can I add a specific output message to the ignore list rather than the entire "spec" error. I don't want to ignore all spec errors, only this particular one.This is my ignore file but it's not picking up the ignore request. My intention is to lint an entire folder with the
*
and I want to ignore all occurrences in any folderThe text was updated successfully, but these errors were encountered: