You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I work with a big api (~500 enpoints and ~1400 jsonSchemas) and for jsonSchemas, we use special keywords at root level for specific use (ihm, code gen...) that are out of openapi specification. Since @redocly/[email protected], the struct rule is triggered by those special keywords, which cause the linter to output +10k errors (or warning, depending on severity setted), all linked to them.
our problems :
We tried to customize the rule without luck
We can't use (maintain) the lint-ignore file since he is too big (~5k lines) because of the precise relative paths
We want to keep the structure rule validation
Describe the solution you'd like
The simplest solution would be to use wildcards in lint-ignore file. It would allow us to go from :
We tried to customize struct rule, or to turn it off and fork it's code from redocly repository, but we simply turned it off to keep the lib up to date
Additional context
wildcards are already in use for join command
The text was updated successfully, but these errors were encountered:
@Thiebosh looks like you're looking for the wrong solution for your problem 🙂. Instead of ignoring the errors, you can extend the existing Schema type using typeExtension.
Your plugin might look like this:
exportdefault()=>({id: 'my-type-extension',typeExtension: {oas3(types){return{
...types,Schema: {
...types.Schema,properties: {
...types.Schema.properties,javaType: {type: 'string'},// <-- here you extend the predefined type with the keywords you need to add.},},};},},});
There's no point in using wildcards there. The lint-ignore file is meant to be autogenerated (see the docs) and should not be manually modified. Ignoring should be used sparingly, as it hides actual problems that should rather be fixed or worked around in another way. Introducing wildcards will make things even worse, I believe, as problem cases will be ignored implicitly.
Since your problem is solved, I'm closing the issue. Cheers!
Is your feature request related to a problem? Please describe.
I work with a big api (~500 enpoints and ~1400 jsonSchemas) and for jsonSchemas, we use special keywords at root level for specific use (ihm, code gen...) that are out of openapi specification. Since @redocly/[email protected], the struct rule is triggered by those special keywords, which cause the linter to output +10k errors (or warning, depending on severity setted), all linked to them.
our problems :
Describe the solution you'd like
The simplest solution would be to use wildcards in lint-ignore file. It would allow us to go from :
to something like :
or with magic matchers :
Describe alternatives you've considered
We tried to customize struct rule, or to turn it off and fork it's code from redocly repository, but we simply turned it off to keep the lib up to date
Additional context
wildcards are already in use for join command
The text was updated successfully, but these errors were encountered: