Repository navigation
feat(api): say how to turn off a linting rule when validation fails on one - #483
Open
mrafnadeem-apimatic wants to merge 1 commit into
Open
mrafnadeem-apimatic wants to merge 1 commit into
mrafnadeem-apimatic wants to merge 1 commit into
Conversation
…n one When linting fails, `api validate` and quickstart's "How to fix" note now link to the Configure Validation docs and say where APIMATIC-META.json goes: beside the definition in a project, or zipped with it for a file or URL, which is uploaded on its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mrafnadeem-apimatic
requested review from
Shield-Jaguar and
saeedjamshaid
as code owners
November 20, 2026 05:00
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
A customer could not get their OpenAPI definition through
apimatic api validatebecause of two linting rules that report at Error severity:openapi-v3-agentic-tools-lintingrequired-description-for-enum-itemopenapi-v3-apimatic-lintingnon-empty-schema-enum-valueBoth can be turned off, or lowered to a warning, with
ValidationConfigurationinAPIMATIC-META.json, but nothing in the CLI says so. When linting fails,api validateand quickstart now link to Configure Validation and say where the file has to go:src/spec: beside the API definition.--file,--url, or a file or URL given to quickstart: zipped together with the definition. A single file is uploaded on its own, so anAPIMATIC-META.jsonnext to it is never read. Checked on dev:--file openapi.yamlwith the config beside it exits 1, and--fileon a zip of the two exits 0.api validateshows the line only when linting failed, because validation rules cannot be turned off. Quickstart's "How to fix" note always shows it, worded "If a linting rule doesn't fit your API", because quickstart does not say whether validation or linting failed.api validate -i <project>:Quickstart, given a local file (box border trimmed):
Why
sdk generate,plugin generateandportal generateare unchangedOn dev, the hint would point these commands at a setting that cannot fix their failures:
sdk generateandportal generateexit 0 with both rules above failing, and with a Blocking linting rule failing (enum: []).apimatic-codegen-validation/atleast-one-endpoint.ValidationConfigurationcannot turn validation rules off, and withSkipCodeGenerationChecks: trueboth commands still fail with the same message.plugin generatewas not run, because it needs interactive setup first. It reports a failed generation through the same poller assdk generate.Testing
pnpm testpasses. New tests:ValidateActionshows the line when linting fails, not when only validation fails, and not when quickstart asks it to stay quiet.ApiValidatePrompts.lintingFailedand quickstart'sspecValidationFaileduse the right wording for each kind of spec.api validate:--fileshows the "zipped" wording.APIMATIC-META.jsonskips the failing rules succeeds with no hint.APIMATIC-META.jsonskips the rules, and one that lowers them toWarning, both pass validation and reach step 3.🤖 Generated with Claude Code